Get campaign information
Description
Retrieve detailed information about a campaign, including audience settings, LCG, marketing activities and attributes.
To use this method, the API token must have:
- Campaigns — View object
- Access to the groups where the campaigns are located
Configure permissions in Settings — Tokens.
Request URL
Method: POST
https://example.com/api/v1.1/scampaigns/get
Request parameters
| Parameter | Type | Example | Required | Description |
|---|---|---|---|---|
| token | string | "abcdefghijklmnqrstuvwxyz" | Yes | API token |
| id | int | 22 | Yes | Campaign ID |
| format | string | "json" | No | Response format default – "json" |
| marketing_activities | bool | false | No | Include the list of marketing activities default – false |
Request example
- JSON
- XML
{
"token": "abcdefghijklmnqrstuvwxyz",
"id": 22,
"marketing_activities": true
}
<xml>
<token>abcdefghijklmnqrstuvwxyz</token>
<id>22</id>
<marketing_activities>true</marketing_activities>
</xml>
Response example
- JSON
- XML
{
"data": [
{
"id": 22,
"is_delete": false,
"createtime": "2025-08-22T09:00:21.654Z",
"updatetime": "2025-08-22T11:08:10.216Z",
"updated_user": "api.user",
"name": "Seasonal sale",
"description": "Campaign for promoting the spring collection",
"tags": [],
"state": "active",
"audience": {
"state": "ready",
"seg_id": 4,
"list_id": 2,
"extension_conf": {
"workflows": {"ids": []},
"triggers": {"ids": []},
"broadcasts": {"ids": [1]},
"regulars": {"ids": []},
"abns": {"ids": []},
"placements": {"ids": []}
},
"lcg": {
"stratification_field_settings": [
{
"field_name": "_sex",
"field_type": "enum",
"condition_type": "list",
"conditions": [
{"list": [1]},
{"list": [2]}
]
},
{
"field_name": "_region",
"field_type": "unicode",
"condition_type": "list",
"conditions": [
{"list": ["Moscow", "Saint Petersburg"]},
{"list": ["Kazan"]}
]
}
],
"ignore_entities": {
"workflows": {"ids": []},
"triggers": {"ids": []},
"broadcasts": {"ids": [1]},
"regulars": {"ids": []},
"abns": {"ids": []},
"placements": {"ids": []}
},
"size_formation_settings": {
"limit": 133333,
"percent": "16.00"
}
}
},
"active_period": {
"settings": {
"tz": "UTC",
"end_at": "2025-08-24T12:03:21.93Z"
},
"history": {
"start": "2025-08-22T09:00:47.786Z"
}
},
"counters": {
"segment": 631,
"test_group": 530,
"local_control_group": 101,
"global_control_group": 0
},
"marketing_activities_counter": 2,
"groups": [
{
"id": 0,
"name": "main"
}
],
"attributes": {
"season": "spring_2025",
"branch": "marketing"
},
"marketing_activities": [
{
"workflows": [
{
"id": 9,
"name": "Welcome Series",
"is_active": true
}
],
"triggers": [
{
"id": 6,
"name": "Thank You Purchase",
"is_active": true
}
],
"broadcasts": [
{
"id": 1,
"name": "Seasonal Sale Announcement",
"is_active": true,
"is_completed": false
}
],
"regulars": [
{
"id": 2,
"name": "Weekly Newsletter",
"is_active": true
}
],
"abns": [],
"placements": []
}
]
}
],
"error": 0,
"error_text": "Successful operation"
}
<xml>
<error>0</error>
<error_text>Successful operation</error_text>
<data>
<id>22</id>
<is_delete>false</is_delete>
<createtime>2025-08-22T09:00:21.654Z</createtime>
<updatetime>2025-08-22T11:08:10.216Z</updatetime>
<updated_user>api.user</updated_user>
<name>Seasonal sale</name>
<description>Campaign for promoting the spring collection</description>
<tags/>
<state>active</state>
<audience>
<state>ready</state>
<seg_id>4</seg_id>
<list_id>2</list_id>
<extension_conf>
<workflows>
<ids/>
</workflows>
<triggers>
<ids/>
</triggers>
<broadcasts>
<ids>
<id>1</id>
</ids>
</broadcasts>
<regulars>
<ids/>
</regulars>
<abns>
<ids/>
</abns>
<placements>
<ids/>
</placements>
</extension_conf>
<lcg>
<stratification_field_settings>
<field>
<field_name>_sex</field_name>
<field_type>enum</field_type>
<condition_type>list</condition_type>
<conditions>
<condition>
<list>
<value>1</value>
</list>
</condition>
<condition>
<list>
<value>2</value>
</list>
</condition>
</conditions>
</field>
</stratification_field_settings>
<ignore_entities>
<broadcasts>
<ids>
<id>1</id>
</ids>
</broadcasts>
</ignore_entities>
<size_formation_settings>
<limit>133333</limit>
<percent>16.00</percent>
</size_formation_settings>
</lcg>
</audience>
<active_period>
<settings>
<tz>UTC</tz>
<end_at>2025-08-24T12:03:21.93Z</end_at>
</settings>
<history>
<start>2025-08-22T09:00:47.786Z</start>
</history>
</active_period>
<counters>
<segment>631</segment>
<test_group>530</test_group>
<local_control_group>101</local_control_group>
<global_control_group>0</global_control_group>
</counters>
<marketing_activities_counter>2</marketing_activities_counter>
<groups>
<group>
<id>0</id>
<name>main</name>
</group>
</groups>
<attributes>
<season>spring_2025</season>
<branch>marketing</branch>
</attributes>
</data>
</xml>
Returned parameters
Top-level fields
| Parameter | Type | Description |
|---|---|---|
error | int | Error code. 0 – successful execution |
error_text | string | Error description |
data | array | Array of campaign objects |
The data object
Contains the main campaign information.
| Parameter | Type | Description |
|---|---|---|
id | int | Campaign ID |
name | string | Campaign name |
description | string | Campaign description |
list_id | int | Profile database ID |
seg_id | int | Segment ID |
state | string | Current campaign status |
createtime | string | Campaign creation date and time |
updatetime | string | Last update date and time |
updated_user | string | User who made the last changes |
is_delete | boolean | Deletion flag |
tags | array | Campaign tags |
groups | array | Access groups |
marketing_activities_counter | int | Number of marketing activities (mailings, scenarios, placements) |
attributes | object | Campaign attributes |
counters | object | Profile counters for the audience, Test group, Local and Global control groups |
The counters object
Contains profile counts for different groups.
| Parameter | Type | Description |
|---|---|---|
segment | int | Number of profiles in the segment |
test_group | int | Number of profiles in the test group (TG) |
local_control_group | int | Number of profiles in the Local control group (LCG) |
global_control_group | int | Number of profiles in the Global control group (GCG) of the profile database |
The active_period object
Contains information about the campaign timeframe.
| Parameter | Type | Description |
|---|---|---|
settings | object | Planned active period settings |
history | object | Actual active period data |
settings
| Parameter | Type | Description |
|---|---|---|
tz | string | Campaign time zone |
start_at | string | Planned activation date |
end_at | string | Planned completion date |
history
| Parameter | Type | Description |
|---|---|---|
start | string | Actual activation date |
The audience object
Contains campaign audience settings and information.
| Parameter | Type | Description |
|---|---|---|
state | string | Audience building status |
seg_id | int | Campaign segment ID |
list_id | int | Profile database ID |
extension_conf | object | Audience expansion activities |
lcg | object | Local control group settings |
extension_conf
Activities included in audience expansion.
| Parameter | Type | Description |
|---|---|---|
workflows | object | Scenarios that expand the audience |
triggers | object | Triggered mailings that expand the audience |
broadcasts | object | Broadcast mailings that expand the audience |
regulars | object | Regular mailings that expand the audience |
abns | object | A/B tests that expand the audience |
placements | object | Placements that expand the audience |
Nested extension_conf objects
Each object contains:
| Parameter | Type | Description |
|---|---|---|
ids | array | Activity ID list |
lcg (Local control group)
| Parameter | Type | Description |
|---|---|---|
stratification_field_settings | array | Stratification settings |
ignore_entities | object | Activities that ignore LCG |
size_formation_settings | object | LCG size settings |
stratification_field_settings
| Parameter | Type | Description |
|---|---|---|
field_name | string | Field name for stratification |
field_type | string | Field type |
condition_type | string | Condition type for stratification |
conditions | array | Stratification conditions |
ignore_entities
Activities that ignore LCG audience building.
| Parameter | Type | Description |
|---|---|---|
workflows | object | Scenarios that ignore LCG |
triggers | object | Triggers that ignore LCG |
broadcasts | object | Broadcast mailings that ignore LCG |
regulars | object | Regular mailings that ignore LCG |
abns | object | A/B tests that ignore LCG |
placements | object | Placements that ignore LCG |
size_formation_settings
LCG size settings.
| Parameter | Type | Description |
|---|---|---|
limit | int | LCG size limit |
percent | string | LCG share of the audience in percent |
The marketing_activities object
Contains the list of all campaign marketing activities.
| Parameter | Type | Description |
|---|---|---|
workflows | array | Scenarios |
triggers | array | Triggers |
broadcasts | array | Broadcasts |
regulars | array | Regular mailings |
abns | array | A/B tests |
placements | array | Placements |
Common fields of marketing activities
| Parameter | Type | Description |
|---|---|---|
id | int | Activity ID |
name | string | Marketing activity name |
is_active | boolean | Activity status |
is_completed | boolean | Completion status |