Deactivate campaign
Description
Deactivates a campaign.
Can also abort message sending, if a campaign is active:
abort_if_running
= true
property immediately aborts all messages in sending queue. If the value is false
the campaign will be deactivated, though its already scheduled messages will be sent.
Request URL
Method: POST
https://example.com/api/v1.1/campaigns/deactivate
Request parameters
Parameter | Type | Example | Required | Description |
---|---|---|---|---|
token | string | "abcdefghijklmnqrstuvwxyz" | Yes | API token |
abort_if_running | bool | true | No | Abort campaign sending By default – false |
id | int | 12 | Yes | Campaign ID |
Request example
- JSON
- XML
{
"token": "abcdefghijklmnqrstuvwxyz",
"id": "15",
"abort_if_running": "true"
}
<xml>
<token>abcdefghijklmnqrstuvwxyz</token>
<id>15</id>
<abort_if_running>true</abort_if_running>
</xml>
Response example
- JSON
- XML
{
"data": null,
"error": 0,
"error_text": "Successful operation"
}
<xml>
<data/>
<error>0</error>
<error_text>Successful operation</error_text>
</xml>
Response parameters
Parameter | Type | Description |
---|---|---|
error | int | Error code |
error_text | string | Error text |