Webhooks
Receive Callpme events in real time: event list, payload format, HMAC signature and retries.
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
- Step 1 :
Enter the URL
“Endpoint URL”: a public HTTPS address on your server.
- Step 2 :
Choose the events
Select the events under “Events to send”.
- Step 3 :
Click “Add webhook”.
- Step 4 :
Retrieve the secret
“Signing secret” (format
whsec_…): it is used to verify the requests you receive. - Step 5 :
Use “Send test event” to receive a
pingevent.
EventsLink to this section
| Event | Trigger |
|---|---|
agent.created, agent.updated, agent.deleted | An agent is created, updated or deleted |
call.started | A call starts |
call.completed | A call ends, with summary, outcome, captured data and evaluation |
call.failed | A call fails |
call.transferred | A call is transferred to a person or to another agent |
appointment.booked, appointment.cancelled | An appointment is booked or cancelled |
lead.created | New lead, message, callback request or ticket |
conversation.message.received | A message is received on a text channel |
campaign.completed | A campaign ends |
payment.completed | A payment is collected during a call |
payment_plan.installment_paid, payment_plan.overdue, payment_plan.completed | Payment plan tracking |
FormatLink to this section
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-Attemptheader gives the attempt number;X-Callpme-Deliverystays 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.