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

SettingWhere
Webhook URL and secretDashboard: Console → Projects
Which events you handleCode: your own server endpoint
Low-balance alert levelDashboard: 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.

POST https://yourapp.in/hooks/titli
{
  "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

EventWhendata
Calls
participant.joinedSomeone joins{ call_id, room, end_user_id, role, at }
call.startedA second person joins (the call is connected){ call_id, room, type, payer_end_user_id, connected_at }
participant.leftSomeone leaves{ call_id, room, end_user_id, at }
call.endedThe call ends, for any reason{ call, receipt, receipt_signature }
Balance
balance.lowBalance falls below your alert level (once, until it rises above it again){ balance, threshold, currency, minutes_left, alert_minutes, reason }
balance.zeroBalance 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.connectedThe host picked up and the call is connected{ call } (call object)
live_host.call.endedA Live Hosts call ends, for any reason{ call, receipt, receipt_signature }
Gifts
gift.sentA gift reached the host (also for a gift that was pending first){ gift, receipt, receipt_signature } (gift object)
gift.failedA pending gift was refused; its cost is back in your balance{ gift, refunded: true }
Live Streams (beta)
stream.startedA live that one of your viewers is watching started playing{ stream } (stream object)
stream.endedThat live ended{ stream }
viewer.kickedThe host removed or blocked one of your viewers{ viewer, action, receipt, receipt_signature }
viewer.endedWe 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.testYou 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.

verify.js
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));
}

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.

Start free