Skip to main content
POST
/
batch-call
curl -X POST "https://api.zudu.ai/batch-call" \
  -H "X-API-KEY: sk_Abc123Def456..." \
  -H "X-API-SECRET: s3cr3t_Xyz789..." \
  -d '{
    "name": "Customer Follow-up Campaign",
    "from_number": "+15551234567",
    "agent_id": "agent_1234567890",
    "tasks": [
      {
        "to_number": "+15559876543",
        "dynamic_variables": {
          "customer_name": "John Doe"
        },
      {
        "to_number": "+15555555555",
        "dynamic_variables": {
          "customer_name": "Jane Smith"
        }
    ],
    "trigger_timestamp": 1705320000,
    "timezone": "America/New_York"
  }'
{
  "message": "Batch call created successfully",
  "status": "success",
  "data": {
    "batch_call_id": "batch_abc123...",
    "name": "Customer Follow-up Campaign",
    "status": "SCHEDULED",
    "total_task_count": 2,
    "created_at": "2024-01-15T10:30:00Z"
  }
Create a batch call campaign with multiple phone numbers to call. Batch calls can be executed immediately or scheduled for a future time.
curl -X POST "https://api.zudu.ai/batch-call" \
  -H "X-API-KEY: sk_Abc123Def456..." \
  -H "X-API-SECRET: s3cr3t_Xyz789..." \
  -d '{
    "name": "Customer Follow-up Campaign",
    "from_number": "+15551234567",
    "agent_id": "agent_1234567890",
    "tasks": [
      {
        "to_number": "+15559876543",
        "dynamic_variables": {
          "customer_name": "John Doe"
        },
      {
        "to_number": "+15555555555",
        "dynamic_variables": {
          "customer_name": "Jane Smith"
        }
    ],
    "trigger_timestamp": 1705320000,
    "timezone": "America/New_York"
  }'
{
  "message": "Batch call created successfully",
  "status": "success",
  "data": {
    "batch_call_id": "batch_abc123...",
    "name": "Customer Follow-up Campaign",
    "status": "SCHEDULED",
    "total_task_count": 2,
    "created_at": "2024-01-15T10:30:00Z"
  }

Headers

X-API-KEY
string
required
Your API key (format: sk_...)
X-API-SECRET
string
required
Your API secret (format: s3cr3t_...)

Request Body

from_number
string
required
Source phone number in E.164 formatExample: +15551234567Must be different from all to_number values in tasks.
tasks
array
required
Array of call tasks (1-1000 tasks)Each task object:
  • to_number (string, required): Destination phone number in E.164 format
  • dynamic_variables (object, optional): Variables to pass to the agent (max 5KB per task)
name
string
Descriptive name for the batch call (max 255 characters)
agent_id
string
Agent ID to use for all tasks (format: agent_...)If not provided, each task must specify its own agent.
trigger_timestamp
number
Unix timestamp (seconds) for scheduled executionMust be in the future. If not provided and send_now is false, defaults to immediate execution.
timezone
string
Timezone identifier (e.g., UTC, America/New_York)Used for scheduling calculations.
status
string
Initial status: draft, scheduled, or sentDefault: Determined automatically based on send_now and trigger_timestamp
send_now
boolean
Execute immediately (default: false)If true, batch call executes immediately regardless of trigger_timestamp.

Response Fields

batch_call_id
string
Unique identifier for the batch call
status
string
Current status: DRAFT, SCHEDULED, SENT, COMPLETED, FAILED
total_task_count
number
Number of tasks in the batch call

Error Responses

error
string
Bad Request - Validation error
{
  "message": "Request validation failed",
  "status": "error",
  "error": "from_number - Phone number must be in E.164 format"
}
error
string
Payment Required - Insufficient credits
{
  "message": "Insufficient credits",
  "status": "error",
  "error": "Insufficient credits: Required $10.50, Current balance: $5.00"
}

Notes

  • Phone numbers must be in E.164 format (e.g., +15551234567)
  • No duplicate phone numbers allowed in tasks
  • from_number cannot match any to_number
  • Maximum 1000 tasks per batch call
  • Dynamic variables are limited to 5KB per task
  • Batch calls with status="draft" are not executed automatically