Webhooks
Optional signed events for your server, so it knows what happened in every call. Not needed for Quick mode.
Set in your dashboard vs. set in code
| Setting | Where |
|---|---|
| Webhook URL and secret | Dashboard: Console → Projects |
| Which events you handle | Code: your own server endpoint |
| Low-balance alert level | Dashboard: Console → Settings |
Webhooks are optional and server-side. An app in Quick mode works without them: you need a backend only if you want these events. Set the webhook URL (and copy its secret) in Console → Projects.
Set an HTTPS URL on a project in the console (Console → Projects). It must be a public address: private and local addresses are refused, and redirects are not followed. Each delivery is a POST with the headers Titli-Event (the event name), Titli-Delivery (the event id, the same on every retry: use it to dedupe) and Titli-Signature.
{
"id": "0f8b6c1e-…",
"event": "call.ended",
"created_at": "2026-11-25T10:42:00.000Z",
"data": {
"call": { "id": "6a1f…", "type": "video", "status": "ended",
"connected_seconds": 300, "billed_minutes": 8.0, "amount": 1.6 },
"receipt": { "call_id": "6a1f…", "end_reason": "completed", "…": "…" },
"receipt_signature": "base64…"
}
}Events
| Event | When | data |
|---|---|---|
| Calls | ||
participant.joined | Someone joins | { call_id, room, end_user_id, role, at } |
call.started | A second person joins (the call is connected) | { call_id, room, type, payer_end_user_id, connected_at } |
participant.left | Someone leaves | { call_id, room, end_user_id, at } |
call.ended | The call ends, for any reason | { call, receipt, receipt_signature } |
| Balance | ||
balance.low | Balance falls below your alert level (once, until it rises above it again) | { balance, threshold, currency, minutes_left, alert_minutes, reason } |
balance.zero | Balance is used up: new calls are refused and live calls end (once, until you add balance) | { balance, currency, error_code, user_code } |
| Live Hosts | ||
live_host.call.connected | The host picked up and the call is connected | { call } (call object) |
live_host.call.ended | A Live Hosts call ends, for any reason | { call, receipt, receipt_signature } |
| Gifts | ||
gift.sent | A gift reached the host (also for a gift that was pending first) | { gift, receipt, receipt_signature } (gift object) |
gift.failed | A pending gift was refused; its cost is back in your balance | { gift, refunded: true } |
| Live Streams (beta) | ||
stream.started | A live that one of your viewers is watching started playing | { stream } (stream object) |
stream.ended | That live ended | { stream } |
viewer.kicked | The host removed or blocked one of your viewers | { viewer, action, receipt, receipt_signature } |
viewer.ended | We ended a viewer's session ourselves (the balance ran out, or Live Streams was switched off for your account) | { viewer, receipt, receipt_signature } |
| Test | ||
webhook.test | You pressed “Send test” in the console | { message, project_id, app_id } |
Balance events and stream.started / stream.ended go to every active project of the account; every other event goes to the project the call, gift or viewer belongs to. In balance.low, minutes_left is about how many minutes of calls the balance still covers at your highest price, alert_minutes is your alert level in minutes and reason is amount (your amount alert level) or minutes (your minutes alert level), whichever of the two is higher. balance.zero carries the public error code (VENDOR_BALANCE_INSUFFICIENT, short code VB-402; see Error codes). Objects that end a session carry end_code, end_user_code and end_user_message. The full objects are in the Live Hosts, Gifts and Live Streams references. Ignore event names you do not know: new ones can be added.
Verifying the signature
Titli-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256(webhook_secret, "<t>.<raw body>")>. Compute it over the raw body, before JSON parsing.
import crypto from 'node:crypto';
function verify(rawBody, header, secret) {
const p = Object.fromEntries(String(header || '').split(',').map((kv) => kv.split('=')));
if (!p.t || !p.v1) return false;
if (Math.abs(Date.now() / 1000 - Number(p.t)) > 300) return false; // older than 5 minutes
const exp = crypto.createHmac('sha256', secret).update(`${p.t}.${rawBody}`).digest('hex');
return exp.length === p.v1.length && crypto.timingSafeEqual(Buffer.from(exp), Buffer.from(p.v1));
}import hashlib, hmac, time
def verify(raw_body: bytes, header: str, secret: str) -> bool:
p = dict(kv.split("=", 1) for kv in (header or "").split(",") if "=" in kv)
if "v1" not in p or not p.get("t", "").isdigit() or abs(time.time() - int(p["t"])) > 300:
return False
exp = hmac.new(secret.encode(), p["t"].encode() + b"." + raw_body, hashlib.sha256).hexdigest()
return hmac.compare_digest(exp, p["v1"])secret is the project's webhook secret (whsec_…), used as text exactly as shown in the console. If your framework parses JSON for you, keep the raw body for this route: a body that was parsed and serialised again does not have the same bytes.
Retries
Answer with any 2xx within 8 seconds. Failed deliveries retry after 10 s, 1 min, 5 min and 30 min (5 attempts). Every attempt is logged in the console with the reason it failed (HTTP status, timeout, TLS problem or a blocked address). An event that was not delivered can be sent again from there, up to 5 times a day. Events can arrive more than once or out of order: dedupe on the event id and use the times in data.