Skip to content
All help articles

Webhooks

Have your own system told when a lead, a message, a visit or a payment comes in.

WhereSettings, then API and webhooks

Steps

  1. 1Open Settings and choose API and webhooks. Only an owner sees this unless an owner has switched it on for someone else under Team.
  2. 2Under Webhooks, type the address on your system that should receive notices. It must start with https://.
  3. 3Tick what it should be told about: a new lead, a message from a customer, a visit being booked, a payment being received.
  4. 4Choose Add the address, and copy the signing secret straight away. It is shown once.
  5. 5Choose Send a test. Within about a minute Recent notices shows whether your system answered.
  6. 6Each notice is a POST with a JSON body holding id, event, created_at and data. The header X-Webhook-Event names the event and X-Webhook-Id repeats the id.
  7. 7To check a notice is really from here, read the X-Webhook-Signature header. It looks like t=1764000000,v1=abc123. Compute an HMAC-SHA256 of the t value, a full stop, and the exact body you received, using your signing secret. It must equal the v1 value. Refuse a notice whose t is more than five minutes old.
  8. 8Answer with any 2xx status within ten seconds. Anything else, or no answer, counts as not delivered.

Good to know

  • A notice that is not delivered is tried again after 1 minute, 5 minutes, 30 minutes, 2 hours and 6 hours, then given up on. Recent notices shows every one.
  • The same notice can arrive more than once. Its id stays the same, so keep the ids you have handled and ignore repeats.
  • Notices are not promised to arrive in the order things happened.
  • A redirect is not followed. Give the final address.
  • Switching an address off stops notices at once, including any that were waiting to be retried.