Batch Calls — client.batch_call
Run outbound calling campaigns over a list of contacts.
create(**params) → BatchCallStatusResponse
POST /v1/batch-calls
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
agent_id | str | yes | — | Agent that makes the calls. |
from_number | str | yes | — | Registered caller ID. |
contacts | list[dict] | yes | — | Each: {"phone_number": "+1…", "dynamic_variables": {...}}. |
name | str | no | None | Campaign name. |
max_concurrent_calls | int | no | 5 | Simultaneous calls (1–100). |
retry_attempts | int | no | 1 | Retries per failed contact (0–5). |
Returns BatchCallStatusResponse: batch_call_id, name, status, total, pending, active, completed, failed, processed, counts, progress_percent, started_at, completed_at.
batch = client.batch_call.create(
agent_id="ag_abc123",
from_number="+14155550123",
name="March outreach",
contacts=[
{"phone_number": "+14155551001", "dynamic_variables": {"name": "Sam"}},
{"phone_number": "+14155551002"},
],
max_concurrent_calls=10,
)
client.batch_call.start(batch.batch_call_id)
Read & lifecycle
retrieve(batch_call_id) → BatchCallStatusResponse— live status/counts.list(skip=0, limit=20, status=None) → list[BatchCallResponse]list_active() → list[BatchCallStatusResponse]list_items(batch_call_id, status=None, limit=100) → list[BatchCallItemResponse]— per-contact results.delete(batch_call_id) → None(only when not running).start(id)/pause(id)/resume(id)/cancel(id)→BatchCallStatusResponse.