POST
/
webhooks
curl --request POST \
  --url https://app.getcensus.com/api/v1/webhooks \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "My Webhook",
  "description": "Webhook for failed syncs ",
  "events": [
    "sync.alert.raised",
    "sync.alert.resolved"
  ],
  "endpoint": "https://mycompany.com/census-sync-alerts"
}'
{
  "status": "created",
  "data": {
    "name": "My Webhook",
    "description": "Webhook for failed syncs ",
    "events": [
      "sync.alert.raised",
      "sync.alert.resolved"
    ],
    "endpoint": "https://mycompany.com/census-sync-alerts",
    "id": 123,
    "secret": "my123secret"
  }
}

Authorizations

Authorization
string
header
required

Bearer token for the current workspace. Can be retrieved from the Workspace's settings page.

Body

application/json

Webhooks are used to notify you when sync alerts are raised or resolved, or when certain lifecycle events happen during a sync run.

Response

201
application/json
Successfully created webhook.

The response is of type object.