Update webhook
Update an existing webhook configuration. All fields except `_id` are optional; only provided fields will be updated. When provided, `name` must be 1-50 characters, `url` must be a valid URL, and `events` must contain at least one event. Whitespace is trimmed from `url` before validation. Webhooks are automatically disabled after 10 consecutive delivery failures.
API key authentication - use your Zernio API key as a Bearer token
In: header
Webhook ID to update (required)
Webhook name (1-50 characters). Must be non-empty if provided.
1 <= length <= 50Webhook endpoint URL (must be a valid URL, whitespace trimmed). Must be a valid URL if provided.
uriSecret key for HMAC-SHA256 signature verification
Events to subscribe to. Must contain at least one event if provided.
1 <= itemsEnable or disable webhook delivery
Custom headers to include in webhook requests
Response Body
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.webhooks.updateWebhookSettings({ body: { _id: 'abc123', },});console.log(data);{
"success": true,
"webhook": {
"_id": "string",
"name": "string",
"url": "http://example.com",
"secret": "string",
"events": [
"post.scheduled"
],
"isActive": true,
"lastFiredAt": "2019-08-24T14:15:22Z",
"failureCount": 0,
"customHeaders": {
"property1": "string",
"property2": "string"
}
}
}{
"error": "Unauthorized"
}