POST request to it whenever a relevant event is triggered.
Setting up a webhook
To get started, use the Create webhook endpoint to register a webhook URL (must be HTTPS and not an IP).Webhook headers
Every webhook delivery includes the following HTTP headers:| Header | Description |
|---|---|
Content-Type | Always application/json. |
Webhook-Id | The unique ID of this delivery (e.g. whd_abc123). Use this to deduplicate retried deliveries. |
Webhook-Timestamp | Unix timestamp (seconds) of when the delivery was dispatched. Use this to reject stale messages. |
Webhook-Signature | HMAC-SHA256 signature(s) of the payload. Multiple signatures may be present during secret rotation. |
Webhook-Attempt | 1-indexed attempt number for this delivery. 1 on the first try, incremented on each retry. |
Event-Id | The ID of the originating event (e.g. evt_abc123). Not present on test deliveries. |
Receiving webhooks
When an event occurs, we send aPOST request to your registered URL. The webhook payload follows the same schema as the Event resource:
2xx status code within 15 seconds to acknowledge receipt. Any other status code, timeout, or connection error is treated as a failed delivery and will be retried. The maximum time we’ll wait for a response is 25 seconds (5s connect + 15s read + 5s write).
CSRF protection
If you use Rails, Django, or another web framework, your site might automatically check that everyPOST request contains a CSRF token. This is an important security feature, but it can also prevent your site from processing legitimate webhook events. If so, you may need to exempt your webhook route from CSRF protection.
Testing
You can use the Test webhook endpoint to send a test delivery to your URL during development. You specify the eventname and data in the request body, and we’ll dispatch a delivery to your webhook endpoint. Test deliveries don’t include the Event-Id header since no real event is created.