Create Campaign
Create a new outbound campaign.
POST
/campaignsCreate a new outbound campaign with contacts and configuration.
No parameters for this endpoint.
Request Body
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
name | string | Yes | — | Campaign display name |
agent_id | string | Yes | — | Voice-enabled agent to use (ag_*) |
type | string | Yes | — | Campaign type: voice, sms |
contacts | string[] | Yes | — | List of phone numbers in E.164 format (+1234567890) |
message_template | string | No | — | Message template with {{variable}} placeholders |
schedule | string | No | Immediate | ISO 8601 datetime to start the campaign |
max_concurrent | integer | No | 1 | Maximum concurrent calls/messages |
from_number | string | No | Default | Outbound caller ID (must be verified) |
Response 201
{
"id": "camp_a1b2c3d4",
"name": "Follow-up Campaign",
"status": "draft",
"type": "voice",
"agent_id": "ag_c47e7c97_b2f2",
"total_contacts": 2,
"completed": 0,
"failed": 0,
"scheduled_at": "2026-03-10T09:00:00Z",
"created_at": "2026-03-07T14:00:00Z"
}Campaign Lifecycle
draft → launched → running → completed
↕
pausedUse Launch, Pause, and Resume to control execution.
Errors
| Code | Description |
|---|---|
401 | Missing or invalid authentication |
402 | Insufficient balance for campaign |
404 | Agent not found |
422 | Invalid contacts or configuration |