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
- JSON
- XML
{
"token": "abcdefghijklmnqrstuvwxyz",
"limit": 2
}
<xml>
<token>abcdefghijklmnqrstuvwxyz</token>
<limit>2</limit>
</xml>
Response example
- JSON
- XML
{
"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
}
<xml>
<error>0</error>
<error_text>Successful operation</error_text>
<data>
<id>5</id>
<name>New meteoric campaign</name>
<type>broadcast</type>
<is_active>false</is_active>
<subid></subid>
<for_confirm>false</for_confirm>
<groups>
<id>0</id>
<name>main</name>
</groups>
</data>
<data>
<id>7</id>
<name>Copy of New meteoric campaign</name>
<type>broadcast</type>
<is_active>false</is_active>
<subid></subid>
<for_confirm>false</for_confirm>
<groups>
<id>0</id>
<name>main</name>
</groups>
</data>
<next_from_id>8</next_from_id>
<total_count>134</total_count>
</xml>
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 |