Refresh webhook signing secret
client.webhooks.refreshSecret(stringid, WebhookRefreshSecretParams { featurebaseVersion } params?, RequestOptionsoptions?): Webhook { id, createdAt, description, 11 more }
POST/v2/webhooks/{id}/secret
Generates a new signing secret for a webhook. The previous secret is immediately invalidated.
Path Parameters
id- The webhook ID (24-character ObjectId)
Response
Returns the updated webhook object, including the new signing secret.
Important
After refreshing the secret, any integrations that verify webhook signatures using the old secret will stop working until they are updated with the new secret.
Example Response
{
"object": "webhook",
"id": "507f1f77bcf86cd799439011",
"name": "Production Webhook",
"url": "https://example.com/webhooks",
"secret": "whsec_newSecret123abc456def",
"topics": ["post.created", "post.updated"],
"status": "active",
...
}
Version Availability
This endpoint is only available in API version 2026-01-01.nova and newer.
Refresh webhook signing secret
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.refreshSecret('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"
}