Skip to main content

Batch Calls

Manage high-volume outbound calling campaigns. The full lifecycle is:
  1. Create a batch call (status: draft)
  2. Add contacts via folder, contact_ids, inline contacts, or upload after creation
  3. Schedule the batch (status: scheduled) — contacts are distributed across days using your timezone, working days, and daily call limits
  4. Pause / Resume as needed
  5. Monitor via analytics and the contacts list endpoint
  6. Delete when done (draft/failed/cancelled only)
Scheduling is database-driven: contacts receive individual scheduled_at timestamps spread across your calling window. A background job fires them at the right time. This matches the dashboard/internal scheduling model exactly.

List Batch Calls

Query parameters:
ParameterTypeDefaultDescription
agent_idUUIDFilter by agent
statusstringFilter by status: draft, scheduled, active, paused, completed, failed, cancelled
limitint501-100
offsetint0Pagination offset
Response: data (array), pagination (total, limit, offset, has_more), meta.

Create Batch Call

Creates a new batch call in draft status. Contacts can be attached at creation time via three methods (or combined):
FieldTypeRequiredDescription
namestringYes1-255 characters
agent_idUUIDYesAgent that makes the calls (must be synced)
phone_number_idsUUID[]NoOutbound number IDs. Auto-fills from agent if empty
phone_rotation_strategystringNorandom (default), sequential, or round_robin
contact_sourcestringNocsv (default), folder, or manual
contact_folder_idUUIDWhen source=folderContacts from this folder are copied into the batch
contact_idsUUID[]NoExisting contact IDs from your contacts table
contactsobject[]NoInline contacts: { phone_number, first_name?, last_name?, email?, custom_fields? }
schedule_typestringNoimmediate (default) or scheduled
scheduled_atISO datetimeWhen scheduledRequired when schedule_type is scheduled
timezonestringNoIANA timezone. Default UTC
start_timeHH:MMNoDaily window start (e.g. 09:00)
end_timeHH:MMNoDaily window end (e.g. 18:00)
working_daysint[]No1=Mon … 7=Sun. Default [1,2,3,4,5]
max_concurrent_callsintNo1-100. Default 10
max_calls_per_dayintNoCapped by your billing tier. Default 500
retry_failedboolNoDefault true
max_retry_attemptsintNo0-3. Default 2
Headers: Send X-Idempotency-Key for safe retries. Example — inline contacts:
{
  "name": "Q1 Outreach",
  "agent_id": "AGENT_UUID",
  "phone_number_ids": ["PHONE_UUID"],
  "contacts": [
    { "phone_number": "+15551234567", "first_name": "Alice" },
    { "phone_number": "+15559876543", "first_name": "Bob", "last_name": "Smith" }
  ],
  "max_calls_per_day": 100,
  "start_time": "09:00",
  "end_time": "17:00"
}
Example — folder source:
{
  "name": "Folder Campaign",
  "agent_id": "AGENT_UUID",
  "contact_source": "folder",
  "contact_folder_id": "FOLDER_UUID",
  "schedule_type": "scheduled",
  "scheduled_at": "2025-02-01T09:00:00Z",
  "timezone": "America/New_York"
}
Example — existing contact IDs:
{
  "name": "Re-engage",
  "agent_id": "AGENT_UUID",
  "contact_ids": ["CONTACT_UUID_1", "CONTACT_UUID_2"]
}
Response: 200 with data (batch call object including id, status, total_contacts) and meta.

Get Batch Call

QueryTypeDefaultDescription
refreshboolfalseSync completed_contacts from the telephony provider
Response: data (full batch call object), meta.

Update Batch Call

Allowed when status is draft, scheduled, or paused. Body (all optional): name, phone_number_ids, phone_rotation_strategy, scheduled_at, start_time, end_time, working_days, max_concurrent_calls, max_calls_per_day (capped by billing tier), retry_failed, max_retry_attempts. If scheduling parameters (scheduled_at, start_time, end_time, max_calls_per_day, working_days) are changed on a scheduled or paused batch, contacts are automatically redistributed across the new schedule.

Delete Batch Call

Deletes the batch and all its campaign contacts. Only allowed when status is draft, failed, or cancelled. Response: 200 with data: { "id", "deleted": true }.

List Batch Call Contacts

Lists all contacts attached to a batch call with their scheduling and execution status.
QueryTypeDefaultDescription
statusstringFilter: pending, scheduled, completed, failed
limitint501-200
offsetint0Pagination offset
Response: data (array of campaign contact objects with phone_number, first_name, status, scheduled_at, etc.), pagination, meta.

Upload Contacts to Batch Call

Add contacts to a draft batch call. Two input methods:
FieldTypeDescription
contactsobject[]Array of { phone_number, first_name?, last_name?, email?, custom_fields? }
csv_base64stringBase64-encoded CSV (columns: phone_number, first_name, last_name, email)
add_to_folderboolAlso save contacts to a contact folder (default true)
folder_idUUIDTarget folder. Auto-creates one if omitted
Response: data: { "batch_call_id", "contacts_added", "folder_id" }, meta.

Schedule Batch Call

Transitions a draft batch to scheduled. The scheduling engine:
  1. Validates the batch has an agent, phone numbers, and at least one pending contact
  2. Prepares call payloads with phone number rotation
  3. Distributes contacts across days using timezone, working_days, start_time/end_time, and max_calls_per_day
  4. Assigns each contact an individual scheduled_at timestamp
  5. A background job fires calls at their scheduled times
Returns 422 if prerequisites are not met (no contacts, agent not synced, etc.). Response: data: { "batch_call_id", "status": "scheduled", "contacts_scheduled", "message" }, meta.

Pause Batch Call

Pauses an active or scheduled batch. Pending calls are held until resumed. Returns 422 if the batch is not in active or scheduled status.

Resume Batch Call

Resumes a paused batch. If the original scheduled_at is in the future, status returns to scheduled; otherwise, it becomes active. Returns 422 if the batch is not in paused status.

Get Batch Call Analytics

Returns detailed stats: total_contacts, completed_contacts, successful_contacts, failed_contacts, voicemail_contacts, no_answer_contacts, total_cost_usd, average_duration_seconds, and more.

Bulk Delete Batch Calls

Body: { "ids": ["uuid1", "uuid2", ...] } Deletes only batches in draft, failed, or cancelled status. Others are skipped. Response: data: { "deleted_count", "failed_count" }, meta.

Batch Call Lifecycle

draft --> scheduled --> active --> completed
  |          |           |
  |          +-- paused --+
  |                       |
  +-- failed / cancelled <+
StatusDescription
draftCreated, accepts contact uploads and updates
scheduledContacts distributed with timestamps, waiting for execution
activeCalls are being fired by the background job
pausedExecution halted; can be resumed
completedAll contacts processed
failedScheduling or execution error
cancelledManually cancelled