---
title: "Update Ad"
method: PUT
path: "/v1/flight/{FlightID}/creative/{AdID}"
---

# Update Ad

`PUT /v1/flight/{FlightID}/creative/{AdID}`

## Request

- Base URL: `https://api.kevel.co`
- URL: `https://api.kevel.co/v1/flight/{FlightID}/creative/{AdID}`
- Auth: API key in header `X-Adzerk-ApiKey`

## Path parameters

- `FlightID` integer, required
- `AdID` integer, required

## Request body

- object
  - `Id` integer, required: ID of the Creative Flight Map / Ad
  - `CampaignID` integer: ID of the Campaign
  - `FlightID` integer, required: ID of the Flight
  - `Creative` object, required: A `creative` object that contains the ID (`id`) of the Creative
  - `IsActive` boolean, required: If Ad is active or not
  - `IsDeleted` boolean, required: If Ad is deleted or not
  - `Iframe` boolean: Whether Creative should use iFrame
  - `DistributionType` integer: Determines how the Ad is distributed within the flight
  - `RtbCustomFields` string: Required for RTB ads only. JSON Object in a String. It's JSON data provided by the RTB partner
  - `AttributionSettings` object
    - `AttributableItems` object[]: The set of products, categories, and brands that may be attributed to this Ad. See [Kevel Attribution](doc:attribution-overview) for more details.
      - `MatchType` 'SameProduct' | 'SameCategoryBrand' | 'SameBrand' | 'SameMerchant': The match type value determines the other keys included and corresponds to the Flight-level attribution setting for the specificity of the match.
      - `ProductId` string: The Product ID to use with the match. Use with `"MatchType": "SameProduct"` only.
      - `MerchantId` string: The Merchant ID to use with the match. Use with `"MatchType": "SameProduct"` only.
      - `CategoryId` string: The Category ID to use with the match. Use with `"MatchType": "SameCategoryBrand"` only.
      - `BrandId` string: The Brand ID to use with the match. Use with `"MatchType": "SameCategoryBrand"` and `"MatchType": "SameBrand"`.
  - `DontAffectParentFreqCap` boolean: "Opts-out" of frequency cap settings imposed on it by entities above
  - `FreqCap` integer: The value of the frequency cap
  - `FreqCapDuration` integer: How long the frequency cap should apply
  - `FreqCapType` integer: The unit for the frequency cap: `1 = Hour 2 = Day 3 = Minute`.
  - `CategoryTargeting` object[]: 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](doc:set-up-category-targeting).
    - `Id` string, required: The category to match, written exactly as your ad requests send it in `placements[].category`. Kevel trims spaces from the start and end when it saves the value, and matching is exact and case-sensitive. A parent category does not match its children. The value is a string of 1 to 200 characters.
    - `IsExclude` boolean, required: `true` for an exclude rule, `false` for an include rule.

## Response `200`

200

- object
  - `Id` integer
  - `CampaignId` integer
  - `FlightId` integer
  - `ZoneId` integer
  - `SiteId` integer
  - `Iframe` boolean
  - `Impressions` integer
  - `Percentage` integer
  - `DistributionType` integer
  - `IsDeleted` boolean
  - `IsActive` boolean
  - `Creative` object
    - `Id` integer
    - `Title` string
    - `ImageName` string
    - `Url` string
    - `Body` string
    - `AdvertiserId` integer
    - `IsActive` boolean
    - `AdTypeId` integer
    - `Alt` string
    - `IsDeleted` boolean
    - `IsSync` boolean
    - `IsHTMLJS` boolean
    - `ScriptBody` string
    - `Metadata` unknown
    - `ImageLink` string
    - `IsNoTrack` boolean
    - `IsNetworkAd` boolean
  - `CustomTargeting` string
  - `FreqCap` integer
  - `FreqCapDuration` integer
  - `FreqCapType` integer
  - `StartDate` unknown
  - `EndDate` unknown
  - `GoalType` integer
  - `Goal` integer
  - `Price` integer
  - `IsGoalOverride` boolean
  - `IsStartEndDateOverride` boolean
  - `ActiveKeywords` string[]
  - `RtbCustomFields` unknown
  - `CategoryTargeting` object[]: The category targeting rules saved on the Ad itself, each with an `Id` and `IsExclude`. An Ad with no rules of its own uses its Flight's rules, and they do not appear here. Left out when category targeting is not enabled for your network.
    - `Id` string: The category the rule matches.
    - `IsExclude` boolean: `true` for an exclude rule, `false` for an include rule.

---

[API](https://skmtc.dev/kevel/apis/adzerk-management-apis.md) - [All operations](https://skmtc.dev/kevel/apis/adzerk-management-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/kevel/apis/adzerk-management-apis/revisions/01ab38426629?raw)
