Skip to main content

Get campaign list

Description

Retrieves campaign list.

Request URL

Method: POST

https://example.com/api/v1.1/campaigns/list

Request parameters

ParameterTypeExampleRequiredDescription
tokenstring"abcdefghijklmnqrstuvwxyz"YesAPI token
formatstring"json"NoResponse data format.
By default – json
from_idint1NoFirst campaign in the list ID.
By default – 1
limitint2NoResponse campaigns limit.
By default – 1000
typestring"trigger"NoCampaign type
is_activebooltrueNoCampaign active flag
ui_tags[]String[ "tag1", "tag2" ]NoList of tags for search
groups[]String[ "group1", "group2" ]NoList of access groups
groups_id[]int[ 0, 1 ]NoList of access groups IDs

Request example

{
"limit": 2,
"token": "abcdefghijklmnqrstuvwxyz"
}

Response example

{
"data": [
{
"id": 1,
"name": "New campaign1",
"type": "regular",
"is_active": true,
"for_confirm": false,
"ui_tags": [
"tag1",
"tag2"
],
"Groups": [
{
"Id": 0,
"Name": "main"
}
]
},
{
"id": 2,
"name": "New campaign2",
"type": "trigger",
"is_active": true,
"for_confirm": false,
"ui_tags": [
"tag3",
"tag4"
],
"Groups": [
{
"Id": 1,
"Name": "subaccount"
}
]
}
],
"error": 0,
"error_text": "Successful operation",
"next_from_id": 3,
"total_count": 14
}

Response parameters

ParameterTypeDescription
errorintError code
error_textstringError text
next_from_idintThe index must be passed in the next request to receive another piece of data, until the result output contains 0 history lines
idintCampaign ID
is_activeboolCampaign active flag
namestringCampaign name
typestringCampaign type
total_countintTotal campaign count
for_confirmboolMessages with opt-in link flag
ui_tags[]StringList of tags
groups[]StringList of access groups