Webhooks

Receive Callpme events in real time: event list, payload format, HMAC signature and retries.

On this page

Webhooks send a POST request to your server for each event. They are configured in Configure › Developers, on the “Webhooks” tab.

Create a webhookLink to this section

  1. Step 1 :

    Enter the URL

    “Endpoint URL”: a public HTTPS address on your server.

  2. Step 2 :

    Choose the events

    Select the events under “Events to send”.

  3. Step 3 :

    Click “Add webhook”.

  4. Step 4 :

    Retrieve the secret

    “Signing secret” (format whsec_…): it is used to verify the requests you receive.

  5. Step 5 :

    Use “Send test event” to receive a ping event.

EventsLink to this section

EventTrigger
agent.created, agent.updated, agent.deletedAn agent is created, updated or deleted
call.startedA call starts
call.completedA call ends, with summary, outcome, captured data and evaluation
call.failedA call fails
call.transferredA call is transferred to a person or to another agent
appointment.booked, appointment.cancelledAn appointment is booked or cancelled
lead.createdNew lead, message, callback request or ticket
conversation.message.receivedA message is received on a text channel
campaign.completedA campaign ends
payment.completedA payment is collected during a call
payment_plan.installment_paid, payment_plan.overdue, payment_plan.completedPayment plan tracking

FormatLink to this section

Request received
POST /webhooks/callpme HTTP/1.1
Content-Type: application/json
User-Agent: Callpme-Webhooks/1.1
X-Callpme-Event: call.completed
X-Callpme-Delivery: cm4dlv01
X-Callpme-Attempt: 1
X-Callpme-Timestamp: 1763460131
X-Callpme-Signature-V2: t=1763460131,v1=5f2b…
X-Callpme-Signature: sha256=9c1d…

{
  "event": "call.completed",
  "data": {
    "id": "cm4call01",
    "agentId": "cm4agent01",
    "agentName": "Practice reception",
    "direction": "inbound",
    "channel": "phone",
    "durationSec": 142,
    "status": "completed",
    "outcome": "Appointment booked",
    "summary": "Appointment booked for Tuesday at 9:30 am.",
    "data": { "name": "Claire Dubois" },
    "evaluation": { "successScore": 92, "goalAchieved": true, "sentiment": "positive" }
  },
  "timestamp": "2026-11-18T10:02:11.000Z"
}

Sensitive data (card numbers, codes) is masked in payloads.

Verify the signatureLink to this section

Use the timestamped V2 signature: X-Callpme-Signature-V2: t=<timestamp>,v1=<signature>, where the signature is the hex-encoded HMAC-SHA256 of the string <timestamp>.<raw body>, computed with your secret. Reject requests whose timestamp is more than 5 minutes old. The legacy signature X-Callpme-Signature: sha256=<HMAC of the raw body> is still sent for compatibility.

import crypto from "node:crypto";

export function verifyCallpme(rawBody, header, secret, toleranceSec = 300) {
  const parts = Object.fromEntries(header.split(",").map((kv) => kv.split("=")));
  const t = Number(parts.t);
  if (!t || Math.abs(Date.now() / 1000 - t) > toleranceSec) return false;
  const expected = crypto
    .createHmac("sha256", secret)
    .update(`${t}.${rawBody}`)
    .digest("hex");
  const a = Buffer.from(expected);
  const b = Buffer.from(parts.v1 ?? "");
  return a.length === b.length && crypto.timingSafeEqual(a, b);
}

// Express: read the raw body before any JSON parser.
app.post("/webhooks/callpme", express.raw({ type: "application/json" }), (req, res) => {
  const ok = verifyCallpme(
    req.body.toString("utf8"),
    req.get("X-Callpme-Signature-V2") ?? "",
    process.env.CALLPME_WEBHOOK_SECRET,
  );
  if (!ok) return res.sendStatus(401);
  const { event, data } = JSON.parse(req.body);
  // … idempotent processing, for example keyed on X-Callpme-Delivery
  res.sendStatus(200);
});

Delivery and retriesLink to this section

  • A delivery succeeds if your server responds with a 2xx status code within 8 seconds. Redirects are not followed.
  • On failure, retries take place after 1 min, 5 min, 30 min, 2 h and 6 h (6 attempts in total). The X-Callpme-Attempt header gives the attempt number; X-Callpme-Delivery stays the same.
  • After 15 consecutive failures, the webhook is disabled automatically and an email is sent. Re-enable it with the “Active” toggle once the issue is fixed.
  • The “Delivery log” keeps 30 days of history; “Redeliver” sends an event again.