Webhooks mAPI reference
Complete reference documentation for the Webhooks resource.
Webhooks
#Outbound webhooks send event notifications from a Knock environment to an HTTP endpoint.
List webhooks
#Returns a paginated list of outbound webhooks for a given environment.
Endpoint
Query parameters
The environment slug. When omitted, the account's default environment is used.
The slug of a branch to use. When environment is omitted, the branch is resolved from Development after the account default is injected. When environment is supplied, it must be "development".
Filter webhooks by event type in dotted format (e.g. message.sent).
Filter webhooks by active status.
The cursor to fetch entries after.
The cursor to fetch entries before.
The number of entries to fetch per-page.
Returns
A paginated list of Webhook. Contains a list of entries and page information.
A list of entries.
Whether the webhook is currently active.
The timestamp of when the webhook was created.
An optional description of the webhook.
The list of event types that this webhook is subscribed to, in dotted format (e.g. message.sent).
The unique identifier for the webhook.
The secret key used to sign webhook payloads. Only returned when a webhook is first created.
The timestamp of when the webhook was last updated.
The URL that the webhook will send events to.
The information about a paginated result.
The cursor to fetch entries after. Will only be present if there are more entries to fetch.
The cursor to fetch entries before. Will only be present if there are more entries to fetch before the current page.
The number of entries to fetch per-page.
Create a webhook
#Creates a new outbound webhook in the given environment. The response includes
the secret_key which is only revealed at creation time.
Endpoint
Query parameters
The environment slug. When omitted, the account's default environment is used.
The slug of a branch to use. When environment is omitted, the branch is resolved from Development after the account default is injected. When environment is supplied, it must be "development".
Request body
The request body for creating or updating an outbound webhook.
Whether the webhook should be active.
An optional description of the webhook.
The list of event types that this webhook should be subscribed to, in dotted format (e.g. message.sent).
The URL that the webhook will send events to.
Returns
Wraps the Webhook response under the webhook key.
An outbound webhook that receives event notifications.
Whether the webhook is currently active.
The timestamp of when the webhook was created.
An optional description of the webhook.
The list of event types that this webhook is subscribed to, in dotted format (e.g. message.sent).
The unique identifier for the webhook.
The secret key used to sign webhook payloads. Only returned when a webhook is first created.
The timestamp of when the webhook was last updated.
The URL that the webhook will send events to.
Archive a webhook
#Archives an outbound webhook.
Endpoint
Path parameters
The ID of the webhook to archive.
Query parameters
The environment slug. When omitted, the account's default environment is used.
The slug of a branch to use. When environment is omitted, the branch is resolved from Development after the account default is injected. When environment is supplied, it must be "development".
Returns
The response from archiving a webhook.
The result of the archive operation.
Get a webhook
#Retrieves a single outbound webhook by its ID.
Endpoint
Path parameters
The ID of the webhook to retrieve.
Query parameters
The environment slug. When omitted, the account's default environment is used.
The slug of a branch to use. When environment is omitted, the branch is resolved from Development after the account default is injected. When environment is supplied, it must be "development".
Returns
An outbound webhook that receives event notifications.
Whether the webhook is currently active.
The timestamp of when the webhook was created.
An optional description of the webhook.
The list of event types that this webhook is subscribed to, in dotted format (e.g. message.sent).
The unique identifier for the webhook.
The secret key used to sign webhook payloads. Only returned when a webhook is first created.
The timestamp of when the webhook was last updated.
The URL that the webhook will send events to.
Update a webhook
#Updates an existing outbound webhook.
Endpoint
Path parameters
The ID of the webhook to update.
Query parameters
The environment slug. When omitted, the account's default environment is used.
The slug of a branch to use. When environment is omitted, the branch is resolved from Development after the account default is injected. When environment is supplied, it must be "development".
Request body
The request body for creating or updating an outbound webhook.
Whether the webhook should be active.
An optional description of the webhook.
The list of event types that this webhook should be subscribed to, in dotted format (e.g. message.sent).
The URL that the webhook will send events to.
Returns
Wraps the Webhook response under the webhook key.
An outbound webhook that receives event notifications.
Whether the webhook is currently active.
The timestamp of when the webhook was created.
An optional description of the webhook.
The list of event types that this webhook is subscribed to, in dotted format (e.g. message.sent).
The unique identifier for the webhook.
The secret key used to sign webhook payloads. Only returned when a webhook is first created.
The timestamp of when the webhook was last updated.
The URL that the webhook will send events to.
Webhook
#An outbound webhook that receives event notifications.
Attributes
Whether the webhook is currently active.
The timestamp of when the webhook was created.
An optional description of the webhook.
The list of event types that this webhook is subscribed to, in dotted format (e.g. message.sent).
The unique identifier for the webhook.
The secret key used to sign webhook payloads. Only returned when a webhook is first created.
The timestamp of when the webhook was last updated.
The URL that the webhook will send events to.
WebhookRequest
#The request body for creating or updating an outbound webhook.
Attributes
Whether the webhook should be active.
An optional description of the webhook.
The list of event types that this webhook should be subscribed to, in dotted format (e.g. message.sent).
The URL that the webhook will send events to.