Skip to main content
Documentation for version v74

Complete campaign

Description

Complete a campaign immediately. Completion stops sending messages for running mailings and switches all nested mailings and scenarios to the "inactive" status.

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/completed

Request parameters

ParameterTypeExampleRequiredDescription
tokenstring"abcdefghijklmnqrstuvwxyz"YesAPI token
idint18YesCampaign ID

Request example

{
"token": "abcdefghijklmnqrstuvwxyz",
"id": 18
}

Response example

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

Returned parameters

ParameterTypeDescription
errorintError code
error_textstringError description
datanullNo data returned
warning

Completing a campaign is irreversible. After completion, the campaign cannot be restarted; you can only create a new one.