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 enables you to 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:

Clearing attribute values

To unset or clear an attribute, set its value to NULL.

API Parameters

Example: A minimally viable ad update:

curl -X PUT -H "X-Adzerk-ApiKey:$ADZERK_API_KEY" -H "Content-Type:application/json" "https://api.kevel.co/v1/flight/123456/creative/12345" --data-binary '{"Id":12345, "IsDeleted":false, "Creative":{"Id":1234567}, "IsActive":true, "FlightId":123456}'
{
  "Id": 12345,
  "CampaignId": 123,
  "FlightId": 1234,
  "ZoneId": 1234,
  "SiteId": 12345,
  "Iframe": false,
  "PublisherAccountId": 0,
  "Impressions": 0,
  "Percentage": 0,
  "DistributionType": 1,
  "IsDeleted": false,
  "IsActive": false,
  "Creative": {
    "Id": 123456,
    "Title": "Adzerk Blue Creative",
    "ImageName": "",
    "Url": "https://adzerk.com",
    "Body": "",
    "AdvertiserId": 1234,
    "IsActive": true,
    "AdTypeId": 5,
    "Alt": "Adzerk - Native Ads",
    "IsDeleted": false,
    "IsSync": false,
    "IsHTMLJS": true,
    "ScriptBody": "Flight Creative Map",
    "Metadata": null,
    "ImageLink": "httpss://static.adzerk.net/Advertisers/",
    "IsNoTrack": true,
    "IsNetworkAd": false
  },
  "CustomTargeting": "$keywords contains \"dean\"",
  "FreqCap": 5,
  "FreqCapDuration": 1,
  "FreqCapType": 2,
  "StartDate": null,
  "EndDate": null,
  "GoalType": 1,
  "Goal": 20000,
  "Price": 1,
  "IsGoalOverride": true,
  "IsStartEndDateOverride": true,
  "ActiveKeywords": [
    "kittens",
    "cats"
  ],
  "RtbCustomFields": null
}