Webhooks

A webhook endpoint is an address Availies sends events to. Delivery happens after a booking is committed, from an outbox of its own, so a slow or broken endpoint never holds up a booking.

Setting one up

Checking the signature

Every delivery is signed as the Standard Webhooks specification describes. Each endpoint has its own secret, shown once.

Bodies

A manage link is a secret. Whoever holds it can move or cancel that booking until the link expires. Treat webhook bodies as credentials: store them encrypted or not at all, and never write them to a log.

Signed samples to test against

These bodies are synthetic. Each was signed with the sample secret by the product's own signer at a fixed time. Verify the body exactly as written, as UTF-8 bytes. The timestamp is old, so set your verifier's freshness window to that time.

webhook.test

The 32 bytes 0, 1, 2 up to 31, written as a Standard Webhooks secret: whsec_ followed by their base64.

content-type: application/json
webhook-id: msg_00000000000000000000000008
webhook-timestamp: 1791363600
webhook-signature: v1,BXKzoPt7ZAcv3qQtYcYjWEk3ibfJtZxhbw+5yCN4wwo=

{"type":"webhook.test","timestamp":"2026-10-07T08:00:00.000Z","id":"msg_00000000000000000000000008","account_id":"acct_00000000000000000000000001","data":{"endpoint_id":"whe_00000000000000000000000002","message":"A test event from Availies. It describes no booking and no person."}}

delivery.dead

The 32 bytes 0, 1, 2 up to 31, written as a Standard Webhooks secret: whsec_ followed by their base64.

content-type: application/json
webhook-id: msg_00000000000000000000000007
webhook-timestamp: 1791363600
webhook-signature: v1,ascplkmMAGR4oycxyhQHpj/S8tWNgO8a7Th679r/pGg=

{"type":"delivery.dead","timestamp":"2026-10-07T08:00:00.000Z","id":"msg_00000000000000000000000007","account_id":"acct_00000000000000000000000001","data":{"delivery_id":"dlv_00000000000000000000000001","endpoint_id":"whe_00000000000000000000000001","event_id":"msg_00000000000000000000000001","event_type":"booking.created","subject_type":"booking","subject_id":"bkg_00000000000000000000000001","attempts":10,"last_http_status":503,"last_error_code":"http_status"}}

How delivery goes

What is promised

Promise How
Nothing is lost The event is written in the same database batch as the change it describes.
At least once Delivery is retried with growing delays until the endpoint answers 2xx or the event is dead.
Order per booking Events for one booking arrive in version order. A later one waits until the earlier one is delivered or skipped. A dead earlier one keeps it waiting until it is replayed or skipped.
Safe to repeat The event id and the booking version let a receiver ignore a repeat or a stale event.
Visible Every attempt is recorded. The admin app shows delivery state and can replay.

Order across different bookings is not promised.

When delivery fails

Reporting back

A receiver can tell Availies what it did with a booking version, through reportBooking. The latest report per system is kept, ordered by version and then sequence. An older one changes nothing, the same pair again is a repeat, and the same pair with other content is refused with conflict. A report is not an event and not a change to the booking: it sends nothing and writes no version. A webhook endpoint may name a report_system, the system expected to report back.