Delete Campaigns

📘

To delete a Campaign, use the Update Campaigns endpoint and set isDeleted to true

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 client.run("campaign", "update", {id: 12345, isDeleted: true});
  console.log(campaign);
}

deleteCampaign();
require "adzerk"

def delete_campaign()
    client = Adzerk::Client.new(ENV["ADZERK_API_KEY"])
    campaign_id = 12345
    pp client.campaigns.delete(campaign_id)
end
delete_campaign()