Appearance
Webhooks
A webhook turns the bookings feed around. Instead of your code asking every so often, Host Port sends a POST to your address for each new booking and each cancellation, a minute or two after it happens.
Webhooks are for developers. A spreadsheet can't receive one.
Paid plan
Webhooks are part of Host Port's paid plan. Pulling data by link or API key works on every plan. If the plan lapses, a saved webhook stays saved but nothing is sent until it's renewed.
Set one up
- Create a connection that includes Bookings. Webhooks send booking rows, so a connection without Bookings has no Webhook button.
- On the connection in Settings, click Webhook.
- Enter your endpoint's
https://address and tick New booking, Cancelled booking, or both. - Click Test and save. Host Port sends a signed
pingto your address, and only saves the webhook if it answers with a2xxstatus. - Copy the signing secret. It starts with
hpw_and is shown once. Use it to check every message really came from Host Port.
What gets sent
- Bookings made or cancelled after the webhook was turned on. Older bookings aren't sent. Fetch those from the bookings feed.
- Only for the listings the connection covers.
- Guest names and contact details only if the connection includes them.
- Never blocks, mirrored blocks, Booking.com closures or unpaid direct checkouts.
Your endpoint
- Must be a public
https://address. - Private network addresses,
localhost, and Host Port's own domains are refused. - Must answer with a
2xxstatus within 10 seconds. Redirects aren't followed.
Change it, test it, turn it off
| Button | What it does |
|---|---|
| Edit webhook | Saves a new address and a new signing secret. The old secret stops working at once |
| Test | Sends a ping signed with the current secret |
| Resume | Starts sending again after the webhook was paused |
| Webhook off | Removes the address, the secret and anything still waiting to be sent |
Turning the whole connection off does the same as Webhook off.
Next
- Events and payload: what arrives.
- Verify the signature: code for Node, Python and PHP.
- Retries and delivery: what happens when your endpoint is down.
