Configure webhooks for real-time notifications. Events: post.scheduled, post.published, post.failed, post.partial, post.cancelled, post.recycled, account.connected, account.disconnected, message.received, message.sent, comment.received, review.new, review.updated, webhook.test. Security: optional HMAC-SHA256 signature in X-Zernio-Signature header. Configure a secret key to enable verification. Custom headers supported.
All URIs are relative to https://zernio.com/api, except if the operation defines another base path.
| Method | HTTP request | Description |
|---|---|---|
| createWebhookSettings() | POST /v1/webhooks/settings | Create webhook |
| deleteWebhookSettings() | DELETE /v1/webhooks/settings | Delete webhook |
| getWebhookSettings() | GET /v1/webhooks/settings | List webhooks |
| testWebhook() | POST /v1/webhooks/test | Send test webhook |
| updateWebhookSettings() | PUT /v1/webhooks/settings | Update webhook |
createWebhookSettings($create_webhook_settings_request): \Zernio\Model\UpdateWebhookSettings200ResponseCreate 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.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: bearerAuth
$config = Zernio\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Zernio\Api\WebhooksApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$create_webhook_settings_request = {"name":"My Production Webhook","url":"https://example.com/webhook","secret":"your-secret-key","events":["post.scheduled","post.published","post.failed","post.partial","post.cancelled","post.recycled","account.connected","account.disconnected","message.received","comment.received","review.new","review.updated"],"isActive":true}; // \Zernio\Model\CreateWebhookSettingsRequest
try {
$result = $apiInstance->createWebhookSettings($create_webhook_settings_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WebhooksApi->createWebhookSettings: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| create_webhook_settings_request | \Zernio\Model\CreateWebhookSettingsRequest |
\Zernio\Model\UpdateWebhookSettings200Response
- Content-Type:
application/json - Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteWebhookSettings($id): \Zernio\Model\UpdateYoutubeDefaultPlaylist200ResponseDelete webhook
Permanently delete a webhook configuration.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: bearerAuth
$config = Zernio\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Zernio\Api\WebhooksApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$id = 'id_example'; // string | Webhook ID to delete
try {
$result = $apiInstance->deleteWebhookSettings($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WebhooksApi->deleteWebhookSettings: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| id | string | Webhook ID to delete |
\Zernio\Model\UpdateYoutubeDefaultPlaylist200Response
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getWebhookSettings(): \Zernio\Model\GetWebhookSettings200ResponseList webhooks
Retrieve all configured webhooks for the authenticated user. Supports up to 10 webhooks per user.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: bearerAuth
$config = Zernio\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Zernio\Api\WebhooksApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
try {
$result = $apiInstance->getWebhookSettings();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WebhooksApi->getWebhookSettings: ', $e->getMessage(), PHP_EOL;
}This endpoint does not need any parameter.
\Zernio\Model\GetWebhookSettings200Response
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
testWebhook($test_webhook_request): \Zernio\Model\UnpublishPost200ResponseSend test webhook
Send a test webhook to verify your endpoint is configured correctly. The test payload includes event: "webhook.test" to distinguish it from real events.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: bearerAuth
$config = Zernio\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Zernio\Api\WebhooksApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$test_webhook_request = {"webhookId":"507f1f77bcf86cd799439011"}; // \Zernio\Model\TestWebhookRequest
try {
$result = $apiInstance->testWebhook($test_webhook_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WebhooksApi->testWebhook: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| test_webhook_request | \Zernio\Model\TestWebhookRequest |
\Zernio\Model\UnpublishPost200Response
- Content-Type:
application/json - Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
updateWebhookSettings($update_webhook_settings_request): \Zernio\Model\UpdateWebhookSettings200ResponseUpdate 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.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: bearerAuth
$config = Zernio\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Zernio\Api\WebhooksApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$update_webhook_settings_request = {"_id":"507f1f77bcf86cd799439011","url":"https://new-example.com/webhook","events":["post.published","post.failed"]}; // \Zernio\Model\UpdateWebhookSettingsRequest
try {
$result = $apiInstance->updateWebhookSettings($update_webhook_settings_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WebhooksApi->updateWebhookSettings: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| update_webhook_settings_request | \Zernio\Model\UpdateWebhookSettingsRequest |
\Zernio\Model\UpdateWebhookSettings200Response
- Content-Type:
application/json - Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]