Campaign API
Campaign Management
The Campaign API provides access to campaign management functionality, enabling the retrieval of campaign information and the creation of campaign lists for outbound dialing operations.
Get Campaigns
GET /Advanced Dialer/api/Campaign
Retrieves a collection of campaigns. You can filter the results by specific IDs or by a specific Account ID.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
accountId | integer | Yes | Filter campaigns by the account identifier. |
ids | string | No | Comma-separated list of campaign IDs (e.g., 1,2,3). |
Example Request
curl --request GET \
--url 'https://api.talkdeskapp.com/Advanced Dialer/api/Campaign?accountId=123&ids=1,2,3' \
--header 'Ocp-Apim-Subscription-Key: YOUR_API_KEY' \
--header 'accept: application/json'
Response Example
{
"campaigns": [
{
"id": 1,
"name": "Spring Sales Campaign",
"accountId": 123,
"status": "Active",
"startDate": "2024-03-01T00:00:00Z",
"endDate": "2024-05-31T23:59:59Z",
"totalLists": 5,
"totalRecords": 15000
}
]
}
Get Single Campaign
GET /Advanced Dialer/api/Campaign/{id}
Retrieves detailed information for a specific campaign, including dialing hours and associated lists.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | integer | The unique identifier of the campaign. |
Example Request
curl --request GET \
--url 'https://api.talkdeskapp.com/Advanced Dialer/api/Campaign/1' \
--header 'Ocp-Apim-Subscription-Key: YOUR_API_KEY' \
--header 'accept: application/json'
Get Campaign Lists
GET /Advanced Dialer/api/Campaign/lists
Retrieves all lists associated with a specific campaign, including record counts and completion status.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
campaignId | integer | Yes | The ID of the campaign to retrieve lists for. |
Example Request
curl --request GET \
--url 'https://api.talkdeskapp.com/Advanced Dialer/api/Campaign/lists?campaignId=1' \
--header 'Ocp-Apim-Subscription-Key: YOUR_API_KEY' \
--header 'accept: application/json'
Create Campaign List
POST /Advanced Dialer/api/Campaign/createlist
Creates a new list within an existing campaign. You can choose to clone default rulesets for the new list.
Request Body
| Field | Type | Description |
|---|---|---|
listName | string | Required. Name for the new list. |
campaignID | integer | Required. The ID of the campaign to attach the list to. |
type | string | Category of the list (e.g., "Prospects"). |
cloneDefaultRuleset | boolean | If true, applies the campaign's default rules to this list. |
Example Request
curl --request POST \
--url 'https://api.talkdeskapp.com/Advanced Dialer/api/Campaign/createlist' \
--header 'Content-Type: application/json' \
--header 'Ocp-Apim-Subscription-Key: YOUR_API_KEY' \
--data '
{
"listName": "New Prospects April",
"campaignID": 1,
"type": "Prospects",
"active": true,
"messageId": 5,
"cloneDefaultRuleset": true
}'
Response Example
{
"success": true,
"listId": 103,
"message": "List created successfully",
"list": {
"id": 103,
"name": "New Prospects April",
"campaignId": 1,
"type": "Prospects",
"active": true,
"recordCount": 0,
"createdDate": "2024-04-01T09:15:00Z"
}
}
Updated about 2 hours ago