List webhooks
Retrieve all configured webhooks for the authenticated user. Supports up to 50 webhooks per user.
API key authentication - use your Zernio API key as a Bearer token
In: header
Response Body
application/json
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.webhooks.getWebhookSettings();console.log(data);{
"webhooks": [
{
"_id": "507f1f77bcf86cd799439011",
"name": "My Production Webhook",
"url": "https://example.com/webhook",
"events": [
"post.published",
"post.failed"
],
"isActive": true,
"lastFiredAt": "2024-01-15T10:30:00Z",
"failureCount": 0
},
{
"_id": "507f1f77bcf86cd799439012",
"name": "Slack Notifications",
"url": "https://hooks.slack.com/services/xxx",
"events": [
"post.failed",
"account.disconnected"
],
"isActive": true,
"failureCount": 0
}
]
}{
"error": "Unauthorized"
}{
"error": "This API key has the 'messages' resource group disabled. GET /api/v1/inbox/conversations requires it. Create a key with 'messages' enabled in the dashboard API keys tab.",
"code": "insufficient_permissions",
"required_group": "publishing"
}List webhook delivery logs GET
Retrieve recorded webhook delivery attempts for the authenticated user, most recent first. Logs are retained for 30 days. Supports filtering by status, event type, webhook ID, and event ID, plus offset-based pagination. For a restricted (zrk_) API key, rows for events outside the key's resource groups are omitted (`pagination.total` may over-count), and an `event` filter naming such an event is rejected with 403. Events blocked by a subscription's own `disabledResourceGroups` are dropped before delivery, so they produce no log rows for anyone; the exception is the five-minute tail after a denylist change, where an already-queued event can still be delivered and logged.
Update webhook PUT
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. A restricted (zrk_) API key can only set `events` to events whose resource group the key holds; an event outside the key's groups is rejected with 403. It also cannot widen an existing subscription past its own groups. `disabledResourceGroups` replaces the subscription's own denylist, which applies to delivery regardless of which key or session created it. Send an empty array to clear it. A restricted key's own disabled groups are unioned into the stored value on every update, so repointing a legacy unrestricted subscription with a restricted key also narrows it. Timing: the new denylist applies to every event emitted after the update. Events already queued for delivery when the update landed were filtered against the previous denylist and can still arrive at your endpoint for up to five minutes after they were enqueued, because the delivery worker trusts a five-minute enqueue-time snapshot before re-checking the subscription. Retries beyond that window, dead-letter replays, test fires, and redeliveries are all checked against the current denylist.