Creates a Webhook endpoint that subscribes to named events and delivers them to a specified callback URL. The signing secret is returned only in this response. Each workspace can create at most 20 webhooks.
Prerequisites
Endpoint and authentication configured. For details, see Overview and authentication.
Endpoint
POST /webhook_endpoints
Request bodyurlstring (必选)Callback URL; HTTP or HTTPS allowed, any port, domain or public IP accepted; private, loopback, link-local, and reserved addresses are rejectedevents array<string> (必选)Array of named event types to subscribe to; wildcard subscriptions are not supporteddescription string (可选)Description, max 256 characters | Request example |
Response fieldsidstringWebhook ID, format wep_<ULID>description string | nullDescriptionurl stringCallback URLevents array<string>Subscribed named event typesstatus stringWebhook statusdisabled_reason string | nullDisable reason; null when not disabledconsecutive_fail integerCurrent consecutive failure count; 0 for new webhookslast_success_at string | nullLast successful delivery time; null for new webhookslast_failure_at string | nullLast failed delivery time; null for new webhookssigning_secret stringSigning secret, format whsec_ + standard Base64 text. Returned only in successful create and reset responsescreated_at stringCreation time, ISO 8601updated_at stringLast update time, ISO 8601request_id stringUnique request identifier | Response |
Error codes
| HTTP status | Error code | Description |
|---|---|---|
| 400 | 11800016 | invalid webhook request |
| 401 | InvalidApiKey | Invalid API-key provided. |