API quickstart: your first request and webhook
Create a Ladoo API key, list your calls, subscribe to call.completed and check each event's signature, with copy-paste examples in curl, Node and Python.
By the Ladoo team · Updated
This guide takes about ten minutes. By the end you'll have listed your workspace's calls from your own code and received a signed call.completed event at your own server.
The API lives at https://api.tryladoo.com/v1. Every request and response is JSON. The full list of endpoints is in the API reference.
1. Create an API key
- In Ladoo, go to Settings → Developers.
- Under API keys, click New API key.
- Give it a name, like
My CRM sync. Under Access, choose Full access for this guide. You can make a narrower key later; see Authentication and scopes. - Click Create key, then copy the key. It starts with
lsk_and is shown only once.
Keep the key on your server, never in a web page or an app people download. Put it in an environment variable for the examples below:
export LADOO_API_KEY="lsk_…"
2. List your calls
Send the key as a bearer token. GET /v1/calls returns the newest calls first.
curl
curl "https://api.tryladoo.com/v1/calls?limit=5" \
-H "Authorization: Bearer $LADOO_API_KEY"
Node (18 or later, no packages needed)
const res = await fetch("https://api.tryladoo.com/v1/calls?limit=5", {
headers: { Authorization: `Bearer ${process.env.LADOO_API_KEY}` },
});
if (!res.ok) throw new Error(`Ladoo answered ${res.status}: ${await res.text()}`);
const { data, next_cursor } = await res.json();
for (const call of data) console.log(call.started_at, call.from_number, call.summary);
Python (3.9 or later, with requests)
import os
import requests
res = requests.get(
"https://api.tryladoo.com/v1/calls",
params={"limit": 5},
headers={"Authorization": f"Bearer {os.environ['LADOO_API_KEY']}"},
timeout=30,
)
res.raise_for_status()
for call in res.json()["data"]:
print(call["started_at"], call["from_number"], call["summary"])
The reply is a page of calls:
{
"data": [
{
"id": "c2a1e9b8-4f3d-4a2c-9b1e-8d7c6b5a4f3e",
"kind": "live",
"channel": "phone",
"status": "completed",
"from_number": "+15555550100",
"started_at": "2026-11-18T15:00:00.000Z",
"duration_seconds": 142,
"summary": "Caller reported a leaking water heater; message taken."
}
],
"next_cursor": "eyJ0IjoiMjAyNi0xMS0xOFQxNDoxMjowOS4wMDBaIiwiaWQiOiJiN2UyZDRjMS0zYTVmLTRlNmItOGM5ZC0wZTFmMmEzYjRjNWQifQ"
}
The sample leaves out some fields. To get the next page, send next_cursor back as ?cursor=. When it's null, there are no more. limit can be up to 200, and from, to, outcome, channel and urgency narrow the list. GET /v1/calls/{id} returns one call with its transcript.
3. Subscribe to call.completed
A webhook endpoint is an https address of yours that Ladoo calls when something happens. Create one for call.completed, which is sent when a live call or chat ends.
curl https://api.tryladoo.com/v1/webhook-endpoints \
-H "Authorization: Bearer $LADOO_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"url": "https://hooks.riveraplumbing.test/ladoo",
"events": ["call.completed"],
"description": "Calls into our CRM"
}'
The reply includes secret, the endpoint's signing secret. Like the key, it's shown only once: save it on your server as LADOO_WEBHOOK_SECRET.
The address must start with https:// and be reachable from the internet on port 443. While you're building, a tunnel to your computer works. Ladoo doesn't follow redirects.
4. Check the signature
Every event carries a Ladoo-Signature header like t=1763478245,v1=5d41402abc…. To be sure an event came from Ladoo:
- Read the raw request body, as bytes, before any JSON parsing.
- Compute HMAC-SHA256 of
<t>.<raw body>with your signing secret, as hex. - Compare it with each
v1value in the header. Right after you rotate the secret there are two, one for each secret, and either can match. - Refuse the event if
tis more than 5 minutes from now.
Node
import { createHmac, timingSafeEqual } from "node:crypto";
import http from "node:http";
function verifyLadooSignature(secret, header, rawBody, toleranceSeconds = 300) {
const parts = header.split(",").map((p) => p.trim().split("="));
const t = Number(parts.find(([k]) => k === "t")?.[1]);
if (!Number.isInteger(t) || Math.abs(Date.now() / 1000 - t) > toleranceSeconds) return false;
const expected = createHmac("sha256", secret).update(`${t}.`).update(rawBody).digest();
return parts
.filter(([k]) => k === "v1")
.some(([, sig]) => {
const actual = Buffer.from(sig ?? "", "hex");
return actual.length === expected.length && timingSafeEqual(actual, expected);
});
}
http
.createServer((req, res) => {
const chunks = [];
req.on("data", (chunk) => chunks.push(chunk));
req.on("end", () => {
const body = Buffer.concat(chunks);
const header = req.headers["ladoo-signature"] ?? "";
if (!verifyLadooSignature(process.env.LADOO_WEBHOOK_SECRET, header, body)) {
res.writeHead(400).end("bad signature");
return;
}
const event = JSON.parse(body);
console.log(event.type, event.data.call?.summary);
res.writeHead(200).end("ok");
});
})
.listen(3000);
Python
import hashlib
import hmac
import time
def verify_ladoo_signature(secret: str, header: str, raw_body: bytes, tolerance: int = 300) -> bool:
parts = [p.strip().split("=", 1) for p in header.split(",") if "=" in p]
try:
t = int(next(v for k, v in parts if k == "t"))
except (StopIteration, ValueError):
return False
if abs(time.time() - t) > tolerance:
return False
expected = hmac.new(
secret.encode(), f"{t}.".encode() + raw_body, hashlib.sha256
).hexdigest()
return any(hmac.compare_digest(v, expected) for k, v in parts if k == "v1")
In Flask, pass request.get_data() as raw_body. In Django, pass request.body.
Answer with any 2xx status within 10 seconds. Do slow work after you answer, or Ladoo counts the delivery as failed and tries again.
5. Send a test event
You don't need a real call to try your endpoint. Send a test event with sample data:
curl https://api.tryladoo.com/v1/webhook-endpoints/ENDPOINT_ID/test \
-H "Authorization: Bearer $LADOO_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "type": "call.completed" }'
It's signed and sent like any other event. GET /v1/webhook-endpoints/{id}/deliveries shows what your server answered. You can also click Send test event next to the endpoint under Settings → Developers.
Next steps
- Authentication and scopes: give each integration a key that can do only what it needs.
- Webhook events: every event, what it sends, and how retries work.
- Errors and rate limits: what to do when a request fails.
Related guides: Authentication and scopes, Webhooks: events, signatures and retries and The .lassi-workflow.json file format.
Still stuck?
Ask our support agent (it runs on Ladoo), or email the team.