Update a webhook
client.webhooks.update(stringid, WebhookUpdateParams { enabled, event_types, signing_key, 2 more } body, RequestOptionsoptions?): WebhookUpdateResponse { id, created_at, enabled, 6 more }
PATCH/v1/webhooks/{id}
Updates specific fields of a webhook endpoint
Parameters
id: string
formatuuid
Returns
Update a webhook
import FormbricksHub from '@formbricks/hub';
const client = new FormbricksHub({
apiKey: process.env['HUB_API_KEY'], // This is the default and can be omitted
});
const webhook = await client.webhooks.update('018e1234-5678-9abc-def0-123456789abc');
console.log(webhook.id);{
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"created_at": "2019-12-27T18:11:19.117Z",
"enabled": true,
"updated_at": "2019-12-27T18:11:19.117Z",
"url": "url",
"disabled_at": "2019-12-27T18:11:19.117Z",
"disabled_reason": "disabled_reason",
"event_types": [
"feedback_record.created"
],
"tenant_id": "tenant_id"
}Returns Examples
{
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"created_at": "2019-12-27T18:11:19.117Z",
"enabled": true,
"updated_at": "2019-12-27T18:11:19.117Z",
"url": "url",
"disabled_at": "2019-12-27T18:11:19.117Z",
"disabled_reason": "disabled_reason",
"event_types": [
"feedback_record.created"
],
"tenant_id": "tenant_id"
}