Bronjoy webhooks for new, changed and cancelled bookings
Bronjoy sends a POST to your URL whenever a booking is created, changed or cancelled — from any channel: your site, the catalogue, Telegram or the dashboard. Webhooks are part of the Avtopilot plan.
Add an endpoint
- Dashboard → Settings → API & webhooks → Webhooks → Add endpoint.
- Under Endpoint URL enter a public
https://address that answers with a2xxstatus within 10 seconds. - Tick the Events you want.
- Save and copy the Signing secret.
- Click Send test event — a
pingevent arrives, and the window shows the response code.
You can add up to 10 endpoints.
Events
| Event | When |
|---|---|
appointment.created | A new booking, from any channel |
appointment.updated | The status or time changed: confirmed, completed, no-show, rescheduled |
appointment.cancelled | A booking was cancelled |
ping | Only the Send test event button |
Payload
{
"id": "evt_4f1c2a9e-8f7b-4a6e-9d2c-1b3e5f7a9c0d",
"type": "appointment.updated",
"created_at": "2026-12-01T10:15:04+05:00",
"organization_id": 12,
"data": {
"appointment": {
"id": 5021,
"status": "confirmed",
"start_time": "2026-12-01T11:30:00+05:00",
"end_time": "2026-12-01T12:00:00+05:00",
"duration_minutes": 30,
"price": 80000,
"currency": "UZS",
"service": { "id": 12, "name": "Мужская стрижка" },
"staff": { "id": 3, "name": "Aziz" },
"branch": { "id": 1, "name": "Yunusabad" },
"client": { "id": 77, "name": "Anna", "phone": "+998901234567", "email": null },
"notes": null,
"cancellation_reason": null,
"payment_status": null,
"created_at": "2026-11-30T18:02:11+05:00",
"updated_at": "2026-12-01T10:15:04+05:00"
},
"changes": {
"status": { "from": "pending", "to": "confirmed" }
}
}
}
changesis present onappointment.updatedandappointment.cancelled. It is always an object, even when empty.statusis one ofpending,confirmed,cancelled,completed,no_show.- The event
idis the same for every endpoint. Use it to avoid processing an event twice.
Request headers:
| Header | Value |
|---|---|
X-Bronjoy-Event | The event type |
X-Bronjoy-Delivery | The delivery number |
X-Bronjoy-Signature | t=<unix time>,v1=<signature> |
User-Agent | Bronjoy-Webhooks/1.0 |
Verify the signature
v1 is an HMAC-SHA256 of the string <t>.<raw request body>, keyed with the endpoint's signing secret. Compute it over the body before parsing the JSON, and reject requests older than 5 minutes.
import crypto from 'node:crypto'
function verify(rawBody, header, secret) {
const parts = Object.fromEntries(header.split(',').map(p => p.split('=')))
const expected = crypto.createHmac('sha256', secret).update(`${parts.t}.${rawBody}`).digest('hex')
const fresh = Math.abs(Date.now() / 1000 - Number(parts.t)) < 300
return fresh && crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(parts.v1))
}
function verify(string $rawBody, string $header, string $secret): bool
{
parse_str(str_replace(',', '&', $header), $parts);
$expected = hash_hmac('sha256', $parts['t'].'.'.$rawBody, $secret);
return abs(time() - (int) $parts['t']) < 300 && hash_equals($expected, $parts['v1']);
}
You can change the secret with New signing secret on the endpoint. The old one stops working immediately.
Retries and switching off
- A non-
2xxanswer, a timeout or a connection error is retried after 1 minute, 5 minutes, 30 minutes, 2 hours and 6 hours — up to 6 attempts in all. - Redirects are not followed: answer from the final URL.
- Addresses on internal networks (localhost, private IPs) are refused.
- After 15 failed deliveries in a row the endpoint is switched off: "Turned off after failures". Fix your receiver and click Resume.
Every attempt is in the endpoint's Delivery log: response code, time and error. The log is kept for 30 days.
API keys
How to create a Bronjoy API key, authenticate Integrations API v1 requests, fetch free slots and create a booking from your own site or CRM.
MCP servers
Connect an AI assistant to Bronjoy over the Model Context Protocol — search the catalogue and book with no key, run a private server for your own business, or search these docs.