Guides

Webhooks

ScaleBiss can POST JSON events to your server when things happen in a workspace. Configure this in the app under Build → Developer → Webhook: one HTTPS URL, one shared secret, a master switch, and 9 event toggles. Every enabled event uses that same URL.

An event that has never been switched on stays off. If your webhook was saved before the booking events existed, open the Webhook tab and turn on booking.created, booking.updated and booking.cancelled - otherwise nothing is sent for bookings.

Outbound webhooks are not separate /client/v1 routes. The client API is for you → ScaleBiss (e.g. send a template). Webhooks are ScaleBiss → you.

Configure in the app

  1. Open the workspace → sidebar Build → Developer.
  2. Open the Webhook tab.
  3. Turn on the master switch, set a public https:// URL and a secret of at least 16 characters, enable the events you need, then Save. The secret is write-only - the page shows its last 4 characters.
  4. Use Test to send a harmless webhook.test sample.

Legacy Lead-only and Flow-only webhook settings (and their app buttons) are removed. Older Lead/Flow settings APIs are deprecated - use Developer → Webhook.

Events

UI labelEvent idWhen it fires
Contact createdcontact.createdA contact is created in the workspace (CRM).
Lead createdlead.createdA CRM lead is created from any source (manual, Meta Ads, Flow, chatbot, …).
Flow submittedwhatsapp.flow.submittedA customer submits a WhatsApp Flow.
Handoff createdhandoff.createdThe AI chatbot opens a human handoff ticket.
Meta ad fetchedmeta.ad.updatedA Meta ad is created or refreshed from Ad Account sync.
Meta lead fetchedmeta.lead.receivedA Meta Lead Ads submission is stored (webhook or backfill).
Booking createdbooking.createdA booking is made from WhatsApp, the CRM, or the bookings API (including bookings you send yourself).
Booking updatedbooking.updatedA booking is rescheduled, paid, completed, marked no-show, or its notes change.
Booking cancelledbooking.cancelledA booking is cancelled - by staff, by your system through the API, or automatically when an unpaid booking's payment hold runs out.

Delivery contract

ScaleBiss sends POST to your webhook URL with JSON. Verify the signature before trusting the body. Your secret itself is never sent.

