ResoneraDocs
Campaigns

Create a campaign

POST
/campaigns

Creates an outbound campaign with its contacts. Voice, language, personality, and prompt come from the agent. The campaign is created with status draft. No calls are placed until you launch it with POST /campaigns/{campaign_id}/launch.

Each contact is validated before the campaign is created. If a contact is invalid, the request is rejected and the error identifies the row, for example contacts[3].phone_number. Phone numbers are normalized to E.164, so 98765 43210 and +919876543210 are the same contact. Duplicate numbers and numbers on your do-not-call list are removed and counted in import_report. On the free plan, only the first 10 contacts are kept (trial_capped).

Use max_attempts to retry contacts who are busy, do not answer, or are unreachable. Use call_window_start and call_window_end to set calling hours (default 09:00 to 21:00 IST).

Requires the calls:write scope.

Authorization

apiKey
headerX-API-Key<token>

Your API key, from Settings → API access in the dashboard.

Request Body

application/json
  1. body
name*string
Length1 <= length <= 200
agent_id*string

The agent that makes the calls.

Formatuuid
contacts*array<>
Items1 <= items <= 10000
campaign_prompt?string

Added to the agent's prompt for this campaign only.

kb_item_ids?array<>

Knowledge base for this campaign. Defaults to the agent's.

max_attempts?integer

Dial attempts per contact. Busy

Range1 <= value <= 5
Default1
retry_delay_minutes?integer

Wait between attempts.

Range5 <= value <= 10080
Default120
call_window_start?string

Calls are only placed from this local time...

Match^([01]\d|2[0-3]):[0-5]\d$
Default"09:00"
call_window_end?string

...until this one. An end before the start spans midnight.

Match^([01]\d|2[0-3]):[0-5]\d$
Default"21:00"
call_timezone?string

IANA timezone of the calling window.

Default"Asia/Kolkata"
phone_number_id?|

The number to call from, an id from GET /phone-numbers. Omit it to call from the agent's number, or Resonera's line if it has none.

Formatuuid
integration_config?

Connect the campaign's calls to your booking calendar or a Google Sheet (both connected in the dashboard first): {"booking": {"provider", "event_type_id", "timezone"}} for check_availability/book_appointment, {"sheets": {"spreadsheet_id", "columns": [...], "purpose"}} for lookup_in_sheet/append_to_sheet.

Response Body

The new campaign, in draft.

application/json
  1. response
id?string
Formatuuid
name?string
status?string
agent_id?string
Formatuuid
agent_name?string
direction?string
language?string
voice_name?string
campaign_prompt?string
total_contacts?integer
calls_initiated?integer
calls_completed?integer
calls_failed?integer
max_attempts?integer
retry_delay_minutes?integer
call_window_start?string
call_window_end?string
call_timezone?string
import_report?

What happened to the contacts you sent.

created_at?string
Formatdate-time
updated_at?string
Formatdate-time
curl -X POST "https://example.com/campaigns" \  -H "Content-Type: application/json" \  -d '{    "name": "October leads",    "agent_id": "8b8e3307-2c1a-4f6e-9a51-0d7c2b9e4f10",    "campaign_prompt": "Qualify the lead and offer a demo this week.",    "max_attempts": 2,    "retry_delay_minutes": 120,    "contacts": [      {        "phone_number": "+919876543210",        "name": "Asha",        "extra": {          "crm_id": "42"        }      },      {        "phone_number": "98765 43211",        "name": "Bharat"      }    ]  }'
{  "id": "3f1d9a52-7c0e-4b8a-a1f3-5e2c9d8b7a64",  "name": "October leads",  "status": "draft",  "direction": "outbound",  "agent_id": "8b8e3307-2c1a-4f6e-9a51-0d7c2b9e4f10",  "agent_name": "Neha",  "language": "hi-IN",  "voice_name": "neha_chariot",  "campaign_prompt": "Qualify the lead and offer a demo this week.",  "total_contacts": 2,  "calls_initiated": 0,  "calls_completed": 0,  "calls_failed": 0,  "max_attempts": 2,  "retry_delay_minutes": 120,  "call_window_start": "09:00",  "call_window_end": "21:00",  "call_timezone": "Asia/Kolkata",  "import_report": {    "imported": 2,    "skipped": 0,    "skipped_rows": [],    "duplicates": 0,    "do_not_call": 0,    "truncated": false,    "trial_capped": false  },  "created_at": "2026-10-05T08:30:00+00:00",  "updated_at": "2026-10-05T09:14:13+00:00"}