Create a campaign
Makes a draft campaign. Nothing rings until you start it.
Required: name, agent_id, timezone, start_date, end_date and slots. Dates are YYYY-MM-DD and slots are HH:MM, both in the campaign’s own timezone; up to 4 slots, and a slot may cross midnight. Set the dates to the days you actually want to call. A campaign whose dates have passed finishes as soon as it starts.
Optional: max_concurrent (1–50, default 1), retry_count (0–5 retries after the first attempt, default 0), re_attempt_period_secs (60–86400, default 900), max_duration_secs (defaults to the agent’s), budget_paise (leave it out for no cap), webhook_url, skip_called_before (skip numbers another campaign has already reached), final_results (default true: each call ends with one call.processed carrying the transcript, the results and the contact’s metadata), pause_after_connected (1–100000: the campaign pauses itself once that many calls have connected; leave it out or send null for no limit), keyterms (up to 100 names and words your contacts may say that are easy to mishear; calls listen for them along with the agent’s own, and a change reaches the next call, even while the campaign dials) and tier (defaults to your plan).
contacts is optional here: up to 1000 rows per request, each {id?, phone, variables?, metadata?}. variables fill the placeholders in the agent’s prompt for that person, the same way they do on a single call. metadata is your own fields the agent doesn’t need (a CRM id, a branch): kept with the contact and sent on each of its calls’ webhooks, never given to the agent. Every campaign call’s webhooks also name its campaign_id and contact_id. A bad row doesn’t sink the upload. It comes back in contacts_rejected with its index, and the good rows are stored.
Send an Idempotency-Key header to make a retry safe: the first request with a key creates the campaign, and a retry with the same key (within 24 hours) gets that first answer back with Idempotent-Replay: true and creates nothing. While the first is still being answered, the same key is 409 request_in_progress.
Authorizations
Headers
Body
One of your phone numbers (GET /v2/phone-numbers) on a different carrier than the numbers this campaign calls from. When a carrier refuses a call before anything is answered, the contact is rung once more from this number, at no attempt cost, at most once per contact per day. null clears it. Not with caller_ids.
Words speech recognition listens for on this campaign's calls: brand, product, place and people names. Up to 100 terms, each 1-50 characters and at most 5 words, in any script, with no commas, new lines or tabs. Spaces are tidied and repeats (ignoring case) dropped, keeping the first spelling. A call hears the campaign's terms first, then its agent's, up to 200 in all. An array replaces the whole list; [] or null clears it. May change while the campaign runs: the next call uses the new list.
1001 - 50Pause the campaign on its own once this many calls have connected (completed or timeout; voicemail does not count). Counting starts when it is set and again on each start or resume after it paused the campaign. null removes it. May change while the campaign runs.
1 <= x <= 100000Response
Draft created