Create a webhook
POST/v2/webhooks
Creates a new webhook to receive event notifications.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Human-readable name (max 100 chars) |
url | string | Yes | Webhook endpoint URL (must be HTTPS) |
description | string | No | Optional description (max 500 chars) |
topics | string[] | Yes | Event topics to subscribe to |
requestConfig | object | No | Request configuration |
requestConfig.headers | object | No | Custom headers to send (max 10) |
Available Topics
post.created- When a new feedback post is createdpost.updated- When a feedback post is updatedpost.deleted- When a feedback post is deletedpost.voted- When a feedback post receives a voteticket.created- When a new ticket is createdticket.updated- When a ticket is updatedticket.deleted- When a ticket is deletedchangelog.published- When a changelog is publishedcomment.created- When a comment is createdcomment.updated- When a comment is updatedcomment.deleted- When a comment is deleted
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.
Create a webhook
curl https://do.featurebase.app/v2/webhooks \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $FEATUREBASE_API_KEY" \
-d '{
"name": "Production Webhook",
"topics": [
"post.created",
"post.updated"
],
"url": "https://example.com/webhooks",
"description": "Handles all production events"
}'{
"id": "507f1f77bcf86cd799439011",
"createdAt": "2025-01-15T10:30:00.000Z",
"description": "Handles all production events",
"health": {
"avgResponseTime": 200,
"consecutiveFailures": 0,
"errorsSinceLastSuccess": 0,
"lastResponseTime": 150,
"lastSuccessAt": "2025-01-15T10:30:00.000Z"
},
"lastStatus": {
"code": 200,
"message": "Success",
"timestamp": "2025-01-15T10:30:00.000Z"
},
"name": "Production Webhook",
"object": "webhook",
"requestConfig": {
"timeoutMs": 5000,
"headers": {
"X-Custom-Header": "value"
}
},
"secret": "whsec_abc123def456ghi789",
"status": "active",
"topics": [
"post.created",
"post.updated"
],
"updatedAt": "2025-01-15T10:30:00.000Z",
"url": "https://example.com/webhooks",
"version": "1.0"
}Returns Examples
{
"id": "507f1f77bcf86cd799439011",
"createdAt": "2025-01-15T10:30:00.000Z",
"description": "Handles all production events",
"health": {
"avgResponseTime": 200,
"consecutiveFailures": 0,
"errorsSinceLastSuccess": 0,
"lastResponseTime": 150,
"lastSuccessAt": "2025-01-15T10:30:00.000Z"
},
"lastStatus": {
"code": 200,
"message": "Success",
"timestamp": "2025-01-15T10:30:00.000Z"
},
"name": "Production Webhook",
"object": "webhook",
"requestConfig": {
"timeoutMs": 5000,
"headers": {
"X-Custom-Header": "value"
}
},
"secret": "whsec_abc123def456ghi789",
"status": "active",
"topics": [
"post.created",
"post.updated"
],
"updatedAt": "2025-01-15T10:30:00.000Z",
"url": "https://example.com/webhooks",
"version": "1.0"
}