Get regular campaigns list
Description
Retrieves regular campaigns list.
Request URL
Method: POST
https://example.com/api/v1.1/campaigns/regulars/list/
Request parameters
Parameter | Type | Example | Required | Description |
---|---|---|---|---|
token | string | "abcdefghijklmnqrstuvwxyz" | Yes | API token |
from_id | int | 11768 | No | The first campaign in the list ID. By default –1 |
limit | int | 10 | No | Campaigns list limit. By default – 1000 |
format | string | "json" | No | Response data format. By default – json |
is_active | bool | true | No | Retrieve active campaigns only |
ui_tags | []String | [ "tag1", "tag2" ] | No | List of tags for search By default – [] |
groups | []String | [ "group1", "group2" ] | No | List of access groups By default – [] |
groups_id | []int | [ 0, 1 ] | No | List of group IDs By default – [] |
Request example
- JSON
- XML
{
"token": "abcdefghijklmnqrstuvwxyz",
"limit": 2
}
<xml>
<token>abcdefghijklmnqrstuvwxyz</token>
<limit>2</limit>
</xml>
Response example
- JSON
- XML
{
"data": [
{
"id": 15,
"name": "Regular campaign 1",
"type": "regular",
"is_active": true,
"for_confirm": false,
"ui_tags": [
"B2C"
],
"groups": [
{
"id": 1,
"name": "subaccount"
}
]
},
{
"id": 78,
"name": "Regular campaign 2",
"type": "regular",
"is_active": false,
"for_confirm": false,
"ui_tags": [
"B2C"
],
"groups": [
{
"id": 1,
"name": "subaccount"
}
]
}
],
"error": 0,
"error_text": "Successful operation",
"total_count": 3
}
<xml>
<data>
<for_confirm>false</for_confirm>
<groups>
<id>1</id>
<name>subaccount</name>
</groups>
<id>15</id>
<is_active>true</is_active>
<name>Regular campaign 1</name>
<type>regular</type>
<ui_tags>B2C</ui_tags>
</data>
<data>
<for_confirm>false</for_confirm>
<groups>
<id>1</id>
<name>subaccount</name>
</groups>
<id>78</id>
<is_active>false</is_active>
<name>Regular campaign 2</name>
<type>regular</type>
<ui_tags>B2C</ui_tags>
</data>
<error>0</error>
<error_text>Successful operation</error_text>
<total_count>3</total_count>
</xml>
Response parameters
Parameter | Type | Description |
---|---|---|
error | int | Error code |
error_text | string | Error text |
id | int | Campaign ID |
name | string | Campaign name |
type | string | Campaign type |
is_active | bool | Campaign active flag |
for_confirm | bool | Messages with opt-in link flag |
total_count | int | Total campaign count |
ui_tags | []String | Tag list |
groups | []String | Group list |