Skip to content

Campaigns

A campaign calls a list of contacts with an assistant. The dialer works through the list at the pace you set, only inside your calling windows, retries the people it didn’t reach, and checks every contact against the compliance rules just before dialling. You add contacts, start the campaign, and follow the results.

A campaign moves through these states:

state Meaning
draft Being set up. Nothing is dialled.
scheduled Started with a later start_at; dialling begins then.
running Dialling, inside the calling windows.
paused Not dialling new calls. Calls in progress finish.
completed Every contact reached a final status.
cancelled Stopped for good.

name and purpose are required. Everything else takes the defaults the dashboard uses, and the campaign starts as a draft:

Terminal window
# A draft campaign: it dials nobody until you add contacts and start it.
curl https://api.morevoice.ai/v1/campaigns \
-H "Authorization: Bearer $MOREVOICE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "November flu-shot reminders",
"purpose": "service",
"assistant_id": "'"$ASSISTANT_ID"'"
}'

purpose works as on a single call: marketing campaigns need a recorded consent for every contact (§30A) and pass the national do-not-call registry, and they always play the AI and recording disclosure. Choose service or survey only when the call really is one.

Send any of these when you create the campaign, or change them later with PATCH /v1/campaigns/{id} (nested objects are merged with the stored values). A completed or cancelled campaign can’t be changed, and a running one must be paused before its purpose changes.

Field What it does
assistant_id The assistant that talks.
connection_id, caller_id The SIP connection to dial through and the number to show (by default, the organisation’s default connection and its caller ID).
schedule When it may dial: see calling windows.
retry Whom to call again, and when: see retries.
max_concurrent Calls this campaign may have in progress at once (1–500).
calls_per_second New calls per second (0–100; 0 leaves it to the connection’s limit).
priority 1–10. When campaigns compete for lines, the higher one goes first.
ring_timeout_seconds Give up on an unanswered call after this long (5–120).
amd Answering machines: { "mode": "off" }, "hangup", or "leave_message" with a message.
first_message Replaces the assistant’s first sentence for this campaign. {{variables}} come from each contact.
script Extra instructions for the assistant in this campaign, for example the offer. {{variables}} allowed.
dispositions The outcomes the assistant can record, such as interested or callback-requested.
disclosure The AI and recording disclosure played before the first message. enabled: null follows the organisation’s default, which is on for marketing; a marketing campaign can’t turn it off.
opt_out_dtmf_key The key a contact presses to opt out (by default, the organisation’s).

schedule.windows lists when the campaign may dial, in schedule.timezone (or each contact’s own timezone). Up to 14 windows, each with weekdays and a start and end time:

Part of a campaign
{
"schedule": {
"timezone": "Asia/Jerusalem",
"windows": [
{ "days": ["sun", "mon", "tue", "wed", "thu"], "start": "09:00", "end": "19:00" },
{ "days": ["fri"], "start": "09:00", "end": "13:00" }
],
"respect_shabbat": true,
"respect_holidays": true,
"start_at": null,
"end_at": "2026-11-30T18:00:00.000Z"
}
}

The organisation’s own calling hours, Shabbat and holidays apply on top of the campaign’s windows, whatever it says: a campaign can only narrow them, never widen them. end_at stops the dialling at that time. Compliance explains the rules.

retry.max_attempts is the most times one contact is dialled, the first call included (1–20). For each result you choose whether to try again, and after how many minutes:

Part of a campaign
{
"retry": {
"max_attempts": 3,
"busy": { "enabled": true, "delay_minutes": 15 },
"no_answer": { "enabled": true, "delay_minutes": 60 },
"voicemail": { "enabled": true, "delay_minutes": 120 },
"declined": { "enabled": false, "delay_minutes": 240 },
"failed": { "enabled": true, "delay_minutes": 10 }
}
}

A retry still waits for an open calling window.

