Delete Advertisers

Why Delete an Advertiser?

There may come a time when you would like to delete a specific advertiser. To delete an advertiser, simply use the Update Advertisers API endpoint and be sure to set the isDeleted boolean value to true.

API Syntax

When using the Delete Advertisers API endpoint, 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 https://api.kevel.co/v1/advertiser/{AdvertiserID}

Where:

JavaScript Code Example

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

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

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

deleteAdvertiser();

Ruby Code Example

require "adzerk"

def delete_advertiser()
    client = Adzerk::Client.new(ENV["ADZERK_API_KEY"])
    advertiser_id = 12345
    pp client.advertisers.delete(advertiser_id)
end
delete_advertiser()