# Callingly API Webhooks (v2)

Source: https://callingly.com/help/article/callingly-api-v2-webhooks

Webhooks send events from Callingly to your own URL as they happen: a new lead, a finished AI call, a lead put through to your team, a text from a lead. Your system gets each one within seconds, so it doesn't have to keep asking the API what changed.

<div class="row relevant"><p><span class="material-icons">supervisor_account</span> For developers using the <a href="https://callingly.com/help/article/using-the-callingly-api-v2" target="_blank">Callingly API (v2)</a>. <em class="float-right-desktop">Approx. reading time 5 min.</em></p></div>

<div class="callout-green mb-2"><span class="material-icons">info_outline</span><div><strong>Note</strong>: This article is about webhooks <em>from</em> Callingly. To send leads <em>into</em> Callingly from another app, see <a href="https://callingly.com/help/article/69-integrate-callingly-using-a-webhook" target="_blank">Integrate Callingly Using A Webhook</a>.</div></div>

<h2 id="events">Events</h2>

<table class="table-striped"><thead><tr><th>Event</th><th>Sent when</th></tr></thead><tbody>
<tr><td><code>lead.created</code></td><td>A lead is added, from any source.</td></tr>
<tr><td><code>lead.updated</code></td><td>A lead's details change: contact details, stage, owner, tags or a custom field. <code>changes</code> lists what changed.</td></tr>
<tr><td><code>call.completed</code></td><td>An AI call ends and its summary and recording are ready.</td></tr>
<tr><td><code>warm_transfer.connected</code></td><td>A rep picks up a lead your AI is putting through, while they're still talking.</td></tr>
<tr><td><code>warm_transfer.completed</code></td><td>That conversation ends, or the transfer failed because no rep answered or the lead hung up first.</td></tr>
<tr><td><code>scheduled_call.created</code></td><td>A call with a lead is booked, by the AI, a rep or the API.</td></tr>
<tr><td><code>scheduled_sms.created</code></td><td>A text to a lead is scheduled.</td></tr>
<tr><td><code>sms.received</code></td><td>A lead texts you.</td></tr>
<tr><td><code>sms.sent</code></td><td>A text goes to a lead, from the AI, a rep, a sequence or the API.</td></tr>
</tbody></table>

<h2 id="subscribe">Subscribe</h2>

Send the URL and the events you want to `POST /v2/webhooks`:

<pre>curl https://api.callingly.com/v2/webhooks \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/callingly", "events": ["call.completed", "warm_transfer.connected"]}'
</pre>

The response includes a `secret`, used to sign every event. **It's shown only this once**, so store it with your integration.

The URL must use `https` and be reachable from the internet. An account can have up to 100 subscriptions. `GET /v2/webhooks` lists your subscriptions and `DELETE /v2/webhooks/{id}` removes one. Each subscription belongs to the API key (or connected app) that created it, and only that key can see or remove it.

<h3 id="filters">Only the events you need</h3>

Add `filters` to narrow what's sent:

* `team_id`: only one team's events.
* `direction`: `inbound` or `outbound` calls and texts.
* `outcome`: for `call.completed`, only some outcomes, such as `["warm_transfer", "scheduled_call"]`.
* `fields`: for `lead.updated`, only when one of these fields changed, such as `["stage", "owner"]`.
* `status` and `failure_reason`: for `warm_transfer.completed`, such as `{"status": ["failed"]}` to hear only about missed transfers.

<h2 id="what-you-receive">What You Receive</h2>

Each event is a `POST` to your URL:

<pre>{
  "id": "evt_01jq3v7kz8m2x4n6p9r1s5t0w3",
  "type": "lead.updated",
  "created_at": "2026-11-17T15:04:05Z",
  "data": {
    "id": "48213377",
    "first_name": "Jane",
    "stage": "Qualified",
    ...
    "changes": [{"field": "stage", "from": "New", "to": "Qualified"}]
  }
}
</pre>

`data` is the same as the API returns for that record. Events about a call, transfer, booking or text also include the `lead`. A call's transcript is included only if your key can read transcripts.

<h2 id="verify">Check The Signature</h2>

Every request has an `X-Signature` header like `t=1763391845,v1=5f2b…`. To check it came from Callingly:

<dl><dt>1.</dt><dd>Take <code>t</code> and the raw request body, and join them with a dot: <code>t.body</code>.</dd><dt>2.</dt><dd>Compute the HMAC-SHA256 of that string with your secret, as hex.</dd><dt>3.</dt><dd>Compare it with <code>v1</code>, and reject the request if they differ or if <code>t</code> is more than 5 minutes old.</dd></dl>

In Node.js:

<pre>const crypto = require('crypto');

function isFromCallingly(rawBody, header, secret) {
  const match = /^t=(\d+),v1=([0-9a-f]{64})$/.exec(header || '');
  if (!match) return false;
  const [, t, v1] = match;
  if (Math.abs(Date.now() / 1000 - Number(t)) > 300) return false;
  const expected = crypto.createHmac('sha256', secret).update(`${t}.${rawBody}`).digest('hex');
  return crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(v1));
}
</pre>

<h2 id="retries">Answer Quickly; We Retry</h2>

Reply with any `2xx` status as soon as you've received the event, and do slow work afterwards. If your URL doesn't answer with a `2xx`, Callingly tries again after 1, 5, 15 and 30 minutes, after an hour, then every 2 hours, for up to 24 hours. A retry has the same `id`, so you can skip events you've already handled.

Reply `410 Gone` to stop for good: the subscription is deleted.

<h2 id="common-questions">Common Questions</h2>

#### My subscription disappeared. Why?

Subscriptions are deleted when your URL answers `410`, when the API key that made them is deleted, or when the connected app that made them is disconnected from <a href="https://callingly.com/help/article/connected-apps" target="_blank">Connected Apps</a>.

#### Why didn't I get an event for a lead?

Events only include what the key's user can see. A key made by an Agent or Manager who can't see a lead gets no events about it. Check your `filters` too.

#### Do these replace the webhooks in Settings → Webhooks?

Those keep working as they do. Use these for new integrations: they're signed, retried, and cover AI calls, warm transfers and texts.
