Create a webhook subscription

Subscribes an endpoint to the given events (url and events are required). Deliveries are signed with HMAC-SHA-256 in the X-Webhook-Signature header when a secret is set. The signing secret is never returned. Optional headers are sent with every delivery for endpoints that require their own authentication; their values are never returned, the response reports headerNames instead, Content-Type, Host and X-Webhook-Signature cannot be overridden, and an endpoint carrying headers must use HTTPS. An optional bodyTemplate replaces the standard envelope for endpoints that expect a fixed shape, and the signature is computed over the rendered body. Providing an existing id updates that subscription instead.

POST
/v1/webhooks

Authorization

apiKeyAuth
x-api-key<token>

API key authentication. Create an API key in your user profile and include it in the x-api-key header.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://loading/api/v1/webhooks" \  -H "Content-Type: application/json" \  -d '{}'
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "url": "http://example.com",
  "description": "string",
  "events": [
    "contact.created"
  ],
  "bodyTemplate": "string",
  "enabled": true,
  "createdAt": "string",
  "updatedAt": "string",
  "hasSecret": true,
  "headerNames": [
    "string"
  ]
}
"string"
"string"
"string"
"string"