- upload the list as an audience.
- create the campaign: the agent, the number to call from, the pace.
- follow it, and read each call’s transcript and recording.
1. upload an audience
POST /v1/campaign-audiences takes a multipart form.
file
required
the CSV:
.csv, .tsv or .txt, up to 10 MB and 10,000 rows, comma /
tab / semicolon delimited. the first row is the header.string
required
the audience’s name, up to 120 characters.
string
required
the header of the column with the phone numbers (case-insensitive). rows
whose number can’t be read are skipped and counted in
skippedCount.string
added to numbers written without one. default
+91.string
a JSON string (a form can’t nest): the columns the agent is told about
for each person, each with what it means, e.g.
[{"column": "city", "description": "where they live"}]. left out, every
column.curl
POST /v1/campaign-audiences/preview
with just the file returns its columns, a few rows and
suggestedPhoneColumn without saving anything.
what the agent knows about each person
a list reaches the agent two ways, and only these two:-
context columns. the chosen columns are added to the agent’s prompt at
the start of every call, with their descriptions:
-
variables. a variable whose
campaignColumnnames a column takes that person’s cell — in the prompt, the greeting, and as an input to before-call tools. write{first_name}in the greeting, and create the variable with{"name": "first_name", "campaignColumn": "name"}.
{name} that merely matches a header is not filled from it, and no
other column reaches the agent. when you create a campaign, leave out of
contextColumns any column a variable in the prompt already reads, so the
agent doesn’t get it twice.
2. create the campaign
POST /v1/campaigns
string
required
the campaign’s name, up to 120 characters.
string
required
the audience to call.
string
required
the agent — its UUID or
ua_… handle. it must be deployed (409 agent_not_deployed).string
required
rented (a number rented through rumik) or sip_trunk
(one of your SIP trunks). campaigns always call from your
own number; GET /v1/campaigns/phone-lines lists the ones you can use.string
required
the rented number’s or SIP trunk’s id.
object[]
the audience columns added to the prompt,
[{ "column", "description" }].
left out, the audience’s own choice; [], none.integer
default:"1"
calls kept live at once, up to your account’s limit (
maxConcurrentCalls
on GET /v1/campaigns/phone-lines).boolean
default:"false"
redial people who don’t pick up.
integer
minutes before a redial: 15, 20, 30 or 60.
integer
redials per person, 1–6.
string
ISO 8601 time to start, up to 90 days ahead. left out, it starts now.
curl
201 with the campaign: status is running, or scheduled when
scheduledAt is set.
3. follow it and read the calls
GET /v1/campaigns/{id} has live counts in stats (pending, dialing,
inProgress, retryWaiting, completed, failed, skipped). notice says
why it is waiting — every line busy, or your account at its call limit —
and clears on its own. lastError says why it paused, for example the
balance ran out.
GET /v1/campaigns/{id}/contacts?status=failed lists people by where they
stand.
GET /v1/campaigns/{id}/calls returns every dial, newest first, with the
person’s row and the conversation:
curl
call is the same record as GET /v1/calls/{callId}. it is null until the
dial becomes a call, and for a dial the carrier refused (errorMessage says
why). recordingUrl is signed and short-lived: list again for a fresh one.
pages hold up to 50 calls (?page=2&limit=50).
pause, resume, stop, delete
a transition the campaign’s status doesn’t allow answers
409 campaign_state.
how it dials
- pace. up to
maxConcurrentCallslive at once, never more than your account’s free call slots (your other calls hold slots too). - busy lines and limits are waits, not failures. when every line is busy,
your account is at its call limit, or your balance is held by calls in
progress, the person waits for the next free slot and
noticesays why. - retries. a call nobody answered is redialled after
retryDelayMinuteswhile retries remain, else the person isfailed. a call the carrier dropped because the line was full is redialled after a minute without using a retry. - billing. every call is billed like a phone call. if the balance runs
out, the campaign pauses with
lastError; add funds and resume.