The List Campaigns API is part of Voiso's Campaigns APIs. Use it to obtain a list of all campaign names, IDs, and other metadata.
Please refer to the detailed API endpoint specification: List campaigns
What you can achieve with the Campaigns API
Campaigns API enables you to obtain a list of campaign IDs from your contact center and add contacts to a live outbound dialer campaign.
List Campaigns
The List campaigns method retrieves the list of all Dialer campaigns in your contact center that you have permission to view.
You can use the List Campaign method for applications such as the following:
- Get a summary of all past and current Dialer campaigns
- Create a picklist of all campaigns to chain them programmatically
Tip: You can obtain the ID by using the Campaigns API GET request or by looking at the Campaigns table on the Voiso Dialer campaigns page.
Prerequisites
You must have at least one campaign configured for your contact center.
Making requests
The List_campaigns API requires the Base URL (cluster_id) and the contact center API key. The following table lists the optional filters you can use to refine your request.
Parameter | Description | Type | Required | Notes |
---|---|---|---|---|
filter[name] | A campaign name | string | Optional | |
filter[strategy] | A campaign strategy type | string | Optional | Valid values are: simple, advanced, and predictive_ai |
filter[status] | The current status of the campaign | string | Optional | Valid values are: draft, active, paused, stopping, completed, processing, stopped, auto_paused, pausing, auto_pausing, import_error |
filter[method] | The method of uploading numbers to the campaign | string | Optional | Valid values are: csv, bitrix_crm, dynamics_crm, falcon_crm, hubspot_crm, panda_crm, popcorn_crm, proftit_crm, puma_crm, salesforce_crm, and zoho_crm |
filter[live] | Whether or not the campaign type is live | Boolean | Optional |
Make a request to return a list of campaigns. For example:
GET /api/dialer/v1/campaigns?filter[name]=campaign%20name&filter[strategy]=advanced&filter[status]=active&filter[method]=csv&filter[live]=false
HTTP/1.1
Host: cluster1.voiso.com
Accept: application/json
Authorization: Bearer token: 63c526cqwg05ce85e8bwtbt208943f93131c9d0d1d237b7c
JSON request example:
{
"method": "GET",
"url": "https://cluster1.voiso.com/api/dialer/v1/campaigns",
"headers": {
"Accept": "application/json",
"Authorization": "Bearer 63c526cqwg05ce85e8bwtbt208943f93131c9d0d1d237b7c"
},
"params": {
"filter[name]": "campaign name",
"filter[strategy]": "advanced",
"filter[status]": "active",
"filter[method]": "csv",
"filter[live]": "false"
}
}
Response
The following table describes the elements of the response.
Element | Description | Type | Notes |
---|---|---|---|
id | The ID assigned to the campaign when it was created. | number | This number corresponds to the number in the ID column of the Dialer campaigns page. |
name | The name of the campaign. | string | |
status | The current status of the campaign | string | Valid values are: draft, active, paused, stopping, completed, processing, stopped, auto_paused, pausing, auto_pausing, import_error |
strategy | A campaign strategy type | string | Valid values are: simple, advanced, and predictive_ai |
method | The method of uploading numbers to the campaign | string | Valid values are: csv, bitrix_crm, dynamics_crm, falcon_crm, hubspot_crm, panda_crm, popcorn_crm, proftit_crm, puma_crm, salesforce_crm, and zoho_crm |
live | Whether or not the campaign type is live | Boolean | |
created_at | The date and time that the campaign was created. | string | ISO 8601 format |
Response sample
{
"campaigns": [
{
"id": 25735,
"name": "Canada Campaign",
"status": "paused",
"strategy": "simple",
"method": "file_import",
"live": true,
"created_at": "2023-10-20T13:06:09.310178+00:00"
},
{
"id": 25473,
"name": "Wasson Campaign October",
"status": "completed",
"strategy": "simple",
"method": "hubspot_crm",
"live": false,
"created_at": "2023-10-03T13:33:28.746311+00:00"
]
"metadata": {
"limit": 25,
"offset": 0,
"total": 2
}
}
Troubleshooting
The following issues are sometimes encountered:
The API key specified is invalid
The List campaigns API uses the contact center API key to validate the request. If you see this error, "error": "Invalid API key"
, check that you are using the correct contact center API key. For more information about API keys, refer to Authentication.