Skip to main content
POST
/
batch-call
Create batch call
curl --request POST \
  --url http://localhost:8080/batch-call \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --header 'X-API-SECRET: <api-key>' \
  --data '
{
  "from_number": "+14157774444",
  "tasks": [
    {
      "to_number": "+12137774445",
      "dynamic_variables": {
        "first_name": "John",
        "last_name": "Doe",
        "company": "Acme Corp"
      },
      "max_retries": 3
    }
  ],
  "name": "Q1 Sales Campaign",
  "trigger_timestamp": 1735718400000,
  "agent_id": "agent_7ff47846-c8a0-4304-ae13-88cfc31c1a03",
  "timezone": "America/New_York",
  "status": "draft",
  "send_now": false
}
'
{
  "message": "Batch call created successfully",
  "status": "success",
  "error": null,
  "data": {
    "batch_call_id": "batch_call_a1b2c3d4e5f6789012345678901234567",
    "name": "Q1 Sales Campaign",
    "from_number": "+14157774444",
    "scheduled_timestamp": 1735718400000,
    "total_task_count": 1,
    "total": 1,
    "sent": 0,
    "picked_up": 0,
    "completed": 0,
    "agent_id": "agent_7ff47846-c8a0-4304-ae13-88cfc31c1a03",
    "organization_id": "e3yn0c4mivqs8y4yhb5k",
    "status": "draft",
    "timezone": "UTC",
    "last_sent_timestamp": null,
    "tasks_url": "https://storage.azure.com/.../tasks.json",
    "created_timestamp": 1735718400000,
    "access_info": {
      "user_id": "user_12345",
      "session_id": "session_67890"
    }
  }
}

Authorizations

X-API-KEY
string
header
required

API Key for MCP server and external service authentication

X-API-SECRET
string
header
required

API Secret for MCP server and external service authentication

Body

application/json
from_number
string
required

E.164 format

tasks
object[]
required
Required array length: 1 - 1000 elements
name
string
Maximum string length: 255
trigger_timestamp
integer<int64>

Unix timestamp (milliseconds)

agent_id
string

agent_[uuid] format

timezone
string

Valid timezone, default UTC

status
enum<string>
Available options:
draft,
scheduled,
sent
send_now
boolean
default:false
organization_id
string

Response

Batch call created successfully

message
string
status
string
error
string | null
data
object