Create a webhook
Create a new webhook in the workspace.
Request schema
Header parameters
HTTP: basicAuth
HTTP AuthorizationScheme: basic
Request
The name of the webhook
An optional description of the webhook
The events that the webhook should alert on. By default all events are alerted on unless otherwise specified.
The endpoint the webhook will ping when an event occurs in Census. Must be a secure (HTTPS) site.
POST /api/v1/webhooks HTTP/1.1 Authorization: Bearer REPLACE_BEARER_TOKEN Content-Type: application/json Host: app.getcensus.com Content-Length: 200 { "name": "My Webhook", "description": "Webhook for failed syncs ", "events": [ "sync.alert.raised", "sync.alert.resolved" ], "endpoint": "https://mycompany.com/census-sync-alerts" }
Responses
201
The outcome of the create request
Webhooks are used to notify you when sync alerts are raised or resolved, or when certain lifecycle events happen during a sync run.
The name of the webhook
An optional description of the webhook
The events that the webhook should alert on. By default all events are alerted on unless otherwise specified.
The endpoint the webhook will ping when an event occurs in Census. Must be a secure (HTTPS) site.
The id of the webhook.
The secret used to sign the webhook payload. Can be used to verify the authenticity of the webhook.
400
The outcome of the request
The reason the request failed
401
HTTP status code.
403
HTTP status code.
Error message.
{ "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" } }