Create a webhook subscription
POST /v1/webhooks · SDK createWebhook · CLI deployments webhook create
Requires webhooks:write.
AuthorizationBearer <token>Opaque bearer credential scoped to one service account and tenant.
x-deployments-environment?stringRequired with a platform bearer JWT, where the three tenant headers select an environment the caller can access through active organization membership. Optional with an API key; when supplied, it must match the key's tenant.
^[0-7][0-9A-HJKMNP-TV-Z]{25}$x-deployments-organization?stringRequired with a platform bearer JWT, where the three tenant headers select an environment the caller can access through active organization membership. Optional with an API key; when supplied, it must match the key's tenant.
^[0-7][0-9A-HJKMNP-TV-Z]{25}$x-deployments-project?stringRequired with a platform bearer JWT, where the three tenant headers select an environment the caller can access through active organization membership. Optional with an API key; when supplied, it must match the key's tenant.
^[0-7][0-9A-HJKMNP-TV-Z]{25}$application/json- body
eventTypes*array<>1 <= items <= 100name*string^\S[\s\S]*\S$|^\S$|^$1 <= length <= 120resourceFilters?url*string^\S[\s\S]*\S$|^\S$|^$1 <= length <= 2048CreateWebhookResponse
application/json- response
createdAt*string^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$date-timeupdatedAt*string^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$date-timeversion*number|||environmentId*string^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$organizationId*string^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$projectId*string^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$consecutiveFailures*number|||disabledAt?string^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$date-timedisabledReason?string"consecutive-failures""manual"eventTypes*array<string>id*string^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$name*stringobject*"webhook-endpoint""webhook-endpoint"previousSigningSecretExpiresAt?string^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$date-timeresourceFilters?signingSecretRotatedAt?string^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$date-timestatus*string"active""archived""disabled"url*stringsigningSecret*stringcurl -X POST "https://example.com/v1/webhooks" \ -H "Content-Type: application/json" \ -d '{ "eventTypes": [ "string" ], "name": "string", "url": "string" }'{ "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "version": 0, "environmentId": "string", "organizationId": "string", "projectId": "string", "consecutiveFailures": 0, "disabledAt": "2019-08-24T14:15:22Z", "disabledReason": "consecutive-failures", "eventTypes": [ "string" ], "id": "string", "name": "string", "object": "webhook-endpoint", "previousSigningSecretExpiresAt": "2019-08-24T14:15:22Z", "resourceFilters": { "aggregateIds": [ "string" ], "aggregateTypes": [ "string" ], "environmentIds": [ "string" ], "projectIds": [ "string" ] }, "signingSecretRotatedAt": "2019-08-24T14:15:22Z", "status": "active", "url": "string", "signingSecret": "string"}