Delete Campaigns

const Adzerk = require('@adzerk/management-sdk');
const apiKey = process.env.ADZERK_API_KEY;

async function deleteCampaign() {
  let specifications = await Adzerk.fetchSpecifications();
  let client = await Adzerk.buildClient({apiKey, specifications});

  let campaign = await"campaign", "update", {id: 12345, isDeleted: true});

require "adzerk"

def delete_campaign()
    client =["ADZERK_API_KEY"])
    campaign_id = 12345
    pp client.campaigns.delete(campaign_id)

Why Delete a Campaign?

Occasionally, you may find it useful to delete a campaign from your network. The Kevel API enables you to quickly and easily delete any campaign from your network using the Update Campaigns API endpoint. When using this endpoint, simply set the isDelete boolean value to true. The campaign will be deleted from your network.

API Syntax

When using the Update Campaigns API endpoint to delete a campaign, it is important to understand the syntax required to make the request. Because the Kevel API is a RESTful API, there is a specific request format that must be followed to ensure the endpoint can process the request. The format is:



  • PUT - the type of API request being made.
  • - the URL for the request.
  • v1 - the API version.
  • campaign - the API endpoint being called.
  • CampaignID - the ID associated with the campaign.



Remember to set the isDeleted boolean value to true.