Upload CSV & Create Batch
Upload a CSV file of phone numbers and create a batch calling job.
POST /batch/upload
Authentication: JWT cookie (Developer+)
Content-Type: multipart/form-data
| Field | Type | Required | Description |
|---|
file | file | ✅ | CSV file with phone_number column |
name | string | ✅ | Batch job name |
agent_id | string | ✅ | Agent to make the calls |
agent_phone_number | string | ✅ | Source phone number |
scheduled_time | string | — | ISO 8601 datetime for scheduling |
timezone | string | — | Timezone for scheduling |
curl -X POST "https://api.vaani.ai/batch/upload" \
-H "Cookie: access_token=YOUR_TOKEN" \
-F "[email protected]" \
-F "name=Feb Appointment Reminders" \
-F "agent_id=ag_550e8400" \
-F "agent_phone_number=+16505551234"
Send Batch Now
Dispatch a batch job immediately.
POST /batch/{batch_id}/send
curl -X POST "https://api.vaani.ai/batch/batch_001/send" \
-H "Cookie: access_token=YOUR_TOKEN"
Get Batch Status
GET /batch/{batch_id}
curl -X GET "https://api.vaani.ai/batch/batch_001" \
-H "Cookie: access_token=YOUR_TOKEN"
List All Batches
GET /batch
Returns all batch jobs in the workspace, ordered by creation date.
Get Batch Items
GET /batch/{batch_id}/items
Returns per-phone-number status:
{
"items": [
{
"id": "item_001",
"phone_number": "+14155551234",
"status": "completed",
"call_log_id": "550e8400-e29b-41d4-a716-446655440000",
"dynamic_variables": {"customer_name": "John Smith"}
},
{
"id": "item_002",
"phone_number": "+14155555678",
"status": "failed",
"error": "SIP call failed: no answer"
}
]
}
Delete Batch
DELETE /batch/{batch_id}
Cannot delete a batch that is currently running. Wait for completion first.
curl -X DELETE "https://api.vaani.ai/batch/batch_001" \
-H "Cookie: access_token=YOUR_TOKEN"