API DOCUMENTATION Last Update: July 2025

Deactivate a Campaign

A safer and reversible alternative to deleting a campaign.

 

Headers

  Key   Value   Note
api_access_key user_api_key Optional

 

 

The data to be submitted to the API is composed of the following fields:

 

  field   Example   Note
user_id john1970 Required
user_password 1959caadac9b13dcb3 Required if not included in the headers
type campaign_deactivate Required
account_id greatwidgets Required
campaign_id 1234567890123456 Required
Output Format:
output JSON or XML Optional. If not provided, defaults to XML
callback someFunctionName Optional: JSONP format
condensed yes Optional (No white space)
Applies only to JSON(P) output

 

Notes:

  • Headers: the user_api_key value can be included in either the header section or the body of the request. If the key is provided in both locations, the API will process and validate only the value provided in the headers.

  • The ability to deactivate campaigns is based on the permissions of the user_id that is making the call.
  • Only one campaign can be deactivated at a time. Loop this call in your program to deactivate multiple campaigns.
  • Deactivating a campaign removes it from the list of campaigns that is returned in many other calls, without deleting any data associated with it (settings, customer transactions, etc.) This is often used to "turn off" recurring seasonal campaigns.

 

Example PHP Request:

If you are using PHP, the $data array would look like this:

  1. $data['user_id'] = 'john1970';
  2. $data['user_password'] = '1959caadac9b13dcb3';
  3. $data['type'] = 'campaign_deactivate';
  4. $data['account_id'] = 'greatwidgets';
  5. $data['campaign_id'] = '1234567890123456';

 

Success XML Response:

  1. <response status="success">
  2. <campaign>
  3. <id>1234567890123456</id>
  4. </campaign>
  5. </response>

 

Error XML Response:

  1. <response status="error">
  2. <error>Error message</error>
  3. </response>