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) 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.
There is no idempotency key on this route. If a create times out, list your campaigns before you retry, or you may end up with two.
Authorizations
Body
Pause 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