Skip to main content

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.
Point the URL at a request-inspection service (for example webhook.site) while you are wiring things up, then switch it to your own endpoint. The change takes effect on the next event, with no redeploy on your side.
Your endpoint must be reachable over HTTPS with a valid certificate and must answer HTTP 200 within 5 seconds. Do the real work asynchronously — see Webhooks.

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 inside subscribedEvents: 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

Sending headers: {} clears the previously stored headers.
Status, read, template, and account events stop being delivered — the Gateway simply drops them for this app.
Returns the configuration you just saved. See Get Webhook.
A missing required field is a malformed request, not a field validation error:

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.