Skip to main content

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

ParameterTypeExampleRequiredDescription
tokenstring"abcdefghijklmnqrstuvwxyz"YesAPI token
abort_if_runningbooltrueNoAbort campaign sending
By default – false
idint12YesCampaign ID

Request example

{
"abort_if_running": true,
"id": 4758,
"token": "abcdefghijklmnqrstuvwxyz"
}

Response example

{
"data": null,
"error": 0,
"error_text": "Successful operation"
}

Response parameters

ParameterTypeDescription
errorintError code
error_textstringError text