Get campaign list
Description
Retrieves campaign list.
Request URL
Method: POST
https://example.com/api/v1.1/campaigns/list
Request parameters
Parameter | Type | Example | Required | Description |
---|---|---|---|---|
token | string | "abcdefghijklmnqrstuvwxyz" | Yes | API token |
format | string | "json" | No | Response data format. By default – json |
from_id | int | 1 | No | First campaign in the list ID. By default – 1 |
limit | int | 2 | No | Response campaigns limit. By default – 1000 |
type | string | "trigger" | No | Campaign type |
is_active | bool | true | No | Campaign active flag |
ui_tags | []String | [ "tag1", "tag2" ] | No | List of tags for search |
groups | []String | [ "group1", "group2" ] | No | List of access groups |
groups_id | []int | [ 0, 1 ] | No | List 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
Parameter | Type | Description |
---|---|---|
error | int | Error code |
error_text | string | Error text |
next_from_id | int | The index must be passed in the next request to receive another piece of data, until the result output contains 0 history lines |
id | int | Campaign ID |
is_active | bool | Campaign active flag |
name | string | Campaign name |
type | string | Campaign type |
total_count | int | Total campaign count |
for_confirm | bool | Messages with opt-in link flag |
ui_tags | []String | List of tags |
groups | []String | List of access groups |