Campaigns
The campaign endpoints are the API behind Outbound automation: you create a campaign, load the list of people to call, start and stop it, and read back what happened on every number. They cover everything the portal can do here.
All of them sit under /api/v1/campaignDialer: the subsystem is called Campaign Dialer
internally, and that name survives in the path.
For what a campaign is and the rules it runs by, see Outbound automation first. This section covers only the API surface.
| Page | Use it to |
|---|---|
| Campaign endpoints | create, list, read, update and delete campaigns |
| Target endpoints | add, import, list, export and update the numbers a campaign calls |
| Status and statistics endpoints | count campaigns by status, and read one campaign's results |
| Reference value endpoints | look up the status strings, failure reasons and time zones the other endpoints accept |
Query conventions
The campaign endpoints do not use the filter=(...) syntax or the pages object
described in Filtering, pagination and sorting.
They have conventions of their own:
- Filtering — each filterable field is its own query parameter, for example
?campaignName=demo. Each endpoint lists which of its fields are filterable. - Sorting —
sortColnames the column andsortDirtakesascordesc, for example?sortCol=campaignName&sortDir=asc. - Pagination —
pageasks for a page, numbered from 1, andlimitsets how many entries it holds.
A paginated response describes where you are with these properties:
| Property | Type | Description |
|---|---|---|
totalDocs
|
number | Total number of entries. |
limit
|
number | Requested limit per page. |
totalPages
|
number | Total number of pages. |
page
|
number | Page number in this response. |
pagingCounter
|
number | Index of the first entry on this page. |
hasPrevPage
|
boolean | false on the first page. |
hasNextPage
|
boolean | false on the last page. |
prevPage
|
number | Index of the previous page, null on the first. |
nextPage
|
number | Index of the next page, null on the last. |
{
"totalDocs": 28,
"limit": 5,
"totalPages": 6,
"page": 1,
"pagingCounter": 1,
"hasPrevPage": false,
"hasNextPage": true,
"prevPage": null,
"nextPage": 2
}
All campaign endpoints
Every campaign endpoint appears below, linked to its description.
| Endpoint | Method | What it does |
|---|---|---|
/api/v1/campaignDialer/version
|
GET | Gets the current version. |
/api/v1/campaignDialer/values
|
GET | Gets the target and campaign status values. |
/api/v1/campaignDialer/timezone
|
GET | Gets the supported time zones. |
/api/v1/campaignDialer/status
|
GET | Gets the status of all campaigns. |
/api/v1/campaignDialer/campaigns
|
POST | Creates a campaign. |
/api/v1/campaignDialer/campaigns
|
GET | Lists all campaigns, with filtering, sorting and pagination. |
/api/v1/campaignDialer/campaigns/{campaignID}
|
GET | Gets the configuration and status of one campaign. |
/api/v1/campaignDialer/campaigns/{campaignID}
|
PUT | Updates a campaign, including locking and unlocking it. |
/api/v1/campaignDialer/campaigns/{campaignID}
|
DELETE | Stops and deletes a campaign. |
/api/v1/campaignDialer/campaigns/{campaignID}/targets
|
POST | Adds targets, as JSON. |
/api/v1/campaignDialer/campaigns/{campaignID}/targets
|
GET | Lists the targets of a campaign, with filtering, sorting and pagination. |
/api/v1/campaignDialer/campaigns/{campaignID}/targets
|
PATCH | Changes the attributes of existing targets. |
/api/v1/campaignDialer/campaigns/{campaignID}/targetsFile
|
POST | Imports targets from a .csv file, replacing the current list.
|
/api/v1/campaignDialer/campaigns/{campaignID}/targetsFile
|
GET | Exports the targets of a campaign as a .csv file.
|
/api/v1/campaignDialer/campaigns/{campaignID}/statistics
|
GET | Gets the statistics of one campaign. |