Campaigns
Outbound calling campaigns: create, feed with contacts, run, and follow.
📄️ List your campaigns
Returns every campaign of your account, newest first, each with its contact counters.
📄️ Create a campaign
Creates a campaign in `draft` — or in `scheduled` when `scheduledAt` is in the future. Creating does **not** place any call: use the start endpoint, or let the scheduler pick up a scheduled campaign.
📄️ Get a campaign
Returns one campaign with its contact counters. For a campaign built from a text, `ttsText` holds the exact message that was broadcast.
📄️ Update a campaign
Updates a campaign. Only a campaign in `draft` or `paused` can be modified — a running campaign is frozen, so that two halves of your base never hear two different messages.
📄️ Add numbers to a campaign
Adds numbers directly to a campaign, without going through a contact group. A leading `+` is stripped and numbers already present are skipped, so the same number is never called twice within one campaign.
📄️ Start a campaign
Starts dialling. A campaign whose `scheduledAt` is in the future is handed to the scheduler instead of being dialled immediately.
📄️ Stop a campaign
Cancels the campaign for good. Contacts not yet called move to `cancelled`; calls already under way run to their end.
📄️ Pause a campaign
Suspends dialling. Calls already under way run to their end. The campaign can be resumed.
📄️ Resume a paused campaign
Picks dialling back up where it stopped. Contacts already called are not called again.
📄️ Recover stalled contacts
Releases contacts left in `queued` without a live call — the situation a platform incident can leave behind — so they are dialled again. Contacts held for less than five minutes are left alone, since their call may still be ringing.
📄️ Get campaign counters
Counts of contacts by outcome. `total` is always present; the other keys appear only when at least one contact fell into them. Contacts not yet called show under their processing state (`pending`, `queued`).
📄️ List the contacts and calls of a campaign
One entry per contact, with the call placed to it once it has been dialled.
📄️ Get campaign indicators
Aggregated indicators for the campaign: answer rate, average conversation length, and the hourly breakdown of outcomes.
📄️ Export a campaign to Excel
Returns the campaign's contacts and their call results as an **XLSX binary file**, not JSON. Save the body to a `.xlsx` file.
📄️ Upload an audio file
Uploads an audio file to storage and returns the URLs to reference it with. Recommended format: **WAV 8 kHz, 16-bit, mono, PCM** — GSM and MP3 are also accepted.