Send up to 1,000 contacts per request. Numbers can be in E.164 (+972…) or national format (050-…) with a default_country. Each contact can carry variables for the campaign’s {{variables}}, and its own timezone:

Terminal window
# Up to 1,000 contacts per request. Numbers may be national (050-…) with a default country.
curl https://api.morevoice.ai/v1/campaigns/$CAMPAIGN_ID/contacts \
-H "Authorization: Bearer $MOREVOICE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"default_country": "IL",
"contacts": [
{ "phone": "+972501234567", "name": "דנה לוי", "variables": { "clinic": "רעננה" } },
{ "phone": "052-765-4321", "name": "יוסי כהן", "variables": { "clinic": "כפר סבא" } }
]
}'

Contacts are checked like a dashboard import: numbers are normalised, duplicates (in the request or already in the campaign) are dropped, and numbers on the do-not-call list are kept with the status dnc and never dialled. Send drop_dnc: true to leave them out entirely. The answer counts what happened and lists the first 100 problems by position:

Response
{
"object": "contact_batch_result",
"campaign_id": "cmp_2Yb7mCq9aPLk",
"livemode": true,
"received": 2,
"imported": 2,
"rejected": 0,
"rejected_reasons": { "invalid": 0, "duplicate": 0, "dnc": 0 },
"without_consent": 0,
"consent_recorded": 0,
"errors": [],
"warnings": []
}

A marketing call needs evidence that the person agreed to be called: when, where and how. Send it with each contact as consent, with granted_at (an ISO-8601 time), source (for example the form’s name) and channel (web, phone, sms, email, whatsapp, app, written, in_person or other). MoreVoice records it as a consent for that number. A contact without it is added, counted in without_consent, and skipped by the dialer until a consent is recorded.

For larger lists, upload a CSV or XLSX file of up to 10 MB and 50,000 rows. The import runs in the background:

Terminal window
# Upload a CSV or XLSX file (up to 10 MB). `mapping` says which column holds what;
# any other key (here "clinic") becomes a {{variable}}.
curl https://api.morevoice.ai/v1/campaigns/$CAMPAIGN_ID/contacts/import \
-H "Authorization: Bearer $MOREVOICE_API_KEY" \
-F file=@contacts.csv \
-F 'mapping={"phone": "Mobile", "name": "Name", "clinic": "Clinic"}' \
-F default_country=IL
# The import runs in the background: poll it until it succeeds or fails.
curl https://api.morevoice.ai/v1/imports/$IMPORT_ID \
-H "Authorization: Bearer $MOREVOICE_API_KEY"
  • mapping says which column holds what: phone (required), name, timezone, and the consent columns consent, consent_at, consent_source and consent_channel. Any other key names a {{variable}}. Name columns by header or by 0-based index. Leave mapping out and the columns are detected the way the dashboard does it.
  • default_country reads numbers written without a country code (IL by default).
  • consent_source and consent_channel apply to every consenting row when the file has no such columns.
  • has_header and drop_dnc work as their names say.

The upload answers 202 Accepted with an import object. Poll GET /v1/imports/{id} until its status goes from pending and processing to succeeded or failed. The Node.js SDK’s campaigns.importCsv() uploads and waits for you. A finished import counts the rows like a batch (received, imported, rejected, rejected_reasons, without_consent), lists the first 100 rejected rows with their row number in errors, and a failed one says why in error.

The same endpoint also takes JSON, with exactly one of csv (the file’s text), file (filename and content_base64) or url (a public https address to download it from).

start runs the same pre-flight checks as the dashboard’s Start button, then dials:

Terminal window
# Runs the pre-flight checks and starts dialling; a failed check answers 409 preflight_failed.
curl -X POST https://api.morevoice.ai/v1/campaigns/$CAMPAIGN_ID/start \
-H "Authorization: Bearer $MOREVOICE_API_KEY"

