Skip to main content

Prerequisites

  • A Sarj.ai account
  • An API key — see Step 1 below
  • Python: pip install sarj-platform-sdk (recommended over raw requests)
If you’re using the MCP Server instead of the REST API, skip Step 1 — MCP clients receive an API key automatically via OAuth on first connect.
1

Get your API key

  1. Sign in at platform.sarj.ai
  2. Click Generate Key
  3. Copy the key and store it securely
Your API key is shown only once. Store it as an environment variable:
2

Verify your setup

Confirm the API is reachable with a quick health check.
Expected response:
3

Create your first call

Trigger an outbound voice call. Requires your API key and a scenario ID.
Create a scenario at platform.sarj.ai/scenarios; copy its scn_-prefixed ID.
Expected response (202 Accepted):
4

Track the call

Calls progress queuedin_progresscompleted. Poll GET /api/v1/calls/{call_id} for recording_url, transcript, and report, or configure webhooks for push updates. The outcome report is generated asynchronously and typically appears within a couple of minutes after a call completes; calls that end without completing (e.g. failed or unanswered) never get one. In rare failure cases even a completed call never receives a report, so cap how long you poll and treat the webhook as authoritative.

Response format

All endpoints use a standard response envelope. Success:
Error:
Always branch on error.type — the message field is for humans only.
Include meta.request_id in support tickets.
Last modified on August 2, 2026