Create and start a campaign
A campaign calls a recipient list with a published agent. Creating a campaign saves a draft.
To start dialing, move it through plan → admit → start. Each command needs the campaign’s
current ETag in If-Match and a separate Idempotency-Key.
The examples use RASEN_API_BASE and RASEN_API_KEY from the
Quickstart. You need calls.write for changes and calls.read for
campaign and recipient reads. Publish the agent and configure an outbound number first
(Telephony connections, Phone routing).
1. Create a draft
Save a new idempotency key before sending the request. Keep it for retries of this same action.
The 201 response contains the campaign id, revision and state, plus an ETag header.
Use that id as CAMPAIGN_ID. Inline campaigns accept 1 to 100,000 recipients. Each recipient
requires to_e164; optional variables contain at most 64 string values.
Optional settings include from_phone_number_id, retry count and backoff, concurrency, ringing
timeout, a dialing time zone, and absolute or daily dialing windows. The accepted concurrency
range is 1 to 1,000; workspace capacity and admission policy still apply.
2. Plan and admit
Use the ETag from creation or GET /campaigns/{campaign_id} for planning. Each successful command
returns a new ETag; use it for the next command. After a lost response, retry with the same key and
the original request. After a stale revision refusal, read and review the campaign again.
Planning returns progress, capacity ceiling and dialing-window information. Admission checks whether the planned campaign can proceed. Do not send start after a refused plan or admission.
3. Start dialing
This operation starts real outbound calls. Use the ETag returned by admission.
In the docs, open API Reference → Campaigns → Start an admitted campaign and select Try it. Provide your key, campaign ID, current ETag and a new idempotency key.
Recipient files
POST /campaigns/recipients/check validates and previews a CSV or XLSX file without creating a
campaign. POST /campaigns/upload creates one from a file. Both use multipart form data with a
recipients file field; upload also requires agent_id and name and takes an idempotency key.
Use the API Reference for the full form fields and validation report.
Progress and controls
Read GET /campaigns, GET /campaigns/{campaign_id} and
GET /campaigns/{campaign_id}/recipients. Lists use limit and next_cursor.
State commands require the current ETag and an idempotency key. Suppression requires an idempotency key. Treat unknown state values as unknown. To download campaign results and transcripts, use the campaign ID with the campaign evidence exports.