Update Ad

Why Update an Ad?

Sometimes, you may find it necessary to update an existing ad that is part of a flight or campaign. This may be needed if you want to use new graphics or images, or just make changes to the ad as part of an update to a flight or campaign. The Kevel API lets you make those updates simply and easily by using the Update Ad API call.

📘

Note

You can update all fields from Create Ads except for id.

❗️

Warning

Do not use this endpoint to update creatives from the Create Creatives endpoint. This API call is used to update ads from the Create Ads endpoint.

Also, any fields you do not include in a PUT request will be given the default values null, false, 0, or empty array, depending on the field. This will overwrite any existing values. When making a PUT request, make sure you are supplying all the fields that should have values.

API Syntax

When using the Update Ad API, 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/flight/{FlightID}/creative/{AdID}

Where:

  • PUT - the type of API request being made.
  • https://api.kevel.co - the URL for the request.
  • v1 - the API version.
  • flight - the API endpoint being called.
  • FlightID - the ID associated with the flight.
  • creative - the creative associated with the Ad.
  • AdID - the ID of the ad being updated.

Category Targeting

Send CategoryTargeting to set explicit category rules on the Ad, or "CategoryTargeting": null to make the Ad use its Flight’s rules again. A non-empty list replaces the Flight’s complete list. For the rule format, see Create Ads.


Path Params
int32
required

The ID of the Flight

int32
required

This is the ID from the Ad / Creative Flight Map Endpoint. It's not the ID from the Create Creatives endpoint.

Body Params
int32
required

ID of the Creative Flight Map / Ad

int32

ID of the Campaign

int32
required

ID of the Flight

boolean
required

If Ad is active or not

boolean
required

If Ad is deleted or not

boolean

Whether Creative should use iFrame

int32

Determines how the Ad is distributed within the flight

string

Required for RTB ads only. JSON Object in a String. It's JSON data provided by the RTB partner

AttributionSettings
object
boolean
Defaults to false

"Opts-out" of frequency cap settings imposed on it by entities above

int32

The value of the frequency cap

int32

How long the frequency cap should apply

int32

The unit for the frequency cap: 1 = Hour 2 = Day 3 = Minute.

CategoryTargeting
array of objects

The category targeting rules for the Ad, in the same format as on a Flight. An Ad that has category rules uses them instead of its Flight's rules, and the two lists are not merged. An Ad with no rules uses its Flight's rules. An Ad can hold up to 25 rules unless Kevel raises the limit for your network. A longer list returns a 400 with "Your account has exceeded the limit for CategoryTargeting on this ad. Please contact support." Set the field to null or [] to remove the Ad's rules. Send the full list on every update. An update that leaves this field out clears the rules, as it clears any other field you leave out, unless your network uses partial updates. If category targeting is not enabled for your network, Kevel ignores the field on writes and leaves it out of responses, and a malformed value still returns a 400. See Set up category targeting.

CategoryTargeting
Response

Language
Credentials
Header
LoadingLoading…
Response
Choose an example:
application/json