Endpoints
| Method | Path | Description |
|---|---|---|
GET | /v1/test-calls | List test-call runs |
POST | /v1/test-calls | Start a single test-call run |
GET | /v1/test-call-batches | List batches |
POST | /v1/test-call-batches | Start a batch |
GET | /v1/test-call-batches/{batch_id} | Retrieve batch status and child runs |
Test call run object
| Field | Type | Description |
|---|---|---|
id | integer | Test-call run id |
target_type | string | agent or phone_number — what the bot is calling |
target_id | integer | Id of the target agent / phone number |
direction | string | outbound (bot places the call) or inbound (bot answers) |
target_number | string | Optional E.164 — override for the bot’s perceived caller id |
scenario_prompt | string | Free-form role-play prompt driving the test bot |
mode | string | bot (bot-to-bot) or sip (SIP loopback) |
status | string | queued, in_progress, completed, failed |
charge_multiplier | integer | Multiplier applied to normal call billing (default 2) |
estimated_cost_cents | integer | Pre-call estimate in USD cents |
call_id | integer | null | The real call log the test produced |
sip_call_id | integer | null | For mode=sip: the inbound call log the webhook created |
error_message | string | Populated on status=failed |
batch_id | integer | null | Parent batch id if this run is part of a batch |
List runs
Query parameters
| Param | Type | Description |
|---|---|---|
limit | integer | Default 50, max 200 |
offset | integer | |
target_type | string | Filter by agent or phone_number |
status | string | Filter by status |
agent_id | integer | Filter by target agent |
Start a single run
Request fields
| Field | Type | Required | Description |
|---|---|---|---|
target_type | string | yes | agent or phone_number |
target_id | integer | yes | Id of the target in this org |
direction | string | yes | outbound or inbound |
target_number | string | no | E.164 — defaults to a demo number if omitted |
scenario_prompt | string | no | Drives the test bot |
mode | string | no | bot (default) or sip |
consent_to_charge | boolean | yes | Must be true — required to prevent accidental charges |
201 Created with the run. Status starts at queued and
advances to completed or failed; poll the list endpoint or
GET /v1/calls/{call_id} once
call_id is set.
Errors:
| Status | Condition |
|---|---|
400 | consent_to_charge missing / false |
402 | Insufficient balance |
404 | Target agent or phone number not found |
429 | Max concurrent test-call runs per org reached |
Start a batch
A batch executes the same scenario N times in parallel. The response returns immediately with a batch inin_progress; poll the detail
endpoint for per-run results.
Request fields
| Field | Type | Required | Description |
|---|---|---|---|
target_type | string | yes | agent or phone_number |
target_id | integer | yes | |
direction | string | yes | |
run_count | integer | yes | 1–20 |
stagger_seconds | integer | no | Delay between spawning successive runs (0–60) |
scenario_prompts | array of string | no | Rotates through prompts per run (modulo) |
scenario_prompt | string | no | Same prompt for all runs (alternative to array) |
target_number | string | no | |
mode | string | no | |
consent_to_charge | boolean | yes |
201 Created with the batch row:
Get batch detail
run_ids
is a list of child-run ids, not nested run objects. Fetch each run via
GET /v1/test-calls?limit=... or by following the
call_id on each run to GET /v1/calls/{call_id}.
Related
Agents
Build the agent being tested.
Calls
Inspect the resulting call logs and transcripts.