Register a webhook

POST https://api.zenoti.com/v1/webhooks

Registers a new webhook endpoint to receive event notifications. Zenoti sends a POST request to your URL when the specified event occurs.

Before you begin

Permission: Manage API Keys (under Administrator) — Required to access Zenoti APIs.

Endpoint

POST /v1/webhooks

Base URL: https://api.zenoti.com

Request

Headers

Header Required Description
Authorization Yes bearer {{access_token}}

Request body

Field Type Required Description
url string Yes Your webhook endpoint URL (must be HTTPS)
event string Yes Event to subscribe to (e.g., appointment.created, invoice.closed, guest.created)
secret string No Shared secret for signature validation
is_active boolean No Whether the webhook is active (default: true)

Response

Success (200 OK)

{
  "id": "00000000-0000-0000-0000-c57cb7fc7600",
  "url": "https://example.com/webhooks/zenoti",
  "event": "appointment.created",
  "is_active": true,
  "error": null
}

Response fields

Field Type Description
id string (GUID) Webhook identifier
url string Registered endpoint URL
event string Subscribed event
is_active boolean Whether the webhook is active

Example

curl --request POST \
  --url 'https://api.zenoti.com/v1/webhooks' \
  --header 'Authorization: bearer {{access_token}}' \
  --header 'Content-Type: application/json' \
  --data '{
    "url": "https://example.com/webhooks/zenoti",
    "event": "appointment.created",
    "secret": "{{webhook_secret}}"
  }'
const response = await fetch('https://api.zenoti.com/v1/webhooks', {
  method: 'POST',
  headers: {
    'Authorization': 'bearer {{access_token}}',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({ url: 'https://example.com/webhooks/zenoti', event: 'appointment.created', secret: '{{webhook_secret}}' })
});
const data = await response.json();
import requests

response = requests.post(
    'https://api.zenoti.com/v1/webhooks',
    headers={
        'Authorization': 'bearer {{access_token}}',
    },
    json={'url': 'https://example.com/webhooks/zenoti', 'event': 'appointment.created', 'secret': '{{webhook_secret}}'}
)
data = response.json()
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "bearer {{access_token}}");
var content = new StringContent(
    JsonSerializer.Serialize(new { url = "https://example.com/webhooks/zenoti", event = "appointment.created", secret = "{{webhook_secret}}" }),
    Encoding.UTF8, "application/json");
var response = await client.PostAsync(
    "https://api.zenoti.com/v1/webhooks", content);
var data = await response.Content.ReadAsStringAsync();
require 'net/http'
require 'json'

uri = URI('https://api.zenoti.com/v1/webhooks')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Authorization'] = 'bearer {{access_token}}'
request['Content-Type'] = 'application/json'
request.body = { url: 'https://example.com/webhooks/zenoti', event: 'appointment.created', secret: '{{webhook_secret}}' }.to_json
response = http.request(request)
data = JSON.parse(response.body)
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.zenoti.com/v1/webhooks');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Authorization: bearer {{access_token}}',
    'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(['url' => 'https://example.com/webhooks/zenoti', 'event' => 'appointment.created', 'secret' => '{{webhook_secret}}']));
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);

Error codes

Status Description
400 Bad request — invalid or missing required fields
401 Unauthorized — invalid or expired access token
429 Too many requests — rate limit exceeded (60/min)