Menu

Webhooks

A webhook makes Worktude call your server when a message arrives or a booking changes: it POSTs the event as JSON to an https address of yours, signed with a secret that only you and Worktude know. The page’s owner or an admin adds webhooks on the dashboard’s API page.

On this page

Add a webhook

  1. In the dashboard, open API in the menu, and find Webhooks below the keys.
  2. Under New Webhook, type the Address: an https address of your own server or tool.
  3. Under What it gets, keep the events it needs: all of them are chosen at first.
  4. Choose Add Webhook.
  5. In Signing secret, choose Copy Secret, keep the secret on your server, and choose Close.

The address has to be https, on a public name, without a user name or password, and outside Worktude. A page keeps 10 webhooks at most. To see the secret again, choose Manage beside the webhook, then Show Signing Secret. Send Test sends the webhook a webhook.test event at once.

Plans

Webhooks come with the plans that include the API. On another plan nothing is sent, and a delivery that falls due fails without being sent. You can still see, change, turn off and delete your webhooks.

The events

EventWhen
message.receivedMessage received: a message arrives from one of your page’s forms. Spam isn’t sent.
booking.createdBooking made: a client books, or asks for a booking that you confirm first, whose status is pending.
booking.confirmedBooking confirmed: you choose Confirm on a request.
booking.rescheduledBooking moved: the client moves a booking.
booking.cancelledBooking cancelled: the client cancels a booking or withdraws a request, or you cancel a booking or decline a request.
booking.completedBooking completed: you mark a booking Came.
booking.no_showNo-show: you mark a booking Didn’t come.
card.leadContact left on a card: on a company’s business card, a visitor leaves their contact (Worktude for teams).
company.person.joinedPerson joined: someone claims their company card or joins with the company’s email domain.
company.person.leftPerson left: someone is offboarded from the company.
webhook.testSend Test, to one webhook. It is sent once, never again.

The call

Each call is a POST whose body is the event:

json
{
  "id": "msg_01M3KQZZC0ESR3KPFDBVYAYBVY",
  "type": "booking.created",
  "createdAt": "2026-09-28T10:12:00.000Z",
  "workspace": { "id": "ws_01KJPZV280CZ977PXY6HBPS63X", "slug": "marta-silva" },
  "data": {
    "id": "bkg_01M3KQZZC0ZF7G63QHJ4JJYAHG",
    "status": "confirmed",
    "start": "2026-10-06T09:00:00.000Z",
    "end": "2026-10-06T09:50:00.000Z",
    "timezone": "Europe/Lisbon",
    "clientTimezone": "Europe/Lisbon",
    "eventType": { "id": "evt_01KJPZV55RDT9AJ2H59M1S27BK", "name": "Assessment" },
    "client": { "name": "Ana Costa", "email": "ana@example.com", "phone": "+351 912 345 678", "note": "First time with back pain." },
    "cancelledReason": null,
    "createdAt": "2026-09-28T10:12:00.000Z"
  }
}

data is a booking for the booking events and a message for message.received, each as the API answers it at that moment, and {"endpoint": {"id", "url"}} for webhook.test. The call’s headers:

HeaderWhat it holds
webhook-idThe event’s ID, the same on every attempt at it.
webhook-timestampWhen this attempt was sent, in seconds since the Unix epoch.
webhook-signaturev1, and the signature, in base64. For 24 hours after you roll the secret, two signatures, separated by a space.
content-typeapplication/json
user-agentA name that starts with Worktude-Webhooks/.

Check the signature

Check each call before you trust it. The signature is the HMAC-SHA256 of {webhook-id}.{webhook-timestamp}.{body}, keyed with the bytes that the secret holds in base64 after whsec_. Compute it from the body exactly as it arrived: a body parsed and written out again as JSON no longer matches.

js
import { createHmac, timingSafeEqual } from 'node:crypto';

// secret: the webhook’s signing secret, whsec_…
// headers: the call’s headers, with lower-case names, as Node.js gives them
// body: the call’s body as text, exactly as it arrived
export function fromWorktude(secret, headers, body) {
  const id = headers['webhook-id'];
  const timestamp = headers['webhook-timestamp'];
  const signatures = headers['webhook-signature'];
  if (!id || !timestamp || !signatures) return false;
  // Refuse a call sent more than five minutes ago: it may be an old one sent again.
  const sentAt = Number(timestamp);
  if (!Number.isFinite(sentAt) || Math.abs(Date.now() / 1000 - sentAt) > 300) return false;
  const key = Buffer.from(secret.slice('whsec_'.length), 'base64');
  const expected = createHmac('sha256', key).update(`${id}.${timestamp}.${body}`).digest();
  // For 24 hours after a roll, the header holds two signatures: either one will do.
  return signatures.split(' ').some((signature) => {
    const [version, value = ''] = signature.split(',');
    const given = Buffer.from(value, 'base64');
    return version === 'v1' && given.length === expected.length && timingSafeEqual(given, expected);
  });
}

Where you have a Web Request instead, pass Object.fromEntries(request.headers) as the headers and await request.text() as the body. When fromWorktude() answers false, answer 400 and ignore the call.

The calls follow the Standard Webhooks specification, so its libraries can check them too.

Answers and retries

Answer each call with a 2xx status within 10 seconds, and do the slow work afterwards: anything else, a redirect included, counts as a failure. Worktude reads only the status of your answer.

A failed delivery is sent again about 5 minutes, 30 minutes, 2 hours, 5 hours, 10 hours and 14 hours after each failed attempt: seven attempts over about 32 hours, with the same ID and body, each signed at its own time. After the seventh, it fails for good. An event can therefore arrive more than once, and after a later one: take each webhook-id once, and order the events by their createdAt.

The delivery log

Manage shows a webhook’s Latest deliveries: each event with its state, Delivered, Retrying or Failed, its attempts, the last answer and the next try. Resend sends a delivery again at once; a failed one stays failed unless that attempt succeeds. The log keeps 30 days of deliveries.

When a webhook keeps failing

When a webhook’s deliveries have failed for 5 days, with no success in between, Worktude turns it off. The API page then shows Turned off: failing since and when the failures began, and the page’s owner and admins each get one email, in their language, with the day the failures began and the last answer. While it is off, Worktude sends it nothing.

Once your server answers again, choose Manage, then Turn On: the count starts afresh, and the events from then on go to it. Resend, in its log, sends again a delivery that failed.

Roll the secret

To give a webhook a new signing secret, for instance when the old one may have leaked:

  1. Choose Manage beside the webhook, then Show Signing Secret.
  2. Choose Roll Secret, then Roll Secret again to confirm.
  3. Choose Copy Secret, and put the new secret on your server.

For the next 24 hours, every call is signed with both the new secret and the one it replaced, the new one’s signature first, so that your server can switch when it is ready: check each signature, as the code above does. Meanwhile, the webhook shows Old secret until and the time. A second roll within those 24 hours keeps only the secret that it replaced, for 24 hours from then; after that, the newest secret signs alone.

Questions

Why did the same event arrive twice?

When Worktude doesn’t get a 2xx answer in time, it sends the event again, and a person can send it again with Resend. Take each webhook-id once.

Not yet. The webhooks tell of messages and bookings only.