Delete Creatives

📘

To delete a creative, use the Update Creative endpoint and set isDeleted to true

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

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

  let creative = await client.run("creative", "update", {id: 12345, isDeleted: true});
  console.log(creative);
}

deleteCreative();
require "adzerk"

def delete_creative()
    client = Adzerk::Client.new(ENV["ADZERK_API_KEY"])
    creative_id = 12345
    pp client.creatives.delete(creative_id)
end
delete_creative()