Skip to main content
Webhooks

Create a webhook

Creates a new webhook to receive event notifications.

POST
/v2/webhooks

Request Body

FieldTypeRequiredDescription
namestringYesHuman-readable name (max 100 chars)
urlstringYesWebhook endpoint URL (must be HTTPS)
descriptionstringNoOptional description (max 500 chars)
topicsstring[]YesEvent topics to subscribe to
requestConfigobjectNoRequest configuration
requestConfig.headersobjectNoCustom headers to send (max 10)

Available Topics

  • post.created - When a new feedback post is created
  • post.updated - When a feedback post is updated
  • post.deleted - When a feedback post is deleted
  • post.voted - When a feedback post receives a vote
  • ticket.created - When a new ticket is created
  • ticket.updated - When a ticket is updated
  • ticket.deleted - When a ticket is deleted
  • changelog.published - When a changelog is published
  • comment.created - When a comment is created
  • comment.updated - When a comment is updated
  • comment.deleted - When a comment is deleted
  • audit_log.created - When an audit log event is recorded (requires Enterprise plan)
  • survey_response.created - When a survey response is first saved
  • survey_response.completed - When a survey response is completed

Survey Response Events

  • survey_response.created is sent on the first save of a response, survey_response.completed the first time it is completed. A one-page survey sends both.
  • The legacy survey widget saves each page on its own and sends only created. For a known respondent it carries the first saved page, and later pages send no event. For an anonymous respondent each page is a separate response with its own created.
  • Each event carries the response as it was when the event was queued. Changes after completion send no event.
  • Events can arrive late or out of order (retries). Never let a created replace a stored response that already has completedAt, or re-read the response from GET /v2/outbound/messages/{id}/survey_responses.
  • An event can be missing: both topics are best effort. A completed can arrive without a created. A response larger than 256 KB, or from a banned person, sends no event.
  • completedAt is usually null for responses from the legacy survey widget and for responses saved before 2026-06-30, unless the same person later completes the response in the current survey widget.
  • Deleted responses send no event.
  • Survey events use the same envelope and item for every API version.
  • The event id is fixed per response and topic: use it to dedupe.
  • user is the identity the widget sent. It is verified only when identity verification is on.

Response

Returns the created webhook object including the signing secret.

Example Request

{
  "name": "Production Webhook",
  "url": "https://example.com/webhooks",
  "description": "Handles all production events",
  "topics": ["post.created", "post.updated", "comment.created"],
  "requestConfig": {
    "timeoutMs": 10000,
    "headers": {
      "X-Custom-Header": "value"
    }
  }
}

Example Response

{
  "object": "webhook",
  "id": "507f1f77bcf86cd799439011",
  "name": "Production Webhook",
  "url": "https://example.com/webhooks",
  "secret": "whsec_abc123def456ghi789",
  "topics": ["post.created", "post.updated", "comment.created"],
  "status": "active",
  ...
}

Limits

Each organization has a maximum number of webhooks (default: 10). Creating a webhook when the limit is reached will return a 400 error.

Version Availability

This endpoint is only available in API version 2026-01-01.nova and newer.

Authorizationstringheaderrequired

API key as Bearer token. Use: Authorization: Bearer sk_...

Featurebase-Versionenum<string>header

API version for this request. Defaults to your organization's configured API version if not specified.

Available options: 2026-09-03.pulsar, 2026-08-19.orbit, 2026-01-01.nova, 2025-12-12.clover
Example: 2026-09-03.pulsar

Body

application/json
descriptionstring

Optional description of the webhook purpose

Maximum string length: 500
Example: Handles all production events
namestringrequired

Human-readable name for the webhook

Required string length: 1 - 255
Example: Production Webhook
requestConfigobject

Request configuration for webhook delivery

topicsenum<string>[]required

Array of event topics to subscribe to

Minimum array length: 1
urlstringrequired

Webhook endpoint URL (must be HTTPS)

Example: https://example.com/webhooks

Response

application/json

Created

createdAtstringrequired

ISO timestamp when the webhook was created

Example: 2025-01-15T10:30:00.000Z
descriptionstring | nullrequired

Optional description of the webhook purpose

Example: Handles all production events
healthobjectrequired
idstringrequired

Unique identifier

Example: 507f1f77bcf86cd799439011
lastStatusobject | nullrequired

Last delivery attempt status

namestringrequired

Human-readable webhook name

Example: Production Webhook
objectenum<string>required

Object type identifier

Available options: webhook
Example: webhook
requestConfigobjectrequired
secretstringrequired

Webhook signing secret for verifying payloads

Example: whsec_abc123def456ghi789
statusenum<string>required

Current status of the webhook

Available options: active, paused, suspended
Example: active
topicsenum<string>[]required

Array of event topics the webhook subscribes to

updatedAtstringrequired

ISO timestamp when the webhook was last updated

Example: 2025-01-15T10:30:00.000Z
urlstringrequired

Webhook endpoint URL

Example: https://example.com/webhooks
versionstringrequired

API version for webhook payloads

Example: 1.0