API & WebhooksWebhooks API

Webhooks API

Create, list, read, update, and delete webhook endpoints via the API.

Webhooks API

Manage webhook endpoints programmatically. All endpoints require an API token with the settings.manage ability. For a conceptual overview of webhooks (events, HMAC signatures, retries), see the Webhooks article.


List Webhooks

GET /api/v1/webhooks — Permission: settings.manage

Example Request

curl -X GET "https://your-domain.com/api/v1/webhooks" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"

Example Response

{
  "data": [
    {
      "id": 1,
      "url": "https://hooks.example.com/webhook",
      "events": ["contact.created", "contact.updated"],
      "config": null,
      "status": "active",
      "failure_count": 0,
      "last_delivery_at": "2025-06-01T12:00:00.000000Z",
      "disabled_at": null,
      "created_at": "2025-03-10T10:00:00.000000Z",
      "updated_at": "2025-06-01T12:00:00.000000Z"
    }
  ],
  "meta": { "current_page": 1, "last_page": 1, "per_page": 25, "total": 1 },
  "links": { "first": "...", "last": "...", "prev": null, "next": null }
}

Create Webhook

POST /api/v1/webhooks — Permission: settings.manage

Request Body

ParameterTypeRequiredDescription
urlstringYesHTTPS URL to receive webhook deliveries (max 2,048 characters)
eventsarrayYesArray of event names to subscribe to (at least one)
configobjectNoAdvanced configuration (HTTP method, headers, payload format, conditions, timeout, max retries)

Example Request

curl -X POST "https://your-domain.com/api/v1/webhooks" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://hooks.example.com/webhook","events":["contact.created","document.sent"]}'

Example Response (201 Created)

{
  "data": {
    "id": 2,
    "url": "https://hooks.example.com/webhook",
    "events": ["contact.created", "document.sent"],
    "config": null,
    "status": "active",
    "failure_count": 0,
    "last_delivery_at": null,
    "disabled_at": null,
    "created_at": "2025-06-02T10:00:00.000000Z",
    "updated_at": "2025-06-02T10:00:00.000000Z"
  },
  "secret": "whsec_abc123...64chars..."
}

Important: The secret is returned only once at creation. Store it securely for HMAC signature verification.


Get Webhook

GET /api/v1/webhooks/{id} — Permission: settings.manage

Returns the webhook endpoint with up to 10 recent deliveries.


Update Webhook

PUT /api/v1/webhooks/{id} — Permission: settings.manage

Request Body

ParameterTypeRequiredDescription
urlstringNoNew HTTPS URL
eventsarrayNoUpdated event subscriptions
statusstringNoactive or paused
configobjectNoUpdated advanced configuration

Example Request

curl -X PUT "https://your-domain.com/api/v1/webhooks/1" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"status": "paused"}'

Delete Webhook

DELETE /api/v1/webhooks/{id} — Permission: settings.manage

Example Request

curl -X DELETE "https://your-domain.com/api/v1/webhooks/1" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"

Returns 204 No Content on success.

Was this article helpful?