v1

latestOpenAPI 3.0.02026-07-24103118224.7 KB
Webhooks

Create a new webhook

Creates a new webhook endpoint for receiving notifications. Marketplaces can set the X-On-Behalf-Of header to provision the endpoint in an owned sub-merchant's Svix app; such endpoints default to direct (non-Connect) event types. Without the header the endpoint is created on the caller's own account (marketplaces keep Connect event defaults).

post/api/webhook

Request body

urlstring uri required

HTTPS URL where webhook notifications will be sent

eventTypesstring[]

Event types to subscribe to. Leave empty to receive all events.

Example request

{
  "url": "https://api.example.com/webhook",
  "eventTypes": [
    "payment.settled",
    "subscription.active"
  ]
}

Response

Create a new webhook successful

webhookIdstring required

Unique identifier of the webhook

webhookUrlstring required

HTTPS URL where webhook notifications will be sent

secretstring required

Secret key for webhook signature verification

Example response

{
  "webhookId": "webhook_1234567890abcdef",
  "webhookUrl": "https://api.example.com/webhook",
  "secret": "whsec_abcdef1234567890abcdef1234567890abcdef"
}