Get webhook by ID
client.webhooks.retrieve(stringid, WebhookRetrieveParams { featurebaseVersion } params?, RequestOptionsoptions?): Webhook { id, createdAt, description, 11 more }
GET/v2/webhooks/{id}
Retrieves a single webhook by its unique identifier.
Path Parameters
id- The webhook ID (24-character ObjectId)
Response Format
Returns a webhook object with:
object- Always “webhook”id- Unique webhook identifiername- Human-readable webhook nameurl- Webhook endpoint URLdescription- Optional descriptiontopics- Array of subscribed event topicsstatus- Current status (“active”, “paused”, “suspended”)requestConfig- Request configuration (timeout, headers)lastStatus- Last delivery attempt statushealth- Health metricscreatedAt- Creation timestampupdatedAt- Last update timestamp
The response includes the webhook signing secret for payload verification.
Example
{
"object": "webhook",
"id": "507f1f77bcf86cd799439011",
"name": "Production Webhook",
"url": "https://example.com/webhooks",
"description": "Handles all production events",
"topics": ["post.created", "post.updated"],
"status": "active",
"requestConfig": {
"timeoutMs": 5000,
"headers": {}
},
"lastStatus": {
"code": 200,
"message": "Success",
"timestamp": "2025-01-15T10:30:00.000Z"
},
"health": {
"lastResponseTime": 150,
"avgResponseTime": 200,
"lastSuccessAt": "2025-01-15T10:30:00.000Z",
"errorsSinceLastSuccess": 0,
"consecutiveFailures": 0
},
"createdAt": "2025-01-01T00:00:00.000Z",
"updatedAt": "2025-01-15T10:30:00.000Z"
}
Version Availability
This endpoint is only available in API version 2026-01-01.nova and newer.
Get webhook by ID
import Featurebase from 'featurebase-node';
const client = new Featurebase({
apiKey: process.env['FEATUREBASE_API_KEY'], // This is the default and can be omitted
});
const webhook = await client.webhooks.retrieve('507f1f77bcf86cd799439011');
console.log(webhook.id);{
"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"
}