Subscribe to receive notifications about an event.
When a webhook subscription is created, we will immediately trigger an asynchronous ping event at the target URL, so that you can be sure the subscription is working. See the Ping a webhook target API call for details. Unlike normal notifications, this event will not be retried if there's an error.
Query Parameters
The name of the webhook event.
The URL that should be notified when the event occurs. The URL may contain query parameters, though a parameter will be overwritten if it has the same name as a query parameter provided by the webhook.
Response
Response Body
hooks.hook.v1 ObjectExample
{ "event" : "...", "href" : "/api/v1/hooks/h-###-####", "id" : "h-###-####", "last_triggered" : "2024-05-11T06:49:10-04:00", "target" : "https://example.com/api/hooks?token=abc123" }
Errors
The target must be an HTTP or HTTPS URL.
The request didn't include an event.
You don't have the required scope (permission) to subscribe to the requested webhook. The error body will include the scope that you need.
The request didn't include a target.
The webhook you requested doesn't exist.
You don't have access to the requested webhook for a reason other than scope. Contact us for more details.