---
title: "Create Ads"
method: POST
path: "/v1/flight/{FlightID}/creative"
---

# Create Ads

`POST /v1/flight/{FlightID}/creative`

## Request

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

## Path parameters

- `FlightID` integer, required

## Request body

- object
  - `Creative` object, required: The `creativeID` you'll get when you create a creative, wrapped in an object, like `{"Id":12345}`. Or you may omit the `id` and specify a new Creative using the object structure described on [Create Creative](ref:create-creative).
    - `id` integer, required: The ID of an existing Creative.
  - `IsActive` boolean: Whether ad should be eligible to serve. Defaults to `false`
  - `RtbCustomFields` string: Required for RTB ads _only_. JSON Object in a String. It's JSON data provided by the RTB partner. Certain parameters in the object will be required per partner. If you aren't sure what is required, your account manager will supply you with the data for this property
  - `ActiveKeywords` string[]: For Keyword Targeting. Instructions [here](doc:enabling-keyword-targeting)
  - `CustomTargeting` string: Zerkel string for Custom targeting. Instructions [here](https://dev.kevel.com/docs/custom-targeting). The maximum string length for `CustomTargeting` is 1000 characters.
  - `SiteId` integer: Site ID for Site Specific targeting
  - `ZoneId` integer: Zone ID for Zone Specific targeting
  - `IsDeleted` boolean: Whether it should be deleted
  - `Iframe` boolean: Whether Creative should use iFrame
  - `SizeOverride` boolean: Whether size needs to be overridden. Defaults to `false`
  - `IsStartEndDateOverride` boolean: Whether you are overriding the start and end date
  - `StartDateISO` string: The start date for this ad in ISO 8601 format
  - `EndDateISO` string: The end date for this ad in ISO 8601 format
  - `IsGoalOverride` boolean: Whether you are overriding the goal on the ad
  - `GoalType` integer: If you are overriding the flight's goal, sets the target goal metric for ad. Key follows: `1 = Impressions` `2 = Percentage` `3 = Click` `7 = Any Conversions` `8 = Lifetime Revenue (integer)` `9 = Daily Revenue (integer)` `10 = Monthly Revenue (integer)`
  - `Goal` integer: The Goal Amount of `GoalType`
  - `Price` number, float: The Price value - instructions [here](https://dev.kevel.com/docs/ads#general-settings-of-an-ad)
  - `AttributionSettings` object: Specify the products, categories, brands, and/or merchants that make a purchase eligible for attribution to this Ad. See [Attribution Overview](doc:attribution-overview) for more details.
    - `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"`.
  - `SearchTerms` object: See [Search Term Targeting](doc:search-term-targeting).
    - `Term` string: The term to match against
    - `IsExclude` boolean: Indicate whether the term should positively (false) or negatively (true)
    - `MatchType` '"Broad"' | '"Strict"' | '"Exact"'
  - `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. 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
  - `IsActive` boolean
  - `DontAffectParentFreqCap` boolean
  - `Creative` object
    - `IsActive` boolean
    - `ImageName` string
    - `SaveEmptyCreative` unknown
    - `Body` string
    - `IsNetworkAd` unknown
    - `Alt` unknown
    - `Title` string
    - `IsDeleted` boolean
    - `IsSync` unknown
    - `Url` string
    - `IsIdOnly` boolean
    - `IsNoTrack` unknown
    - `TemplateValues` unknown
    - `TemplateId` unknown
    - `ImageLink` string
    - `ScriptBody` string
    - `AdvertiserId` integer
    - `Metadata` unknown
    - `AdTypeId` integer
    - `IsHTMLJS` boolean
    - `Id` integer
  - `FreqCapType` unknown
  - `EndDate` unknown
  - `Iframe` unknown
  - `ZoneId` unknown
  - `IsDeleted` boolean
  - `CustomTargeting` string
  - `EndDateISO` string
  - `RtbCustomFields` unknown
  - `Impressions` integer
  - `GoalType` integer
  - `Goal` integer
  - `Price` integer
  - `FreqCapDuration` unknown
  - `Percentage` integer
  - `FreqCap` unknown
  - `IsStartEndDateOverride` boolean
  - `CustomRelevancyScore` unknown
  - `FlightId` integer
  - `ActiveKeywords` string[]
  - `SiteId` unknown
  - `CampaignId` integer
  - `Id` integer
  - `IsGoalOverride` boolean
  - `StartDateISO` string
  - `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)
