Admin API: campaigns
Admin API methods for campaigns: list, create, edit, archive, copy, access, target checks, click and conversion logs, groups.
This page covers 15 methods for working with campaigns. All methods require a token with Full access («Полный доступ») (full) in the Api-Key header. Authorization is described on the Admin API: overview and authorization page, and the common request and error format on the Request, response and error format page.
Campaign object
The create, read, update and copy methods return the same object. The fields in the table are passed in the body on creation and update.
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes, on creation | Campaign name |
alias | string | no | The first part of the campaign link path. Latin letters, digits, _ and -, from 1 to 64 characters. Cannot start with _; health, click, clk, cloak, api are not allowed. An empty alias on creation is replaced with a random one of 7 characters |
domain_id | UUID or null | no | The campaign's domain |
traffic_source_id | UUID or null | no | Traffic source |
cost_model | string | no | cpc, cpuc, cpm, cpa, cps or revshare. Default cpc. See Campaign cost models |
cost_value | number | no | Price in USD, not less than 0. For revshare, a percentage from 0 to 100 |
traffic_loss | integer | no | Traffic loss in percent, from 0 to 99 |
rotation | string | no | Selection among regular streams: weight — by weight, position — the first matching one in order. Default weight |
uniqueness_method | string | no | none, ip, ip_ua or param. Default none |
uniqueness_ttl | integer | no | Uniqueness period in hours. 0 means 24 hours |
uniqueness_param | string | no | Name of the link parameter for the param method |
binding | boolean | no | Visitor binding |
binding_depth | string | no | stream, lander or offer. Default stream |
binding_ttl | integer | no | Binding period in hours, from 0 to 8760. 0 means the uniqueness period |
group_name | string | no | Group name |
cloaking | boolean | no | Enables cloaking |
cloak_config | object | no | Cloaking settings. Default {} |
params | array | no | Link parameters: objects with the name, param, value fields. Default [] |
s2s_postbacks | array | no | Up to 20 objects with the status, url, disabled fields. See Campaign and source S2S postbacks |
state | string | no | active, paused or archived. Default active |
In s2s_postbacks, the status field is a status without spaces, up to 32 characters, or * for all statuses. The url field is a full http:// or https:// address up to 2048 characters without spaces.
Read-only fields:
id— campaign ID, UUID;seq— sequence number, the same as in the ID column in the panel;workspace_id— team ID;owner_id— owner. When created with a token, the token's creator; not accepted from the request body;created_at— creation time;can_edit— whether the user can change the campaign; present in list and read responses.
Reading
List campaigns
GET /api/v1/campaigns
Returns the team's campaigns, newest first.
| Parameter | Type | Required | Description |
|---|---|---|---|
state | string | no | Only campaigns in this state: active, paused or archived |
limit | integer | no | Page size, default 50. 0 means all campaigns |
offset | integer | no | How many campaigns to skip, default 0 |
Response 200: an object with the items array and the total number — how many campaigns match the conditions regardless of limit.
curl "https://panel.example.com/api/v1/campaigns?state=active&limit=100" \
-H "Api-Key: <token>"Get a campaign
GET /api/v1/campaigns/{id}
Returns one campaign by its id. Response 200 — a campaign object. Error: 404 not_found.
Creating and editing
Create a campaign
POST /api/v1/campaigns
Creates a campaign. Only the name field is required; the others get the default values from the table above.
curl -X POST https://panel.example.com/api/v1/campaigns \
-H "Api-Key: <token>" \
-H "Content-Type: application/json" \
-d '{"name":"FB · Sweeps US","cost_model":"cpc","cost_value":0.05,"uniqueness_method":"ip_ua","uniqueness_ttl":24,"group_name":"Sweeps"}'Response 201 — the created campaign object with the assigned id, seq and alias. Errors: 400 bad_request, 409 conflict, 422 validation — the messages are in the Errors section.
Streams are added with separate methods — see Admin API: streams.
Edit a campaign
PUT /api/v1/campaigns/{id}
Changes the fields you pass. Fields not in the body keep their previous values.
- The
s2s_postbackslist changes only if an array is passed. The array you pass replaces the whole list; an empty array removes all addresses. - The
paramsarray and thecloak_configobject are also replaced as a whole.
curl -X PUT https://panel.example.com/api/v1/campaigns/5b0c6a1e-3d0f-4a52-9c1b-7f2f1f3f8a10 \
-H "Api-Key: <token>" \
-H "Content-Type: application/json" \
-d '{"state":"paused"}'Response 200 — the campaign object after the change. Errors: 400 bad_request, 404 not_found, 409 conflict, 422 validation.
After alias changes, the old link stops working. In the paused and archived states, the campaign link responds with 404.
Archive a campaign
DELETE /api/v1/campaigns/{id}
Moves the campaign to the archived state. The record, streams and statistics are kept, and the campaign appears in the trash. Response 204 with no body. Error: 404 not_found.
You can bring the campaign back with the restore method of the trash or with a PUT request with {"state":"active"}. What happens to traffic is described on the Campaign archive and trash page.
Clone a campaign
POST /api/v1/campaigns/{id}/clone
Creates a copy of the campaign with all its streams. No body is needed.
· копия(“copy”) is appended to the name.- A random
aliasis generated. - The copy is created in the
pausedstate; streams keep their states. - The owner, domain, source, parameters and postbacks are carried over unchanged.
Response 201 — the new campaign object. Errors: 404 not_found; 422 validation if the streams contain an unknown filter or an unavailable offer or landing page.
Team member access
Access gives a team member a view of the campaign and its statistics. More on the Campaign access and “Share” page.
Who the campaign is shared with
GET /api/v1/campaigns/{id}/shares
Response 200: an object with the user_ids array — IDs of the users who can view the campaign. Error: 404 not_found.
Set the access list
POST /api/v1/campaigns/{id}/shares
Replaces the whole list.
| Field | Type | Required | Description |
|---|---|---|---|
user_ids | array of UUIDs | no | The new full list. An empty array or a request without the field closes access for everyone. IDs not from this team are skipped |
Response 204 with no body. Errors: 400 bad_request, 404 not_found. User IDs are returned by the list in Admin API: users.
Target checks
What the checks and messages mean is described on the Campaign target diagnostics and monitoring page.
Check the target configuration
GET /api/v1/campaigns/{id}/target-health
Checks the offers and landing pages of active streams without network requests: whether the target exists, whether an address is set, whether a hosted page's archive is uploaded.
Response 200: the items array and network_checked set to false. Item fields:
stream— stream name;kind—offer,landerorstream;id,name— target ID and name. For an item withkindstream,idholds the stream ID, andnameis empty;state—ok,warningorerror;message— explanation, for exampleКонфигурация доступна(configuration available) orОффер не активен(offer not active).
Error: 404 not_found.
Monitoring state
GET /api/v1/campaigns/{id}/target-monitor
Response 200: enabled — whether monitoring is on, and runs — up to 20 latest checks, newest first. A check has id, checked_at and items in the same format as target-health. After a network request, an item gets http_status and duration_ms — response time in milliseconds. Error: 404 not_found.
Turn monitoring on or off
PUT /api/v1/campaigns/{id}/target-monitor
| Field | Type | Required | Description |
|---|---|---|---|
enabled | boolean | yes | true — turn on, false — turn off |
Response 200 — the same object as the state method returns. Errors: 404 not_found; 422 validation with the message нужно enabled: true или false (enabled must be true or false).
Click and conversion logs
Both logs return records for a period, newest first. Common parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
from | date and time | no | Start of the period in RFC 3339 format, for example 2026-10-01T00:00:00Z. Default — 24 hours ago |
to | date and time | no | End of the period in the same format. Default — the current moment |
limit | integer | no | Page size from 1 to 1000, default 100 |
page | integer | no | Page number, starting from 1 |
A from or to value in a different format is ignored: the default value is used.
Response 200: the items array, total — the number of records that match the request conditions, limit — page size.
Errors of both methods: 404 not_found; 400 report_error — the statistics query failed, the cause is in message; 503 no_analytics — statistics are unavailable.
Click log
GET /api/v1/campaigns/{id}/clicks
Additional parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
subid | string | no | Search by part of the click ID |
stream | UUID | no | Only clicks of this stream |
Click fields: subid, ts, ip, campaign_id, stream_id, source_id, offer_id, lander_id, country, region, city, isp, connection_type, device_type, os, os_version, browser, browser_version, user_agent, referrer, lang, is_bot, is_unique, cost, sub_ids, tokens.
sub_ids and tokens are “name — value” objects. The values of token, access_token, capi_token, sub_id_12 and values that start with EAA are replaced with ***.
curl "https://panel.example.com/api/v1/campaigns/5b0c6a1e-3d0f-4a52-9c1b-7f2f1f3f8a10/clicks?from=2026-10-01T00:00:00Z&to=2026-10-02T00:00:00Z&limit=500&page=1" \
-H "Api-Key: <token>"Searching for a click across all campaigns is described on the Admin API: logs and diagnostics page.
Conversion log
GET /api/v1/campaigns/{id}/conversions
Each conversion is shown as one row with its latest status. A conversion is identified by the “click and txid” pair.
Conversion fields: subid, ts — time of the last change, status, payout, revenue, offer_id, txid.
Campaign groups
A group is a text label in the group_name field. You can assign a group to a campaign with the campaign update method. The methods below change the label for all campaigns of the group at once.
Rename a group
PUT /api/v1/campaign-groups?name=<current name>
In the query string, name is the group's current name; in the body, name is the new one. Both are required. If the new name matches an existing group, the groups are merged.
curl -X PUT "https://panel.example.com/api/v1/campaign-groups?name=Sweeps" \
-H "Api-Key: <token>" \
-H "Content-Type: application/json" \
-d '{"name":"Sweeps US"}'Response 200: {"updated": 3} — the number of changed campaigns. Error: 422 validation.
Delete a group
DELETE /api/v1/campaign-groups?name=<name>
Removes the label from the group's campaigns. The campaigns themselves remain. Response 200: an object with the updated field. Error: 422 validation with the message name обязателен (name is required).
Errors
Common codes are on the Request, response and error format page. Messages of the methods on this page:
| Code | Message | Cause |
|---|---|---|
400 bad_request | invalid json | The request body was not parsed |
400 bad_request | некорректный идентификатор или значение (invalid ID or value) | id in the address or in the body is not a UUID |
404 not_found | resource not found | There is no campaign with this id |
409 conflict | кампания с таким alias уже есть (a campaign with this alias already exists) | alias is taken by another campaign |
422 validation | name is required | Empty name on creation |
422 validation | alias: только латиница, цифры, _ и -, до 64 символов (без /) (alias: Latin letters, digits, _ and - only, up to 64 characters, no /) | Invalid alias, including an empty one on update |
422 validation | alias «api» зарезервирован — выберите другой (alias “api” is reserved — choose another) | alias starts with _ or is in the list of forbidden values |
422 validation | неизвестная модель стоимости (unknown cost model) | cost_model is not from the list |
422 validation | цена должна быть от 0 до 1 000 000 000 (price must be from 0 to 1,000,000,000) | cost_value is less than 0 or greater than 1,000,000,000 |
422 validation | RevShare должен быть от 0 до 100% (RevShare must be from 0 to 100%) | cost_value is greater than 100 with revshare |
422 validation | traffic_loss должен быть от 0 до 99 (traffic_loss must be from 0 to 99) | traffic_loss is out of range |
422 validation | binding_depth: stream, lander или offer (binding_depth: stream, lander or offer) | A different binding_depth value |
422 validation | Срок привязки: от 0 до 8760 часов (0 — срок уникальности) (binding period: from 0 to 8760 hours, 0 means the uniqueness period) | binding_ttl is out of range |
422 validation | Не больше 20 S2S-постбеков на кампанию (no more than 20 S2S postbacks per campaign) | s2s_postbacks has more than 20 rows |
422 validation | Постбек кампании №1: … (campaign postback No. 1: …) | An error in the status or address of the row with this number |
422 validation | выбранный домен недоступен (the selected domain is unavailable) | The team has no domain with this domain_id |
422 validation | name обязателен (name is required) | The query string of the group methods has no name |
422 validation | новое имя группы обязательно (new group name is required), некорректное тело запроса (invalid request body) | The group rename body has no name, or the body was not parsed |
422 validation | нужно enabled: true или false (enabled must be true or false) | The monitoring method body has no enabled, or the body was not parsed |