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

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

Response example

{
"data": [
{
"id": 5,
"name": "New meteoric campaign",
"type": "broadcast",
"is_active": false,
"subid": "",
"for_confirm": false,
"ui_tags": [],
"groups": [
{
"id": 0,
"name": "main"
}
]
},
{
"id": 7,
"name": "Copy of New meteoric campaign",
"type": "broadcast",
"is_active": false,
"subid": "",
"for_confirm": false,
"ui_tags": [],
"groups": [
{
"id": 0,
"name": "main"
}
]
}
],
"error": 0,
"error_text": "Successful operation",
"next_from_id": 8,
"total_count": 134
}

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