Skip to main content
NowBookIt sends your system an HTTPS POST whenever a booking changes at your venue. Gift card events are coming soon. Each request is signed, so you can check it came from NowBookIt.

Setting up

There are two ways to get a webhook:
  • With your API key: create one with Create a Webhook. Your key needs the webhooks:manage permission, plus reservations:read for booking events and giftcards:read for gift card events (coming soon).
  • From the venue: the venue’s staff add a webhook in NowBookIt and give you its signing secrets.
Webhooks must be switched on for the venue’s organisation. Until they are, every webhook endpoint returns 404. Contact NowBookIt to switch them on.

Your endpoint

Your endpoint must:
  • use https:// on a public address. Private, loopback and link-local addresses are refused.
  • answer with any 2xx status within 10 seconds. Answer first and process afterwards: queue the event, reply 200, then do the work.
  • be the final URL. Redirects are not followed.

Signing secrets

A secret is whsec_ followed by 43 characters. It is shown only once, when it is created or rotated. Store it like a password and always use the whole secret, whsec_ included.
  • Per venue: each venue has its own secret. Webhooks created with your API key are always this kind. When a venue’s staff set up one webhook for several venues, there is one secret per venue: pick the secret for the event’s nbiVenueId before checking the signature.
  • Group: a venue’s staff can instead set up one webhook for a group of venues with one secret for all of them. Check every request with that secret, whatever its nbiVenueId.
See Verifying signatures.

Order and duplicates

  • Events can arrive out of order, and a retried event can arrive after newer ones. Keep the latest occurredAt you’ve applied for each bookingId (or giftCardId), and ignore anything older.
  • An event can arrive more than once, even after you’ve answered 2xx. Skip an eventId you’ve already handled, and still answer 2xx so it isn’t retried.

Ignoring your own changes

You receive every change, including the ones your system made through the NowBookIt API. To ignore your own, skip events whose source.integrationId is your integration’s id.

Retries

A delivery that doesn’t get a 2xx within 10 seconds is retried up to 6 more times over about 3 days: after 5 minutes, 30 minutes, 2 hours, 8 hours, 24 hours and 36 hours. Each gap varies by up to 10%. Every attempt is signed again with a fresh timestamp and keeps the same eventId. After the last attempt the event is not sent again.

Testing

Send a Test Event sends one signed webhook.test event to your endpoint straight away and returns your endpoint’s answer. Use it to check your signature verification before real events arrive.

Endpoints

List Event Types

GET the events you can subscribe to

List Webhooks

GET your webhooks at a venue

Create a Webhook

POST a webhook and get its secret

Get a Webhook

GET one webhook

Delete a Webhook

DELETE a webhook

Add an Endpoint

POST another URL with the same secret

Update an Endpoint

PATCH an endpoint’s events or switch it off

Delete an Endpoint

DELETE one URL

Rotate the Secret

POST for a new signing secret

Send a Test Event

POST a signed test event now