A webhook is a message Bookingly sends to your software when something happens, so you don't have to keep asking the API whether anything has changed. You give Bookingly a web address, choose the events you care about, and Bookingly sends a POST request to that address each time one happens.
Set up a webhook address
- Go to Settings > Integrations, then open Developer API.
- In the Webhooks section, select Add a webhook address.
- Enter the address, which must start with
https://and be reachable from the internet. Choose the events to be told about, then select Add address. - Copy the signing secret straight away. It is shown once. You use it to check that messages really came from Bookingly.
- Select Send test to send a test event and see that your address answers.
Webhook addresses are managed here, not through the API. That way a lost API key can't be used to send your customers' details to somewhere else. You can add up to 5 addresses.
Events
Event | Sent when |
|---|---|
| A booking is made: by a customer online, by your team, or through the API. |
| A booking is moved or changed, is confirmed after being paid for, or its status changes (arrived, completed or no-show). |
| A booking is cancelled, by your team, by the customer, through the API, or because an online payment wasn't made in time. |
| A customer is added: by your team, through the API, or by signing up or booking online. |
| A court or facility booking is made, by a customer online, by your team, or through the API. |
| A court or facility booking is moved, confirmed after being paid for, or part of it is cancelled. |
| A court or facility booking is cancelled, by your team, by the customer, through the API, or because an online payment wasn't made in time. |
A few things to know:
booking.*events are for appointment bookings. Court and facility bookings sendfacility_booking.*events, whosedatais the court booking as described in Courts and facilities. A court booking made in one go is one event, however many courts it covers.- For a repeating booking,
booking.createdis sent for the first booking only, not for each one in the series. If you cancel a booking and the ones after it,booking.cancelledis sent for the booking you chose only. customer.createdisn't sent for customers added by importing a file, or for someone who buys a gift card or product online without booking.- You can choose a different set of events for each address.
What is sent
Each message is a POST with a JSON body:
{
"id": "evt_4043d54169d6481ea00063511bc7c681",
"type": "booking.created",
"createdAt": "2026-11-13T04:31:33.724Z",
"data": {
"id": 726,
"reference": "EB3595CE",
"status": "confirmed",
"locationId": 61,
"timezone": "Pacific/Auckland",
"startsAt": "2026-11-16T16:45:00",
"endsAt": "2026-11-16T17:30:00",
"startsAtUtc": "2026-11-16T03:45:00.000Z",
"endsAtUtc": "2026-11-16T04:30:00.000Z",
"services": [ ... ],
"customers": [ ... ]
}
}ididentifies the event. It is the same every time the event is sent, including retries.typeis the event name.createdAtis when it happened, in UTC.datais the booking or customer as it was at that moment, in exactly the same shape the API returns. Forbooking.cancelled,data.statusiscancelled.
These headers come with every message:
Header | Value |
|---|---|
| The event |
| The event |
| The signature, described below. |
|
|
Check a message came from Bookingly
Anyone can send a request to your address, so check the signature before you trust a message. The Bookingly-Signature header looks like this:
t=1731472293,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bdTo check it:
- Take the number after
t=and the exact, raw text of the body. - Join them with a full stop:
<t>.<body>. - Work out the HMAC-SHA256 of that text, using your signing secret as the key, and write it as lower-case hexadecimal.
- Compare it with the value after
v1=, using a constant-time comparison. - Check that
tis within a few minutes of now, so an old message can't be sent again.
In Node.js:
const crypto = require("crypto");
function isFromBookingly(rawBody, signatureHeader, secret) {
const parts = Object.fromEntries(signatureHeader.split(",").map((p) => p.split("=")));
const expected = crypto
.createHmac("sha256", secret)
.update(`${parts.t}.${rawBody}`)
.digest("hex");
const matches =
expected.length === parts.v1.length &&
crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(parts.v1));
const fresh = Math.abs(Date.now() / 1000 - Number(parts.t)) < 300;
return matches && fresh;
}In Python:
import hashlib, hmac, time
def is_from_bookingly(raw_body: bytes, signature_header: str, secret: str) -> bool:
parts = dict(p.split("=", 1) for p in signature_header.split(","))
signed = parts["t"].encode() + b"." + raw_body
expected = hmac.new(secret.encode(), signed, hashlib.sha256).hexdigest()
return hmac.compare_digest(expected, parts["v1"]) and abs(time.time() - int(parts["t"])) < 300Use the raw body exactly as it arrived. If your framework has already turned it into an object and back into text, the signature won't match.
Reply quickly with a 2xx
Answer with any 2xx status (200 or 204 is fine) to say you have received the event. Do your real work afterwards, because Bookingly waits only 10 seconds for an answer. Bookingly doesn't follow redirects.
If your address doesn't answer with a 2xx, or doesn't answer in time, Bookingly tries again, waiting longer each time:
Try | Wait before it |
|---|---|
2nd | 1 minute |
3rd | 5 minutes |
4th | 30 minutes |
5th | 2 hours |
6th | 6 hours |
7th | 12 hours |
8th | 24 hours |
After the 8th try Bookingly gives up on that event, about two days after it happened. If an address fails 40 deliveries in a row with no success in between, Bookingly switches it off and shows why. Fix the problem, then switch it back on.
Handling events well
- The same event can arrive more than once. A retry can overlap with a slow first try. Keep the
idof events you have handled and ignore repeats. - Order isn't guaranteed. A
booking.updatedcould arrive before thebooking.createdthat came earlier if the first one had to be retried. Use the booking's own details, and fetch it from the API if you need its latest state. - Keep your secret secret. Store it the way you would an API key. If it is ever exposed, delete the address in Bookingly and add it again to get a new one.
See what was sent
Under each address in the Webhooks section, select Recent deliveries to see the last 30 events sent to it, whether each was delivered, and the reason when it wasn't. Deliveries are kept for 30 days.