Deactivate campaign
Description
Deactivate a campaign immediately. Deactivation stops sending messages from running mailings.
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/deactivate
Request parameters
| Parameter | Type | Example | Required | Description |
|---|---|---|---|---|
| token | string | "abcdefghijklmnqrstuvwxyz" | Yes | API token |
| id | int | 18 | Yes | Campaign ID |
Request example
- JSON
- XML
{
"token": "abcdefghijklmnqrstuvwxyz",
"id": 18
}
<xml>
<token>abcdefghijklmnqrstuvwxyz</token>
<id>18</id>
</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 |
info
Deactivation temporarily pauses the campaign. All settings and data are preserved for potential reactivation.