---
title: "Create Flight"
method: POST
path: "/v1/flight"
---

# Create Flight

`POST /v1/flight`

This API call adds a new flight to a campaign.

## Request body

- object
  - `Name` string, required — The flight name. Max length is 300 characters.
  - `StartDateISO` string, required — UTC start date in ISO 8601 format: `YYYY-MM-DDTHH:MM:SS.SSSSSSS`. This can also be sent in the format of `YYYY-MM-DD`.
  - `CampaignId` integer, required — The ID of the campaign.
  - `PriorityId` integer, required — The ID of the [Priority](https://dev.adzerk.com/docs/priorities). Here are the [Priority API endpoints](https://dev.adzerk.com/v1.0/reference/priority).
  - `GoalType` integer, required — This is the metric that Kevel uses to pace the ads so it hits the desired goal by the end date. Key follows: `1 = Impressions 2 = Percentage 3 = Click 7 = Conversion 8 = Revenue 9 = Daily Revenue 10 = Monthly Revenue`. Instructions are [here](https://dev.adzerk.com/v1.0/docs/flights#section-goals)
  - `Impressions` integer, required — The goal amount - specifies the number of GoalTypes to aim for during the life of the campaign. For Revenue, Daily Revenue and Monthly Revenue Goal Types the maximum Goal Amount is 500000000. For all other GoalTypes the maximum Goal Amount is 2147483647. Instructions are [here](https://dev.kevel.com/v1.0/docs/flights#section-goals). Note: the field is named Impressions even if Goal Type is not set to Impressions.
  - `IsActive` boolean, required — Specifies whether campaigns should be active or inactive. Defaults to `false`.
  - `RateType` integer, required — The Rate value - instructions [here](https://dev.adzerk.com/v1.0/docs/flights#section-rateprice). Key: `1 = Flat 2 = CPM 3 = CPC 4 = CPA View 5 = CPA Click 6 = CPA View & Click`.
  - `EndDateISO` string — UTC end date in ISO 8601 format: ``YYYY-MM-DDTHH:MM:SS.SSSSSSS`. You can also send in a standard date of `YYYY-MM-DD`. **Required** if `GoalType` is not `2`, `9` or `10`.
  - `IsDeleted` boolean — Specifies whether flight should be deleted. Do not use when creating a flight. Defaults to `false`.
  - `Price` number, float — The Price value - instructions [here](https://dev.adzerk.com/v1.0/docs/flights#section-rateprice).
  - `CapType` integer — The cap type metric. Instructions [here](https://dev.adzerk.com/v1.0/docs/flights#section-caps). Key: `1 = Impressions 2 = Clicks 3 = Conversions 4 = Revenue`. Do not set to `0` - if removing, set to `null`.
  - `DailyCapAmount` integer — The maximum # of `CapType` per day. Instructions [here](https://dev.kevel.com/v1.0/docs/flights#section-caps).
  - `LifetimeCapAmount` integer — The maximum # of `CapType` per lifetime. Instructions [here](https://dev.kevel.com/v1.0/docs/flights#section-caps).
  - `Keywords` string — Keywords used for targeting. Instructions [here](https://dev.kevel.com/docs/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.
  - `CustomFieldsJSON` string — Sets the value of custom fields based on a custom fields schema. Must contact support before use. More info [here](https://dev.kevel.com/v1.0/docs/custom-fields).
  - `IsFreqCap` boolean — Set to `true` if doing capping. If false or null, then the other Freq fields are ignored. Learn more about FC [here](https://dev.kevel.com/docs/flight-frequency-capping). If not already enabled, you'll need your account manager to enable it.
  - `FreqCap` integer — The number of times the frequency cap should occur. Cannot be 0 unless `FreqCapType` is None (0).
  - `FreqCapDuration` integer — Specifies how often the frequency cap should occur. Cannot be 0 unless `FreqCapType` is None (0).
  - `FreqCapType` integer — Specifies which unit of time you would like frequency capping to occur. Key: `1 = Hour 2 = Day 3 = Minute`.
  - `DontAffectParentFreqCap` boolean — If true, opts-it out of frequency cap settings imposed at advertiser or campaign level.
  - `IsCompanion` boolean — If `true`, enables companion ads. `IsCompanion` must be set to `false` when `IsNoDuplicates` is `true`, and vice versa. Learn more [here](https://dev.kevel.com/docs/additional-display-rules#section-companion-ads).
  - `isNoDuplicates` boolean — If `true`, enables no duplicates. `IsCompanion` must be set to `false` when `IsNoDuplicates` is true, and vice versa.
  - `DuplicateMode` integer — Indicates which level no duplicates should be enforced on. Key follows: `1: Flight 2: Campaign 3: Advertiser 4: Creative`.
  - `DeliveryStatus` integer — Read-only. Status of the flight. The mapping of the status against the [UI](https://dev.kevel.com/docs/campaigns#flights-and-ads) are in brackets. Key: 0 = Pending (blue) 1 = Healthy (green) 2 = BorderLine (amber) 3 = InDanger (red) 5 = Underdelivered (amber).
  - `IsTrackingConversions` boolean — If `true`, enables conversion tracking endpoints/pixels.
  - `CanPassback` boolean — Sets whether a flight in an adChained-enabled priority can pass back to the next flight in the adChain.
  - `PassbackSortOrder` integer — Sets the order of a flight in the adChain. `PassbackSortOrder` is a transient value that can be modified by internal processes in the UI. Although the value may change, the actual sort order of flights in the adChain will remain consistent. Setting two flights to the same `PassbackSortOrder` will cause the flights to be chosen randomly. Setting `PassbackSortOrder` to `0` will cause the flight to appear as `"--"` in the UI, but the flight will still be part of the adChain. This is not recommended.
  - `IsECPMOptimized` boolean — Specifies whether `ECPM Optimization` is enabled.
  - `ECPMOptimizePeriod` integer — Timeframe to optimize for [1 - 90 days].
  - `ECPMMultiplier` number, float — The final eCPM will be multiplied by this amount. Must be at least 0.01.
  - `FloorECPM` number, float — Minimum eCPM. Must be at least 0.01.
  - `CeilingECPM` number, float — Maximum eCPM. Must be at least 0.01.
  - `DefaultECPM` number, float — This is the eCPM that will be used while the Flight is in burn-in mode. Must be at least 0.01.
  - `ECPMBurnInImpressions` integer — Impressions per creative to show before using the calculated eCPM over the default eCPM [1 - 2147483648].
  - `EffectiveCPMOverride` number, float — Sets a manual override to a flight's CPM, e.g. so a Flat Rate flight can compete in an auction priority.
  - `DatePartingStartTimeISO` string — Targets the flight to certain hours within a day. Use ISO 8601 format: `HH:MM:SS`. *(This parameter is part of Kevel's legacy day parting features. It is still supported, but will be ignored if a Flight has one or more new day parts. Learn more about new day parting features [here](https://dev.kevel.com/docs/day-hour-parting) and about legacy day parts [here](https://dev.kevel.com/docs/day-hour-parting-v1).)*
  - `DatePartingEndTimeISO` string — Targets the flight to certain hours within a day. Use ISO 8601 format: `HH:MM:SS`. *(This parameter is part of Kevel's legacy day parting features. It is still supported, but will be ignored if a Flight has one or more new day parts. Learn more about new day parting features [here](https://dev.kevel.com/docs/day-hour-parting) and about legacy day parts [here](https://dev.kevel.com/docs/day-hour-parting-v1).)*
  - `IsSunday` boolean — If `true`, targets this day. Defaults to `false` if you have filled in the `DateParting` fields. *(This parameter is part of Kevel's legacy day parting features. It is still supported, but will be ignored if a Flight has one or more new day parts. Learn more about new day parting features [here](https://dev.kevel.com/docs/day-hour-parting) and about legacy day parts [here](https://dev.kevel.com/docs/day-hour-parting-v1).)*
  - `IsMonday` boolean — If `true`, targets this day. Defaults to `false` if you have filled in the `DateParting` fields. *(This parameter is part of Kevel's legacy day parting features. It is still supported, but will be ignored if a Flight has one or more new day parts. Learn more about new day parting features [here](https://dev.kevel.com/docs/day-hour-parting) and about legacy day parts [here](https://dev.kevel.com/docs/day-hour-parting-v1).)*
  - `IsTuesday` boolean — If `true`, targets this day. Defaults to `false` if you have filled in the `DateParting` fields. *(This parameter is part of Kevel's legacy day parting features. It is still supported, but will be ignored if a Flight has one or more new day parts. Learn more about new day parting features [here](https://dev.kevel.com/docs/day-hour-parting) and about legacy day parts [here](https://dev.kevel.com/docs/day-hour-parting-v1).)*
  - `IsWednesday` boolean — If `true`, targets this day. Defaults to `false` if you have filled in the `DateParting` fields. *(This parameter is part of Kevel's legacy day parting features. It is still supported, but will be ignored if a Flight has one or more new day parts. Learn more about new day parting features [here](https://dev.kevel.com/docs/day-hour-parting) and about legacy day parts [here](https://dev.kevel.com/docs/day-hour-parting-v1).)*
  - `IsThursday` boolean — If `true`, targets this day. Defaults to `false` if you have filled in the `DateParting` fields. *(This parameter is part of Kevel's legacy day parting features. It is still supported, but will be ignored if a Flight has one or more new day parts. Learn more about new day parting features [here](https://dev.kevel.com/docs/day-hour-parting) and about legacy day parts [here](https://dev.kevel.com/docs/day-hour-parting-v1).)*
  - `IsFriday` boolean — If `true`, targets this day. Defaults to `false` if you have filled in the `DateParting` fields. *(This parameter is part of Kevel's legacy day parting features. It is still supported, but will be ignored if a Flight has one or more new day parts. Learn more about new day parting features [here](https://dev.kevel.com/docs/day-hour-parting) and about legacy day parts [here](https://dev.kevel.com/docs/day-hour-parting-v1).)*
  - `IsSaturday` boolean — If `true`, targets this day. Defaults to `false` if you have filled in the `DateParting` fields. *(This parameter is part of Kevel's legacy day parting features. It is still supported, but will be ignored if a Flight has one or more new day parts. Learn more about new day parting features [here](https://dev.kevel.com/docs/day-hour-parting) and about legacy day parts [here](https://dev.kevel.com/docs/day-hour-parting-v1).)*
  - `IsArchived` boolean — Specifies whether flight is archived.
  - `RequireStrictLocation` boolean — If true, the ad request needs exact longitude and latitude in order to use GeoDistance targeting settings.
  - `TimeZone` string — Sets a [supported IANA time zone string](https://dev.kevel.com/docs/time-zones-1#available-time-zones-strings) to be used for the flight's daily caps, daily goals, and day parting. Note that even if a non-UTC `TimeZone` is set, start and end dates will still be in UTC.
  - `IsTargetingOptimization` boolean — Legacy parameter
  - `TargetingOptimizationType` integer — Legacy parameter
  - `TargetingOptimizationTargetType` integer — Legacy parameter
  - `TargetingOptimizationTarget` number, float — Legacy parameter
  - `TargetingOptimizationBurnIn` integer — Legacy parameter
  - `TargetingOptimizationCanMiss` boolean — Legacy parameter
  - `TargetROAS` number, float — For CPC/CPA/CPM auctions, a target return can be selected on ad spend (ROAS) goal and the decision engine will automatically adjust the CPC/CPA/CPM bid to try to achieve the goal set. Acceptable values are expressed as a decimal between 0.01–99.99. This is equivalent to 1%–9,999%.
  - `BidModifiers` object[] — See [Bid Modifiers documentation](https://dev.kevel.com/docs/bid-modifiers#how-to-configure-bid-modifiers-using-the-management-api) for example usage.
    - `Match` object
      - `Keyword` string
      - `Site` integer
      - `Zone` integer
      - `Segment` integer
      - `SearchTerm` object
        - `Term` string
  - `SiteZoneTargeting` object[]
    - `SiteID` integer — ID of targeted site
    - `ZoneID` integer — ID of targeted zone
    - `IsExclude` boolean — Whether or not the site is included or excluded
  - `Geotargeting` object[]
    - `CountryCode` string — The 2-3 character string that denotes the country you want to target
    - `Region` string — The 2-3 character string that denotes the region (or state) that you want to target
    - `MetroCode` integer — The 3 digit number that denotes the metropolitan area you want to target. US only.
    - `IsExclude` boolean — If leave blank, this will default to `false/null` and target the country. If you want to exclude it instead, use `true`
  - `SegmentTargeting` object[]
    - `SegmentId` integer — ID of the targeted Segment
    - `IsExclude` boolean
  - `AttributionView` object — The post-view attribution settings for this Flight. Set to `null` to disable. Learn more about [Kevel's attribution functionality](https://dev.kevel.com/docs/attribution-overview).
    - `MatchType` 'SameProduct' | 'SameCategoryBrand' | 'SameBrand' | 'SameMerchant' — The relationship between the purchased and advertised product. This choice represents the broadest acceptable match. Kevel will attempt to match purchases at the most specific level first (same product) and then look for broader shopper touch points up to this value.
    - `LookbackWindow` '1' | '7' | '14' | '30' — The eligible time period (days) between a sales transaction and an ad event.
    - `MatchMerchant` boolean — If true, Kevel will only attribute sales that align with the selected `MatchType` _and_ the merchant(s) set via `AttributableItems` on Ads in this Flight must also match.
  - `AttributionClick` object — The post-click attribution settings for this Flight. Set to `null` to disable. Learn more about [Kevel's attribution functionality](https://dev.kevel.com/docs/attribution-overview).
    - `MatchType` 'SameProduct' | 'SameCategoryBrand' | 'SameBrand' | 'SameMerchant' — The relationship between the purchased and advertised product. This choice represents the broadest acceptable match. Kevel will attempt to match purchases at the most specific level first (same product) and then look for broader shopper touch points up to this value.
    - `LookbackWindow` '1' | '7' | '14' | '30' — The eligible time period (days) between a sales transaction and an ad event.
    - `MatchMerchant` boolean — If true, Kevel will only attribute sales that align with the selected `MatchType` _and_ the merchant(s) set via `AttributableItems` on Ads in this Flight must also match.
  - `SearchTerms` object — See [Search Term Targeting](https://dev.kevel.com/docs/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"'
  - `AttributionSettings` object — Specify the products, categories, brands, and/or merchants that make a purchase eligible for attribution to Ads in this Flight. See [Attribution Overview](https://dev.kevel.com/docs/attribution-overview) for more details.
    - `AttributableItems` unknown[]
      - unknown

## Response `200`

200

- object
  - `Id` integer
  - `StartDateISO` string
  - `EndDateISO` string
  - `NoEndDate` boolean
  - `Price` integer
  - `Impressions` integer
  - `IsNoDuplicates` boolean
  - `IsCompanion` boolean
  - `Keywords` string
  - `Name` string
  - `IsFreqCap` boolean
  - `CampaignId` integer
  - `PriorityId` integer
  - `DeliveryStatus` integer
  - `IsDeleted` boolean
  - `IsActive` boolean
  - `GeoTargeting` object[]
    - `CountryCode` string
    - `Region` string
    - `MetroCode` integer
    - `IsExclude` boolean
  - `SiteZoneTargeting` object[]
    - `SiteId` integer
    - `ZoneId` integer
    - `IsExclude` boolean
  - `CustomTargeting` unknown
  - `SegmentTargeting` object[]
    - `Id` integer
    - `FlightId` integer
    - `SegmentId` integer
    - `IsExclude` boolean
    - `Segment` object — Details of the targeted Segment
  - `GoalType` integer
  - `RateType` integer
  - `IsECPMOptimized` boolean
  - `ECPMOptimizePeriod` integer
  - `ECPMMultiplier` number
  - `FloorECPM` number
  - `CeilingECPM` number
  - `DefaultECPM` number
  - `ECPMBurnInImpressions` integer
  - `EffectiveCPMOverride` number
  - `DatePartingStartTimeISO` unknown
  - `DatePartingEndTimeISO` unknown
  - `IsSunday` boolean
  - `IsMonday` boolean
  - `IsTuesday` boolean
  - `IsWednesday` boolean
  - `IsThursday` boolean
  - `IsFriday` boolean
  - `IsSaturday` boolean
  - `TimeZone` string
  - `FreqCap` integer
  - `FreqCapDuration` integer
  - `FreqCapType` integer
  - `CapType` integer
  - `DailyCapAmount` integer
  - `LifetimeCapAmount` integer
  - `CustomFieldsJson` unknown
  - `BehavioralTargeting` object
    - `onClick` object
      - `stopShowingAdsFromFlight` boolean
      - `stopShowingAdsFromAdvertiser` boolean
      - `storeCategoriesFromFlightAsInterest` boolean
    - `onConvert` object
      - `stopShowingAdsFromFlight` boolean
      - `stopShowingAdsFromAdvertiser` boolean
      - `storeCategoriesFromFlightAsInterest` boolean
  - `IsArchived` unknown
  - `IsTrackingConversions` boolean
  - `RequireStrictLocation` boolean
  - `CanPassback` boolean
  - `PassbackSortOrder` integer

---

[API](https://skmtc.net/kevel/apis/engine-apis.md) · [All operations](https://skmtc.net/kevel/apis/engine-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/kevel/engine-apis/revisions/0ca55f45aa7d/schema)
