cancelCampaign method

It is a method to cancel a scheduled campaign. The user can cancel his campaign with the specified campaign_id (you can get it after creating the mailing — see the createCampaign method).

A campaign can be canceled if it has one of the following statuses: «Planned», «Scheduled» (scheduled), «Considered by the administration» (censor_hold), «Waiting for approval» (waits_censor). The distribution status can be obtained using the getCampaignStatus method.

Principle of use

Syntax and URL to call the method
cancelCampaign (int campaign_id)
https://api.selzy.com/en/api/cancelCampaign?api_key=API_KEY&campaign_id=ID
Arguments
api_key * API access key.
campaign_id * id of the campaign to be canceled.
Return value
If the campaign has been successfully canceled:

{"result":[]}

If the campaign cannot be canceled:

  • if such campaign does not exist:
    {
      "error":"SB140212-01. 
      [Burst not found. Provided Id: 1111]",
       "code":"unspecified",
       "result":""
     }
  • if the campaign is owned by another user:
    {
      "error":"Access denied to this resource",
      "code":"unspecified",
      "result":""
    }
  • if the campaign has a status that prevents it from being canceled:
    {
      "error":"SF161129-03 
      [Campaign in status "canceled" can't be cancelled]",
      "code":"unspecified",
      "result":""
    }
Did we answer your question?
71
75

To get more help, contact our Support Team. They are available for all Selzy users 24/7.