Skip to main content
POST
Create a campaign

Authorizations

Authorization
string
header
required

Your organization API key (it starts with anek_org_). The same key works on the Voice API and the Support API. See Authentication.

Path Parameters

projectId
string
required

Project id

Body

application/json
name
string
required
Minimum string length: 1
agent_id
string | null

Agent that places the calls. Must be published.

Minimum string length: 1
from_number
string | null

Caller id to place the calls from (one of the project's outbound numbers).

Minimum string length: 1
start_time
string<date-time> | null

ISO 8601 with a UTC offset. Setting it schedules the campaign; omit to create a draft.

callback
boolean
default:false

Call people back when they ask for it during the call.

retries
integer
default:0
Required range: x >= 0
retry_delay_seconds
integer
default:0
Required range: x >= 0
max_concurrency
integer
default:5
Required range: 5 <= x <= 20
calling_window
object | null

A recurring window in which the campaign may dial. Outside it, contacts wait for the next window. When end is not after start the window runs past midnight (for example 22:00 to 02:00).

items
object[]

Contacts to add now. More can be added later.

Response

The campaign was created. Returns the campaign and the contacts that were added.

campaign
object
required

An outbound calling campaign.

items
object[]
required