Guides

Webhooks

Event notifications: setup, events, payload, signatures, retries.

Webhooks send an HTTPS POST to your endpoint when certain things happen in your IntelliDent organisation. Every delivery is signed, so you can prove it came from IntelliDent and was not replayed.

Setting up a webhookLink to this section

Webhooks are an Enterprise feature, and IntelliDent sets them up for you. Clinic accounts cannot add them from the dashboard. To register an endpoint, contact us with:

  • the endpoint URL. It must be public https://, with no username or password in it;
  • a contact for delivery problems.

We give you the endpoint’s signing secret through a secure channel. Treat it like a password. An endpoint whose address points at a private or internal network is refused when it is registered.

EventsLink to this section

These are the events IntelliDent sends today. Every registered endpoint receives all of them; filter on X-IntelliDent-Event and ignore the ones you do not need.

Appointments and patients

EventSent when
appointment.createdAn appointment was booked: by staff in the dashboard, or by the AI phone agent.
appointment.updatedAn appointment changed: rescheduled, reassigned, or its status or type changed (but not cancelled).
appointment.cancelledAn appointment was cancelled, by staff or by the AI phone agent.
patient.createdA patient record was created: by staff, or when a new caller registered with the AI phone agent.
patient.updatedA patient record was edited, deleted or erased on request (`deleted` is then true).
  • Sent within about a minute of the change. data.appointment has the same scheduling fields as GET /api/v1/appointments. data.patient carries only the patient’s id, status and a deleted flag: fetch contact details with GET /api/v1/patients and a key that has patients:read.
  • Covered: changes made by staff in the IntelliDent dashboard, and bookings, reschedules and cancellations made by the AI phone agent.
  • Not covered: appointments and patients imported in bulk (the practice management system sync and CSV patient imports), and reschedule requests from the patient portal (they do not change the appointment until staff act on them).

Account and operations

EventSent when
crawl.failedA website crawl for the knowledge base failed.
crm.sync_failedA sync with a connected CRM failed.
integration.orderedAn integration was ordered for the organisation.
onboarding.completedA fine-tuned model was deployed to one of the organisation’s agents.
pms.sync_failedA sync with the practice management system failed.
subscription.addon_purchasedAn add-on was purchased.
subscription.canceledThe subscription was cancelled.
subscription.upgradedThe subscription plan was upgraded.
ticket.createdA support ticket was created.
ticket.repliedA support ticket received a reply.

PayloadLink to this section

The body is JSON with the event’s id, its name, your organisation id, when it happened, and data.

  • Appointment and patient events: data.appointment or data.patient, as below. These fields are stable.
  • Account and operations events: data carries a human-readable title and body, a dashboard link when there is one, and metadata. Their wording can change, so do not parse them.
{
  "id": "6741c3d2a9e3f1d2c3b4a9f1",
  "event": "appointment.created",
  "organizationId": "6740a0e9a9e3f1d2c3b4a000",
  "timestamp": "2026-11-20T01:15:00.000Z",
  "data": {
    "appointment": {
      "id": "6740b1c2a9e3f1d2c3b4a501",
      "centerId": "6740a0f1a9e3f1d2c3b4a001",
      "patientId": "6740a8d3a9e3f1d2c3b4a311",
      "dentistUserId": "6740a2b4a9e3f1d2c3b4a102",
      "type": "checkup",
      "status": "scheduled",
      "startTime": "2026-11-24T23:00:00.000Z",
      "endTime": "2026-11-24T23:30:00.000Z",
      "duration": 30,
      "source": "voice_agent",
      "createdAt": "2026-11-20T01:15:00.000Z",
      "updatedAt": "2026-11-20T01:15:00.000Z"
    }
  }
}

HeadersLink to this section

HeaderValue
Content-Type`application/json`.
X-IntelliDent-EventThe event name, for example `ticket.created`.
X-IntelliDent-TimestampUnix time in seconds when this attempt was signed.
X-IntelliDent-Signature-256`t=<timestamp>,v1=<signature>`. The signature is the hex HMAC-SHA256 of `<timestamp>.<raw body>` with your signing secret. Verify this one.
X-IntelliDent-Event-IdThe event’s id, also `id` in the body. The same on every attempt and redelivery: de-duplicate on it.
X-IntelliDent-DeliveryA unique id for this attempt. A retry has a new id.
X-IntelliDent-SignatureLegacy: hex HMAC-SHA256 of the raw body only. It cannot detect a replayed request. Being retired; see the migration notes.

