getCall — webhooks push the same data the moment it’s available.
Configure
Set your webhook URL in the Sarj.ai Dashboard (one URL per organization). The endpoint must:- Be reachable over HTTPS (HTTP also works for staging, not recommended for production)
- Return 2xx within 10 seconds
- Be idempotent — see Retries below
Payload
Every notification has the shape:payload.type discriminates the variant.
Completed call (type: "complete")
Fires when the call reached the customer and finished. Includes the full recording URL, transcript, and report.
Not-completed call
Fires when the call never reached the customer.type indicates why:
type | Meaning |
|---|---|
no_answer | Rang, no pickup |
user_rejected | Customer hung up / rejected the call |
user_unavailable | Carrier returned unavailable (off, out of coverage) |
automation | Hit an IVR / voicemail / non-human |
failed | Telephony failure with no SIP-level reason |
Retries
Sarj.ai retries up to 3 times on failure (network error, timeout, non-2xx response) with a 2-second delay between attempts. Each attempt has a 10-second timeout. After 3 failures the delivery is marked failed and the per-call webhook state is recorded server-side. You can re-fetch the call detail viaGET /calls/{call_id} at any time — the data is durable.
Verifying authenticity
Webhook signature verification (HMAC) is not yet shipped. For now, lock down your webhook endpoint by IP allow-listing (contact support for the current source IP range) or by adding a hard-to-guess secret path component to the URL (e.g.
https://your-app.com/webhooks/sarj/c8f4a2b6e1d…).Testing
The dashboard offers a “Send test webhook” button to fire a syntheticcomplete payload at your URL — use this while standing up the integration. After that, place a real test call to verify end-to-end.
