v1

latestOpenAPI 3.0.02026-07-2634192196.8 KB
webhooks

Create webhook

Creates a new webhook in the workspace associated with the Management API key. Webhook needs to be verified before it will start sending identification events to your server. See webhook verification. If webhook signatures are enabled (enterprise only), signing key will be visible in the response after creation. When fetching webhooks after creation, signing key will not be visible! See webhooks documentation for more details. When specifying an environment during creation, webhook should be assigned to the given environment. Setting environment to null creates a global webhook.

post/webhooks

Headers

X-API-Versionstring required

Management API version.

Request body

urlstring required

URL of the webhook endpoint. Must start with https://.

descriptionstring

Description of the webhook.

status'enabled' | 'disabled'

Status of the webhook: 'enabled' or 'disabled'.

environmentobject

Environment ID this webhook is associated with. Null if global.

Example request

{
  "url": "https://website.com/webhook",
  "description": "My Webhook"
}

Response

Webhook created, but needs to be verified before it's active.

environmentobject nullable required

Environment ID this webhook is associated with. Null if global.

Example response

{
  "data": {
    "id": "wh_HYv9YfsIIUjpvR",
    "description": "My Webhook",
    "url": "https://website.com/webhook"
  }
}