Skip to navigation

Create a webhook subscription

View as Markdown

Authentication

AuthorizationBearer

Your Dial API key, sent as Authorization: Bearer sk_live_...

Request

This endpoint expects an object.
targetUrlstringRequiredformat: "uri"

HTTPS only; not a private/loopback host.

eventTypeslist of enumsRequired
phoneNumberIdslist of strings or nullOptional

Limit the webhook to these numbers. Omit it or send null for every number on the account. Each entry is the id from GET /api/v1/numbers. An empty list, or an id that isn’t one of your active numbers, is rejected with 400.

headersmap from strings to strings or nullOptional

Custom headers to send with every delivery, e.g. an Authorization header your endpoint checks. Stored encrypted and returned masked.

queryParamsmap from strings to strings or nullOptional

Custom query parameters to add to targetUrl on every delivery. Stored encrypted and returned masked.

Response

The created subscription. The full signing secret is included once here.
webhookobjectOptional

Errors

400
Bad Request Error
401
Unauthorized Error