If a check fails, nothing starts: the request answers 409 with the code preflight_failed, and details.preflight lists the errors to fix (no assistant, no contacts, no recorded consent, no registry for a marketing campaign…), warnings (contacts that will be skipped), how many contacts are dialable, and whether a calling window is open now. GET /v1/campaigns/{id}/preflight runs the same checks without starting. To start later, send start_at with the start and the campaign waits in scheduled.

Once running, the dialer checks each contact again just before calling it: the do-not-call list, consent, the national registry, calling hours and Shabbat. A marketing campaign that can’t reach the national registry pauses itself and says why in pause_reason.

Terminal window
# Stop dialling new calls; calls in progress finish.
curl -X POST https://api.morevoice.ai/v1/campaigns/$CAMPAIGN_ID/pause \
-H "Authorization: Bearer $MOREVOICE_API_KEY"
# Later: run the pre-flight checks again and carry on.
curl -X POST https://api.morevoice.ai/v1/campaigns/$CAMPAIGN_ID/resume \
-H "Authorization: Bearer $MOREVOICE_API_KEY"

pause stops new calls and lets calls in progress finish. resume runs the pre-flight checks again and carries on. cancel stops the campaign for good: calls not yet answered are hung up, and contacts not yet dialled are cancelled.

The campaign object carries stats: contacts per status, how many will not be dialled again (finished), and the calls in progress now. List the contacts by status to see where each one stands:

Terminal window
# Contacts still waiting to be called.
curl "https://api.morevoice.ai/v1/campaigns/$CAMPAIGN_ID/contacts?status=pending&limit=50" \
-H "Authorization: Bearer $MOREVOICE_API_KEY"
Contact status Meaning
pending Waiting for its first call.
scheduled Due again later: a retry, or requeued.
callback The person asked to be called back.
dialing Being called now.
done Reached; outcome holds the disposition the assistant recorded.
failed Not reached after every attempt.
dnc, skipped, invalid, cancelled Never dialled; skip_reason says why (do-not-call, no consent, outside every window, skipped by hand…).

GET /v1/campaigns/{id}/stats adds attempts by result, recorded outcomes and compliance skips, and GET /v1/campaigns/{id}/export downloads the contacts or the attempts as a CSV that opens in Excel with Hebrew intact. Webhooks follow the campaign as it runs: campaign.started, campaign.paused, campaign.completed, contact.attempted, contact.completed and the call events of each call; see the event catalogue. campaign.blocked tells you when a running campaign can’t dial right now: outside its calling window, on Shabbat or a holiday, or stopped by a compliance gate.

Each contact keeps its dial attempts: when, the result (answered, no_answer, busy, voicemail…) and the call’s end_reason. To try someone again now, set the contact’s status to scheduled; to take them out of the campaign, skipped, as the dashboard’s contact actions do:

Terminal window
# Why wasn't this contact reached? Its dial attempts, then dial it again now.
curl https://api.morevoice.ai/v1/campaigns/$CAMPAIGN_ID/contacts/$CONTACT_ID/attempts \
-H "Authorization: Bearer $MOREVOICE_API_KEY"
curl -X PATCH https://api.morevoice.ai/v1/campaigns/$CAMPAIGN_ID/contacts/$CONTACT_ID \
-H "Authorization: Bearer $MOREVOICE_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "status": "scheduled" }'

A number on the do-not-call list can’t be requeued, and a contact being dialled can’t change. A requeued contact still waits for an open calling window and passes the compliance checks again before the call.

Campaigns created with a test key are test objects: they never reach a phone network, and their calls are dialled by the virtual carrier. Calling windows, Shabbat, retries, outcomes and webhooks work exactly as in live mode, and the test numbers behave the same in a list: +972500000002 is busy and is retried by your retry policy, +972500000004 is skipped as do-not-call.

A test campaign needs no SIP connection, and its pre-flight doesn’t require recorded consent or the national do-not-call registry, because no real person can be called: the pre-flight lists them as warnings instead. Contacts on your own do-not-call list are still skipped. Test calls count against your plan’s test-mode limits (calls per day, calls at once), not against billing.