---
title: "Update Flights"
method: PUT
path: "/v1/flight/{FlightID}"
---

# Update Flights

`PUT /v1/flight/{FlightID}`

## Request

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

This lets you update flights.

## Path parameters

- `FlightID` integer, required

## Query parameters

- `excludeAds` boolean

## Request body

- object
  - `Id` integer, required: The ID of the Flight
  - `Name` string, required: The name of the Flight
  - `StartDateISO` string, required: Start date in ISO 8601 format: `YYYY-MM-DDTHH:MM:SS.SSSSSSS`. You can also just use `YYYY-MM-DD`
  - `EndDateISO` string: End date in ISO 8601 format: `YYYY-MM-DDTHH:MM:SS.SSSSSSS`. You can also just use `YYYY-MM-DD`
  - `NoEndDate` boolean: If flight has no specified End Date, set to `true`
  - `CampaignId` integer, required: The ID of the campaign
  - `PriorityId` integer, required: The ID of the 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](doc:flights#goals)
  - `Impressions` integer, required: The Goal Amount
  - `IsActive` boolean, required: Active/inactive state of the flight
  - `IsDeleted` boolean: If want to delete, set to `true`
  - `IsArchived` boolean: Specifies whether flight is archived.
  - `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
      - `Category` object: Match the category the ad request sends in `placements[].category`. The match is exact and case-sensitive after Kevel trims spaces from the start and end, and a parent category does not match its children. A category match never makes an Ad eligible: it changes the bid of an Ad that is already eligible. Kevel accepts and applies a category match whether or not category targeting is enabled for your network.
        - `Id` string, required: The category, a string of 1 to 200 characters after trimming.
  - `CategoryTargeting` object[]: The category targeting rules for the Flight. Each entry has an `Id`, the category to match, and `IsExclude`, which is `true` for an exclude rule and `false` for an include rule. Both keys are required. An `Id` can appear only once in the list, including once as an include and once as an exclude, otherwise the request returns a 400 with "CategoryTargeting includes duplicate Id values, or it may be null." A Flight 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 flight. Please contact support." Set the field to `null` or `[]` to remove the 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
  - `Name` string
  - `StartDateISO` string
  - `EndDateISO` string
  - `CampaignId` integer
  - `PriorityId` integer
  - `GoalType` integer
  - `Impressions` integer
  - `RateType` integer
  - `Price` integer
  - `CapType` integer
  - `DailyCapAmount` integer
  - `LifetimeCapAmount` integer
  - `IsActive` boolean
  - `Keywords` string
  - `CustomTargeting` unknown
  - `GeoTargeting` object[]
    - `CountryCode` string
    - `Region` string
    - `MetroCode` integer
    - `City` string
    - `CityGeonameId` integer
    - `IsExclude` boolean
  - `SiteZoneTargeting` object[]
    - `SiteId` integer
    - `ZoneId` integer
    - `IsExclude` boolean
  - `IsFreqCap` boolean
  - `FreqCap` integer
  - `FreqCapDuration` integer
  - `FreqCapType` integer
  - `DontAffectParentFreqCap` boolean
  - `IsCompanion` boolean
  - `IsNoDuplicates` boolean
  - `IsTrackingConversions` boolean
  - `CanPassback` boolean
  - `PassbackSortOrder` integer
  - `IsArchived` boolean
  - `IsSunday` boolean
  - `IsMonday` boolean
  - `IsTuesday` boolean
  - `IsWednesday` boolean
  - `IsThursday` boolean
  - `IsFriday` boolean
  - `IsSaturday` boolean
  - `IsECPMOptimized` boolean
  - `ECPMOptimizePeriod` integer
  - `ECPMMultiplier` number
  - `FloorECPM` number
  - `CeilingECPM` number
  - `DefaultECPM` number
  - `ECPMBurnInImpressions` integer
  - `BehavioralTargeting` object
    - `onClick` object
      - `stopShowingAdsFromFlight` boolean
      - `stopShowingAdsFromAdvertiser` boolean
      - `storeCategoriesFromFlightAsInterest` boolean
    - `onConvert` object
      - `stopShowingAdsFromFlight` boolean
      - `stopShowingAdsFromAdvertiser` boolean
      - `storeCategoriesFromFlightAsInterest` boolean
  - `CategoryTargeting` object[]: The category targeting rules saved on the Flight, each with an `Id` and `IsExclude`. 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/management-api-2.md) - [All operations](https://skmtc.dev/kevel/apis/management-api-2/llms.txt) - [OpenAPI document](https://skmtc.dev/kevel/apis/management-api-2/revisions/fe6c8716ca08?raw)
