Developer docs
Webhooks
Get told the moment a booking changes.
On this page (5)
A webhook is an HTTPS address on your server that Bewtee calls when something happens to a booking. Use it to keep another system in sync without polling the API.
Set one up
1. Add your address
In the dashboard open Developers → Webhooks → Add webhook. Enter a public https:// address and choose the events you want.
2. Save the signing secret
The secret (it starts with whsec_) is shown once. Your server uses it to verify that requests really come from Bewtee.
3. Send a test
Press Send test. Bewtee sends a ping event and shows whether your server accepted it.
A business can have up to 5 webhook addresses.
What your server receives
A POST with a JSON body and these headers:
| Header | Value |
|---|---|
Content-Type |
application/json |
Bewtee-Event |
The event type, for example booking.accepted |
Bewtee-Delivery |
A unique ID for this delivery, the same across retries |
Bewtee-Signature |
t=<unix time>,v1=<signature>. See verify signatures |
User-Agent |
Bewtee-Webhooks/1.0 |
How to respond
- Reply with any
2xxstatus within 5 seconds. Do slow work after you have replied. - Redirects are not followed. A
3xxcounts as a failure. - Treat the event
idas a de-duplication key: the same event can arrive more than once. - Events can arrive out of order. Use the booking in the payload, or fetch the latest state from the API.
Retries
A delivery that fails is retried with growing delays: after 1 minute, 5 minutes, 30 minutes, 2 hours and 6 hours. That is 6 attempts over roughly 8.5 hours, after which the delivery is marked failed.
After 25 failed attempts in a row across deliveries, the webhook is paused and no further events are sent to it. Fix your server, then switch the webhook back on in the dashboard.
Events are usually delivered within a minute of the change. Recent activity in the dashboard shows the last 50 deliveries for each webhook, kept for 30 days.
Requirements
- The address must use
https://and resolve to a public IP address. - Addresses that point to private or internal networks are rejected.