This guide walks through the complete campaign lifecycle—from setup to cleanup.
Before creating a campaign, you need:
new_agent() or use an existing agentcreate_audience() (see Audiences)get_phone_numbers()get_phone_numbers() returns all outbound phone numbers available for campaigns:
Each phone includes provider details:
create() creates a campaign linking your agent, audience, and phone number:
The response includes all campaign details:
POST /campaign also accepts an optional scheduledAt (ISO-8601, must be in
the future) to defer the first dial-out. If provided, the campaign is created
in scheduled status and begins automatically at the specified time.
Full request/response shape: see POST /campaign in the API reference.
start() begins dialing contacts in the audience:
The response confirms the campaign is processing:
get() returns the campaign status, execution history, and metrics:
Full status response:
delete() removes the campaign and its execution history:
Running campaigns should be paused before deletion. Use pause(id) first if needed.
contacts_called counts dial attempts. contacts_connected counts answered calls. The difference represents voicemail, busy signals, and no-answers.
Failed calls enter the retry queue based on your max_retries and retry_delay settings. After all retries are exhausted, the contact is marked as failed.
Yes. Each campaign operates independently. Just ensure you have sufficient phone capacity for parallel dialing.
Campaigns cannot change agents after creation. Create a new campaign with the desired agent and audience.