Skip to content

Webhooks

A webhook sends an HTTPS POST to your server when something happens in your workspace, for example when a call ends. Add endpoints in the dashboard under Settings → Webhooks or with the Webhooks endpoints.

Event When
call.started A call was answered
call.ended A call ended and its summary, outcome and cost are ready
call.transferred The agent transferred the caller to a person
booking.created The agent booked an appointment in Google Calendar
booking.changed The agent moved or cancelled an appointment

Each endpoint receives only the events it subscribes to. Send test delivers a webhook.test event so you can check your endpoint.

Every event has the same envelope. data depends on the type.

{
"id": "evt_01JG...",
"type": "call.ended",
"created_at": "2026-12-01T15:13:52Z",
"workspace_id": "ws_01JA...",
"data": {
"call_id": "call_01JG...",
"agent_id": "agt_01JF...",
"direction": "inbound",
"from": "+919845000210",
"to": "+918041230077",
"started_at": "2026-12-01T15:12:00.000Z",
"test": false,
"ended_at": "2026-12-01T15:13:52.000Z",
"duration_s": 112,
"billed_minutes": 2,
"outcome": "booked",
"language": "hi",
"summary": "Rahul booked teeth cleaning for Wed 6:30 PM.",
"extracted": { "name": "Rahul Verma", "slot": "2026-12-02T13:00:00Z" },
"cost": { "amount": 950, "currency": "INR", "unit": "paise" },
"recording_url": "https://api.orvoca.com/v1/calls/call_01JG.../recording"
}
}

recording_url needs your API key: it answers with a short-lived link to the audio. It is null when the call wasn’t recorded.

Call events from test calls have "test": true in data. They go to the same endpoints as real ones, so check the flag if your handler does anything real, like sending a message or updating your CRM.

Every delivery has an Orvoca-Signature header:

Orvoca-Signature: t=1764602032,v1=5f2b...

v1 is the hex HMAC-SHA256 of t, a dot, and the raw request body, keyed with the endpoint’s signing secret (whsec_…, shown once when you add the endpoint). Check it before you trust an event, and reject events older than 5 minutes:

import { createHmac, timingSafeEqual } from 'node:crypto';
export function verifyOrvoca(rawBody, header, secret) {
const parts = Object.fromEntries(header.split(',').map((p) => p.split('=')));
const t = Number(parts.t);
if (!t || Math.abs(Date.now() / 1000 - t) > 300) return false;
const expected = createHmac('sha256', secret).update(`${t}.${rawBody}`).digest();
const given = Buffer.from(parts.v1 ?? '', 'hex');
return given.length === expected.length && timingSafeEqual(given, expected);
}

Use the raw body exactly as received. Parsing the JSON and serialising it again changes the bytes, and the signature won’t match.

Rotate secret issues a new secret, and the old one stops working at once. Update your server straight after.

  • Reply with any 2xx status within 10 seconds. Anything else, or no reply, counts as a failure.
  • A failed delivery is retried after 30 seconds, 2 minutes, 10 minutes, 30 minutes, then 1, 2, 4 and 6 hours, then every 6 hours until 24 hours have passed.
  • An event can arrive more than once. Use its id to skip events you’ve already handled.
  • Events can arrive out of order. Compare created_at if order matters to you.
  • The last 50 deliveries to each endpoint, with their status codes, are in the dashboard and in the API (Recent deliveries).
  • Endpoints must be https:// URLs on a public server.