POST {your_webhook_url}
Content-Type: application/json
Accept: application/json
x-scalebiss-event: lead.created
x-scalebiss-delivery-id: 6f1c2a0e-9b7d-4c1e-8f3a-2d5b7e9a1c44
x-scalebiss-timestamp: 1776157200
x-scalebiss-signature: sha256=5d41402abc4b2a76b9719d911017c592…
  • x-scalebiss-event - event id (same as the event field in the body).
  • x-scalebiss-delivery-id- unique per event and identical on every retry (also the body's id). Store it and ignore repeats.
  • x-scalebiss-timestamp / x-scalebiss-signature - sha256= + hex HMAC-SHA256 of {timestamp}.{raw body} with your secret.
  • Body always includes id, workspaceId, event and occurredAt, plus the entity payload.
  • Answer with any 2xx within 10 seconds. Timeouts, 5xx and 429 are retried with exponential backoff (up to 5 attempts over roughly 15 minutes); other 4xx responses are not retried. Redirects are not followed.
  • The URL must be public https; private and local addresses are rejected.
  • One Meta Lead Ads submission sends both meta.lead.received and lead.created when both are on. contact.created covers contacts created in the app, from leads and from campaigns.

Migrated Lead / Flow webhooks

If your URL came from the old Lead or Flow webhook settings, ScaleBiss keeps your old contract until you switch: lead.created is sent as a one-item JSON array with workspace_id and sent_at, and the raw secret is also sent in x-app-signature. Only the events that were on before stay on. Click Use new format on the Webhook tab (or save a new URL) once your receiver verifies the HMAC signature.

Sample payload - lead.created

{
  "id": "6f1c2a0e-9b7d-4c1e-8f3a-2d5b7e9a1c44",
  "workspaceId": "7",
  "event": "lead.created",
  "occurredAt": "2026-04-14T09:00:00+00:00",
  "source": "manual",
  "lead": {
    "id": 119,
    "name": "Rahul Sharma",
    "mobile_no": "919876543210",
    "email": "rahul@example.com",
    "stage": "new",
    "custom_attributes": {},
    "created_at": "2026-04-14T09:00:00.000Z"
  },
  "meta": {}
}

Sample payload - booking.created

The three booking events share one shape. source says where the booking came from (whatsapp, crm or api) - use it, or external_ref, to skip the echo of bookings you sent yourself. On booking.updated, meta.change lists what happened (rescheduled, paid, completed, no_show, details). On booking.cancelled, booking.cancel_reason is payment_timeout when an unpaid booking was released automatically. Times are ISO 8601; starts_at carries an offset, not the workspace timezone name.

{
  "id": "0b3e8d52-7c1a-4f06-b9d4-6a21c85e7f13",
  "workspaceId": "7",
  "event": "booking.created",
  "occurredAt": "2026-11-02T11:20:00+00:00",
  "source": "whatsapp",
  "external_ref": null,
  "booking": {
    "id": 91,
    "number": "BK-000091",
    "status": "pending_payment",
    "starts_at": "2026-11-03T05:00:00+00:00",
    "ends_at": "2026-11-03T05:30:00+00:00",
    "quantity": 1,
    "token_number": null,
    "amount": 500,
    "currency": "INR",
    "notes": null,
    "cancel_reason": null,
    "created_at": "2026-11-02T11:20:00+00:00"
  },
  "service": { "id": 5, "name": "Consultation", "kind": "appointment", "external_ref": "consultation" },
  "resource": { "id": 3, "name": "Dr. Mehta" },
  "contact": { "id": 412, "name": "Asha", "mobile_no": "919876543210", "email": null },
  "meta": {}
}

booking.status is one of pending_payment (a paid WhatsApp booking waiting for the customer to pay), confirmed, cancelled, completed or no_show. resource is null when no staff member is assigned.

Other event shapes (summary)

  • contact.created - contact object (id, name, mobile_no, email, …).
  • whatsapp.flow.submitted - flowId, flowName, contactId, response, fields, submittedAt.
  • handoff.created - handoff object (id, contactId, chatbotId, reason, …).
  • meta.ad.updated - metaAd (metaAdId, name, status, campaign/adset, action).
  • meta.lead.received - metaLead (metaLeadId, leadId, form/campaign/ad fields).
  • booking.created / booking.updated / booking.cancelled - booking, service, resource, contact, source, external_ref (see the sample above).
  • webhook.test - sample from the Developer Test button (sample: true).

Verify the signature

Compute the HMAC over the raw request body (before JSON parsing), compare in constant time, and reject timestamps older than 5 minutes to block replays.

import crypto from "node:crypto";

// Express: app.post("/hooks/scalebiss", express.raw({ type: "application/json" }), handler)
export function verifyScaleBissWebhook(rawBody, headers, secret) {
  const ts = headers["x-scalebiss-timestamp"];
  const sig = headers["x-scalebiss-signature"] || "";
  if (!ts || Math.abs(Date.now() / 1000 - Number(ts)) > 300) return false;

  const expected =
    "sha256=" +
    crypto.createHmac("sha256", secret).update(`${ts}.${rawBody}`).digest("hex");

  const a = Buffer.from(sig);
  const b = Buffer.from(expected);
  return a.length === b.length && crypto.timingSafeEqual(a, b);
}

Related

  • Authentication - call /client/v1 to send messages (inbound to ScaleBiss).
  • WhatsApp Messages - POST /client/v1/wp/message/send.
  • Workflow canvas webhook / api_request nodes are separate (per-conversation HTTP from a workflow step), not this workspace Developer setting.