Delete Advertisers

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();
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()

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:

  • PUT - the type of API request being made.
  • https://api.kevel.co - the URL for the request.
  • v1 - the API version.
  • advertiser - the API endpoint being called.
  • AdvertiserID - The ID associated with the advertiser being updated.