Deploy
Outbound campaigns
Lifecycle
Create
POST
/v1/campaignswith aname, anagentIdand aphoneId. It starts inactive unless you sendisActive: true.Add contacts
POST
/v1/campaigns/{campaignId}/contactscreates or updates each contact by phone number and queues one call per contact.Start
PATCHthe campaign withisActive: true. Queued calls are dialed within the trunk's calls per second, and contacts added later are dialed as they arrive.Follow
Read the totals with GET
/v1/campaigns/{campaignId}and the calls withGET /v1/calls?campaignId=.Retry
POST
/v1/campaigns/{campaignId}/retrycreates a new, inactive campaign for the contacts you did not reach and who never called back.
Add contacts
{
"contacts": [
{
"salutation": "ms",
"firstName": "Ada",
"lastName": "Lovelace",
"phoneNumber": "+33612345678",
"email": "ada@example.com",
"metadata": { "plan": "pro", "renewal": "2026-11-15" }
}
]
}phoneNumberis required, in E.164: normalise numbers before you send them.- An
emailthat is present but empty or malformed fails the whole request with a400: leave the field out when you are not sure of it.error.issues[].pathpoints at the faulty contact, such as["contacts", 0, "email"]. metadatatakes any JSON object and reaches the agent's prompt (see Variables).
When the campaign is active, the calls start as soon as the contacts are added. Send a test batch of one or two internal numbers first.
Start, stop and calling hours
isActive starts and stops the campaign. A campaign has no calling window of its own: to respect legal calling hours, schedule the switch on your side, at the start and the end of each window.
Automatic stop on declined calls
A campaign stops itself when too many of its recent calls are declined as soon as they are placed, which usually means the carrier is blocking the number. Recent calls are its last 40 ended in the last 10 minutes, counted once 30 have ended. declinedStopRatio sets the threshold, from 0.35 (14 calls out of 40) to 0.7 (28 out of 40), 0.5 by default. It is an advanced setting: an account it is not enabled on gets a 403; ask your account manager.
Remove queued calls
DELETE/v1/campaigns/{campaignId}/calls with ?status=READY deletes calls still waiting to be dialed: all of them, or those of the phoneNumbers you send. Calls already placed are never touched. The campaign's totals are computed from the calls that remain.
Opt-outs
When a contact asks not to be called again, POST/v1/contact-opted-out marks their number. Their queued and future calls end with contact-opted-out, without being dialed. A boolean entry such as Asked to opt out in the agent's information to collect lets your webhook do it automatically.
