Skip to main content

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
FieldTypeRequiredDescription
filefileCSV file with phone_number column
namestringBatch job name
agent_idstringAgent to make the calls
agent_phone_numberstringSource phone number
scheduled_timestringISO 8601 datetime for scheduling
timezonestringTimezone 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"