Get broadcasts list
Description
Retrieves broadcast campaigns list.
Request URL
Method: POST
https://example.com/api/v1.1/campaigns/broadcasts/list
Request parameters
Parameter | Type | Example | Required | Description |
---|---|---|---|---|
token | string | "abcdefghijklmnqrstuvwxyz" | Yes | API token |
from_id | int | 2 | No | First in the list broadcast ID By default – 1 |
limit | int | 10 | No | Response broadcast list limit By default – 1000 |
format | string | "json" | No | Response data format By default – json |
type | string | "broadcast" | Yes | Campaign type |
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 groups 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": 3,
"name": "New campaign 1",
"type": "broadcast",
"is_active": false,
"for_confirm": false,
"ui_tags": [],
"groups": [
{
"id": 0,
"name": "main"
}
]
},
{
"id": 5,
"name": "New campaign 2",
"type": "broadcast",
"is_active": false,
"for_confirm": false,
"ui_tags": [],
"groups": [
{
"id": 0,
"name": "main"
}
]
}
],
"error": 0,
"error_text": "Successful operation",
"total_count": 17
}
<xml>
<data>
<for_confirm>false</for_confirm>
<groups>
<id>0</id>
<name>main</name>
</groups>
<id>3</id>
<is_active>false</is_active>
<name>New campaign 1</name>
<type>broadcast</type>
<ui_tags/>
</data>
<data>
<for_confirm>false</for_confirm>
<groups>
<id>0</id>
<name>main</name>
</groups>
<id>5</id>
<is_active>false</is_active>
<name>New campaign 2</name>
<type>broadcast</type>
<ui_tags/>
</data>
<error>0</error>
<error_text>Successful operation</error_text>
<total_count>17</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 campaigns count |
ui_tags | []String | List of tags |
groups | []String | List of groups |