Verifying signaturesLink to this section

  1. Read the raw request body before parsing it. The signature covers the exact bytes sent.
  2. Split X-IntelliDent-Signature-256 on commas into t (timestamp) and v1 (signature).
  3. Reject the request if t is more than 5 minutes from your clock. This stops a captured request from being replayed later.
  4. Compute HMAC-SHA256 of `${t}.${rawBody}` with your signing secret, hex-encode it, and compare it to v1 in constant time.
import crypto from "node:crypto";

const TOLERANCE_SECONDS = 300;

/**
 * rawBody: the request body exactly as received (a string or Buffer), before any JSON parsing.
 * header:  the X-IntelliDent-Signature-256 header.
 */
export function verifyIntelliDentSignature(secret, rawBody, header, nowSeconds = Math.floor(Date.now() / 1000)) {
  if (!header) return false;
  const parts = {};
  for (const part of header.split(",")) {
    const i = part.indexOf("=");
    if (i > 0) parts[part.slice(0, i).trim()] = part.slice(i + 1).trim();
  }
  const timestamp = Number(parts.t);
  if (!Number.isInteger(timestamp) || !parts.v1) return false;
  // Reject old (replayed) and far-future requests.
  if (Math.abs(nowSeconds - timestamp) > TOLERANCE_SECONDS) return false;

  const expected = crypto.createHmac("sha256", secret).update(`${timestamp}.${rawBody}`).digest("hex");
  const a = Buffer.from(expected, "hex");
  const b = Buffer.from(parts.v1, "hex");
  return a.length === b.length && crypto.timingSafeEqual(a, b);
}

A complete receiver

import express from "express";
import { verifyIntelliDentSignature } from "./verify";

const app = express();

// Keep the raw body: the signature covers the exact bytes sent.
app.post("/webhooks/intellident", express.raw({ type: "application/json" }), (req, res) => {
  const ok = verifyIntelliDentSignature(
    process.env.INTELLIDENT_WEBHOOK_SECRET,
    req.body.toString("utf8"),
    req.get("X-IntelliDent-Signature-256"),
  );
  if (!ok) return res.status(400).send("invalid signature");

  const event = JSON.parse(req.body.toString("utf8"));
  // Respond quickly with any 2xx; do slow work in a background job.
  res.status(204).end();
  handleEvent(event).catch(console.error);
});

Replay protection is the timestamp; de-duplicate on the event id

Each attempt is signed again with a fresh timestamp and has its own X-IntelliDent-Delivery id. The event itself keeps one id, X-IntelliDent-Event-Id (also id in the body), on every attempt and redelivery. Delivery is at least once, so record the event ids you have processed and skip repeats.

Delivery and retriesLink to this section

BehaviourValue
SuccessAny 2xx response.
AttemptsUp to 3 per event, one after another.
Wait between attempts1 s, then 2 s
Timeout10 seconds per attempt, for the whole request and response.
RedirectsNot followed. A 3xx counts as a failed attempt.
Not retriedAn endpoint whose address resolves to a private or internal network, or a URL that is not https.
After the last failureThe event is not sent again. We record the failure and the error for support.
Appointment and patient eventsQueued when the change is saved and sent within about a minute. At least once: the same event id can arrive more than once.

Delivery order is not guaranteed, so do not depend on it. There is no way to replay past events yet; poll the API to backfill anything you missed.

Endpoint requirementsLink to this section

  • Serve public https:// with a valid certificate. Addresses on private, loopback or link-local networks are refused, both when the endpoint is registered and on every delivery (the address is checked again when we connect).
  • Answer within 10 seconds with a 2xx. Acknowledge first, then do slow work in a background job.
  • Do not redirect. Point the webhook at the final URL.
  • Verify every signature, and reject requests that fail.

Migrating from the legacy signatureLink to this section

Earlier deliveries carried only X-IntelliDent-Signature: an HMAC of the body alone. It proves who sent a request but not when, so a captured request could be replayed. Deliveries now carry both headers, and the legacy header is being retired.

  1. Switch your verification to X-IntelliDent-Signature-256 using the code above. Use the same signing secret.
  2. Enforce the 5-minute timestamp tolerance.
  3. Stop reading the legacy header.

The legacy header has no removal date yet. We will announce one to webhook customers in advance and list it in the changelog.