Create webhook
Create a new webhook configuration. Maximum 10 webhooks per user. `name`, `url` and `events` are required. `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 name (1-50 characters)
1 <= length <= 50Webhook endpoint URL (must be a valid URL, whitespace trimmed)
uriSecret key for HMAC-SHA256 signature verification
Events to subscribe to (at least one required)
1 <= itemsEnable or disable webhook delivery. Defaults to true when omitted.
trueCustom 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.createWebhookSettings({ body: { name: 'Example', url: 'https://example.com', events: [ 'post.scheduled', ], },});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"
}Get YouTube demographics GET
Returns audience demographic insights for a YouTube channel, broken down by age, gender, and/or country. Age and gender values are viewer percentages (0-100). Country values are view counts. Data is based on signed-in viewers only, with a 2-3 day delay. Requires the Analytics add-on.
List webhooks GET
Retrieve all configured webhooks for the authenticated user. Supports up to 10 webhooks per user.