Activate campaign
Description
Request to activate a campaign.
Access rights
To use this method, the API token must have:
- Campaigns — Run
- 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/activate
Request parameters
| Parameter | Type | Example | Required | Description |
|---|---|---|---|---|
| token | string | "abcdefghijklmnqrstuvwxyz" | Yes | API token |
| id | int | 1 | Yes | Campaign ID |
| activate_date | string | "2025-03-15T10:00:00Z" | Yes | Activation date in RFC 3339 format |
| deactivate_date | string | "2025-03-20T15:30:00Z" | No | Deactivation date in RFC 3339 format |
| completed_date | string | "2025-04-01T18:45:00Z" | No | Completion date in RFC 3339 format |
tip
If you send start_date without a date value, the campaign is activated immediately.
Request example
- JSON
- XML
{
"token": "abcdefghijklmnqrstuvwxyz",
"id": 1,
"start_date": "2025-04-01T18:45:00Z",
"deactivate_date": "2025-05-01T18:45:00Z",
"completed_date": "2025-05-01T18:45:00Z"
}
<xml>
<token>abcdefghijklmnqrstuvwxyz</token>
<id>1</id>
<start_date>2025-04-01T18:45:00Z</start_date>
<deactivate_date>2025-05-01T18:45:00Z</deactivate_date>
<completed_date>2025-05-01T18:45:00Z</completed_date>
</xml>
Response example
- JSON
- XML
{
"data": null,
"error": 0,
"error_text": "Successful operation"
}
<xml>
<error>0</error>
<error_text>Successful operation</error_text>
</xml>
Returned parameters
| Parameter | Type | Description |
|---|---|---|
| error | int | Error code |
| error_text | string | Error description |
| data | null | No data returned |