What it does
Sets the webhook configuration for an application: the HTTPS URL the Gateway posts events to, the custom headers it attaches to each delivery, and which event types you are subscribed to. The same path also serves a read: send it without a body to get the active configuration back instead — see Get Webhook.Endpoint
Headers
string
required
Secret key in
Bearer sk_... format. See Secret Key authentication.string
required
Always
application/json.Path parameters
string
required
Application ID. Must belong to the organization (otherwise
404).Request Body
string
required
The HTTPS endpoint that will receive events. Must be publicly reachable and serve a valid TLS certificate.
object
Custom headers the Gateway attaches to every delivery, as a key → value map. Use it to carry your own shared secret or routing token. Send
{} to clear the existing headers.This is a free-form map, so it is the place to put anything your infrastructure needs (an auth token, a tenant ID, a WAF bypass header). Do not put credentials that you would not want to see stored on the configuration.
object
Event name → boolean map controlling which events are delivered. Events set to
false, and events you leave out, are not delivered.Event types
The five event names accepted insidesubscribedEvents:
The same list, with the endpoints that use it, is on the Webhook Event reference page. Payload shapes for each event are documented on the Webhooks page.
Response
boolean
true when the configuration was saved.object
The stored configuration, read back after the write.
Examples
Demo 1 — set the URL and subscribe to events
Demo 1 — set the URL and subscribe to events
Demo 2 — move to a production URL
Demo 2 — move to a production URL
headers: {} clears the previously stored headers.Demo 3 — inbound messages only
Demo 3 — inbound messages only
Demo 4 — verify the change
Demo 4 — verify the change
Demo 5 — error: missing url → 400
Demo 5 — error: missing url → 400
Demo 6 — error: non-HTTPS url → 422
Demo 6 — error: non-HTTPS url → 422
Errors
object
Error details with
code, group, and description; isSuccess is false.Next steps
Get Webhook
Read the configuration currently in effect.
Webhook payloads
Event bodies, retries, and endpoint requirements.
Create API Key
Issue a key for an application.
Authentication
How secret keys work.