All URIs are relative to https://zernio.com/api
| Method | HTTP request | Description |
|---|---|---|
| create_webhook_settings | POST /v1/webhooks/settings | Create webhook |
| delete_webhook_settings | DELETE /v1/webhooks/settings | Delete webhook |
| get_webhook_logs | GET /v1/webhooks/logs | List webhook delivery logs |
| get_webhook_settings | GET /v1/webhooks/settings | List webhooks |
| test_webhook | POST /v1/webhooks/test | Send test webhook |
| update_webhook_settings | PUT /v1/webhooks/settings | Update webhook |
create_webhook_settings(create_webhook_settings_request)
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.
require 'time'
require 'zernio-sdk'
# setup authorization
Zernio.configure do |config|
# Configure Bearer authorization (JWT): bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Zernio::WebhooksApi.new
create_webhook_settings_request = Zernio::CreateWebhookSettingsRequest.new({name: 'name_example', url: 'url_example', events: ['post.scheduled']}) # CreateWebhookSettingsRequest |
begin
# Create webhook
result = api_instance.create_webhook_settings(create_webhook_settings_request)
p result
rescue Zernio::ApiError => e
puts "Error when calling WebhooksApi->create_webhook_settings: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> create_webhook_settings_with_http_info(create_webhook_settings_request)
begin
# Create webhook
data, status_code, headers = api_instance.create_webhook_settings_with_http_info(create_webhook_settings_request)
p status_code # => 2xx
p headers # => { ... }
p data # => <UpdateWebhookSettings200Response>
rescue Zernio::ApiError => e
puts "Error when calling WebhooksApi->create_webhook_settings_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| create_webhook_settings_request | CreateWebhookSettingsRequest |
UpdateWebhookSettings200Response
- Content-Type: application/json
- Accept: application/json
delete_webhook_settings(id)
Delete webhook
Permanently delete a webhook configuration.
require 'time'
require 'zernio-sdk'
# setup authorization
Zernio.configure do |config|
# Configure Bearer authorization (JWT): bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Zernio::WebhooksApi.new
id = 'id_example' # String | Webhook ID to delete
begin
# Delete webhook
result = api_instance.delete_webhook_settings(id)
p result
rescue Zernio::ApiError => e
puts "Error when calling WebhooksApi->delete_webhook_settings: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> delete_webhook_settings_with_http_info(id)
begin
# Delete webhook
data, status_code, headers = api_instance.delete_webhook_settings_with_http_info(id)
p status_code # => 2xx
p headers # => { ... }
p data # => <UpdateYoutubeDefaultPlaylist200Response>
rescue Zernio::ApiError => e
puts "Error when calling WebhooksApi->delete_webhook_settings_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| id | String | Webhook ID to delete |
UpdateYoutubeDefaultPlaylist200Response
- Content-Type: Not defined
- Accept: application/json
get_webhook_logs(opts)
List webhook delivery logs
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.
require 'time'
require 'zernio-sdk'
# setup authorization
Zernio.configure do |config|
# Configure Bearer authorization (JWT): bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Zernio::WebhooksApi.new
opts = {
limit: 56, # Integer | Maximum number of logs to return
skip: 56, # Integer | Number of logs to skip (offset-based pagination)
status: 'success', # String | Filter by delivery outcome
event: 'event_example', # String | Filter by event type (e.g. post.published)
webhook_id: 'webhook_id_example', # String | Filter by webhook configuration ID
event_id: 'event_id_example' # String | Filter by stable webhook event ID
}
begin
# List webhook delivery logs
result = api_instance.get_webhook_logs(opts)
p result
rescue Zernio::ApiError => e
puts "Error when calling WebhooksApi->get_webhook_logs: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> get_webhook_logs_with_http_info(opts)
begin
# List webhook delivery logs
data, status_code, headers = api_instance.get_webhook_logs_with_http_info(opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <GetWebhookLogs200Response>
rescue Zernio::ApiError => e
puts "Error when calling WebhooksApi->get_webhook_logs_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| limit | Integer | Maximum number of logs to return | [optional][default to 50] |
| skip | Integer | Number of logs to skip (offset-based pagination) | [optional][default to 0] |
| status | String | Filter by delivery outcome | [optional] |
| event | String | Filter by event type (e.g. post.published) | [optional] |
| webhook_id | String | Filter by webhook configuration ID | [optional] |
| event_id | String | Filter by stable webhook event ID | [optional] |
- Content-Type: Not defined
- Accept: application/json
get_webhook_settings
List webhooks
Retrieve all configured webhooks for the authenticated user. Supports up to 10 webhooks per user.
require 'time'
require 'zernio-sdk'
# setup authorization
Zernio.configure do |config|
# Configure Bearer authorization (JWT): bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Zernio::WebhooksApi.new
begin
# List webhooks
result = api_instance.get_webhook_settings
p result
rescue Zernio::ApiError => e
puts "Error when calling WebhooksApi->get_webhook_settings: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> get_webhook_settings_with_http_info
begin
# List webhooks
data, status_code, headers = api_instance.get_webhook_settings_with_http_info
p status_code # => 2xx
p headers # => { ... }
p data # => <GetWebhookSettings200Response>
rescue Zernio::ApiError => e
puts "Error when calling WebhooksApi->get_webhook_settings_with_http_info: #{e}"
endThis endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
test_webhook(test_webhook_request)
Send 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.
require 'time'
require 'zernio-sdk'
# setup authorization
Zernio.configure do |config|
# Configure Bearer authorization (JWT): bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Zernio::WebhooksApi.new
test_webhook_request = Zernio::TestWebhookRequest.new({webhook_id: 'webhook_id_example'}) # TestWebhookRequest |
begin
# Send test webhook
result = api_instance.test_webhook(test_webhook_request)
p result
rescue Zernio::ApiError => e
puts "Error when calling WebhooksApi->test_webhook: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> test_webhook_with_http_info(test_webhook_request)
begin
# Send test webhook
data, status_code, headers = api_instance.test_webhook_with_http_info(test_webhook_request)
p status_code # => 2xx
p headers # => { ... }
p data # => <UnpublishPost200Response>
rescue Zernio::ApiError => e
puts "Error when calling WebhooksApi->test_webhook_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| test_webhook_request | TestWebhookRequest |
- Content-Type: application/json
- Accept: application/json
update_webhook_settings(update_webhook_settings_request)
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.
require 'time'
require 'zernio-sdk'
# setup authorization
Zernio.configure do |config|
# Configure Bearer authorization (JWT): bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Zernio::WebhooksApi.new
update_webhook_settings_request = Zernio::UpdateWebhookSettingsRequest.new({_id: '_id_example'}) # UpdateWebhookSettingsRequest |
begin
# Update webhook
result = api_instance.update_webhook_settings(update_webhook_settings_request)
p result
rescue Zernio::ApiError => e
puts "Error when calling WebhooksApi->update_webhook_settings: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> update_webhook_settings_with_http_info(update_webhook_settings_request)
begin
# Update webhook
data, status_code, headers = api_instance.update_webhook_settings_with_http_info(update_webhook_settings_request)
p status_code # => 2xx
p headers # => { ... }
p data # => <UpdateWebhookSettings200Response>
rescue Zernio::ApiError => e
puts "Error when calling WebhooksApi->update_webhook_settings_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| update_webhook_settings_request | UpdateWebhookSettingsRequest |
UpdateWebhookSettings200Response
- Content-Type: application/json
- Accept: application/json