---
updatedAt: 2026-10-09T14:15:13.000Z
agentTools:
  projectIndex: https://dev.kevel.com/llms.txt
---

# Update Flights

This lets you update flights.

## Why Update Flights?

Occasionally you may find it useful to update an existing flight in your campaign to reflect changes in your campaign strategy. For example, you may wish to optimize your campaign by changing your `GoalType` or `PriorityId` to determine whether these changes positively impact the overall performance of the campaign.

> 📘 Note
>
> You may update any flight field except `id`.

## API Syntax

When using the *Update Flight* 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}`

Where:

* `PUT` - the type of API request being made.
* `https://api.kevel.co` - the URL for the request.
* `v1` - the API version.
* `flight` - the API endpoint being called.
* `flightId` - the ID of the specific flight you wish to update.

## Flight Fields

There are a number of fields that can be used when creating a flight. These fields are described in detail in the [Flight Fields](https://dev.kevel.com/docs/flights#flight-fields) documentation.

## Category Targeting and Bid Modifiers

Update `CategoryTargeting` and category `BidModifiers` on a Flight with this call. Send `"CategoryTargeting": null` (or an empty array) to remove the Flight’s explicit category targeting. For the rule format and matching behavior, see [Create Flight](https://dev.kevel.com/reference/create-flight#category-targeting).

> 📘 Clearing attribute values
>
> To unset or clear an attribute, set its value to `NULL`.

<br />

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "management-api-2",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.kevel.co"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "name": "X-Adzerk-ApiKey",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/v1/flight/{FlightID}": {
      "put": {
        "summary": "Update Flights",
        "description": "This lets you update flights.",
        "operationId": "update-flights",
        "parameters": [
          {
            "name": "FlightID",
            "in": "path",
            "description": "This is the ID of the Flight",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "excludeAds",
            "schema": {
              "type": "boolean",
              "default": "false"
            },
            "description": "If true, the endpoint returns only the flight metadata without ad objects"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "Id",
                  "Name",
                  "StartDateISO",
                  "CampaignId",
                  "PriorityId",
                  "GoalType",
                  "Impressions",
                  "IsActive"
                ],
                "properties": {
                  "Id": {
                    "type": "integer",
                    "description": "The ID of the Flight",
                    "format": "int32"
                  },
                  "Name": {
                    "type": "string",
                    "description": "The name of the Flight"
                  },
                  "StartDateISO": {
                    "type": "string",
                    "description": "Start date in ISO 8601 format: `YYYY-MM-DDTHH:MM:SS.SSSSSSS`. You can also just use `YYYY-MM-DD`"
                  },
                  "EndDateISO": {
                    "type": "string",
                    "description": "End date in ISO 8601 format: `YYYY-MM-DDTHH:MM:SS.SSSSSSS`. You can also just use `YYYY-MM-DD`"
                  },
                  "NoEndDate": {
                    "type": "boolean",
                    "description": "If flight has no specified End Date, set to `true`"
                  },
                  "CampaignId": {
                    "type": "integer",
                    "description": "The ID of the campaign",
                    "format": "int32"
                  },
                  "PriorityId": {
                    "type": "integer",
                    "description": "The ID of the Priority",
                    "format": "int32"
                  },
                  "GoalType": {
                    "type": "integer",
                    "description": "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)",
                    "format": "int32"
                  },
                  "Impressions": {
                    "type": "integer",
                    "description": "The Goal Amount",
                    "format": "int32"
                  },
                  "IsActive": {
                    "type": "boolean",
                    "description": "Active/inactive state of the flight"
                  },
                  "IsDeleted": {
                    "type": "boolean",
                    "description": "If want to delete, set to `true`"
                  },
                  "IsArchived": {
                    "type": "boolean",
                    "description": "Specifies whether flight is archived.",
                    "default": false
                  },
                  "BidModifiers": {
                    "type": "array",
                    "description": "See [Bid Modifiers documentation](https://dev.kevel.com/docs/bid-modifiers#how-to-configure-bid-modifiers-using-the-management-api) for example usage.",
                    "items": {
                      "properties": {
                        "Match": {
                          "type": "object",
                          "properties": {
                            "Keyword": {
                              "type": "string"
                            },
                            "Site": {
                              "type": "integer",
                              "format": "int32"
                            },
                            "Zone": {
                              "type": "integer",
                              "format": "int32"
                            },
                            "Segment": {
                              "type": "integer",
                              "format": "int32"
                            },
                            "SearchTerm": {
                              "type": "object",
                              "properties": {
                                "Term": {
                                  "type": "string"
                                }
                              }
                            },
                            "Category": {
                              "type": "object",
                              "description": "Match the category the ad request sends in `placements[].category`. The match ignores capitalization and is otherwise exact, after Kevel trims spaces from the start and end. 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.",
                              "required": [
                                "Id"
                              ],
                              "properties": {
                                "Id": {
                                  "type": "string",
                                  "description": "The category, a string of 1 to 200 characters after trimming."
                                }
                              }
                            }
                          }
                        },
                        "Multiplier": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 10,
                          "description": "Multiplies the Flight's base `Price` when the match applies."
                        },
                        "Price": {
                          "type": "number",
                          "minimum": 0,
                          "description": "Sets a fixed bid when the match applies."
                        }
                      },
                      "type": "object"
                    }
                  },
                  "CategoryTargeting": {
                    "type": "array",
                    "description": "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).",
                    "items": {
                      "type": "object",
                      "required": [
                        "Id",
                        "IsExclude"
                      ],
                      "properties": {
                        "Id": {
                          "type": "string",
                          "description": "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 ignores capitalization. A parent category does not match its children. The value is a string of 1 to 200 characters."
                        },
                        "IsExclude": {
                          "type": "boolean",
                          "description": "`true` for an exclude rule, `false` for an include rule."
                        }
                      }
                    }
                  }
                }
              },
              "examples": {
                "JSON": {
                  "value": {
                    "Id": 1234,
                    "Name": "A Different Name",
                    "StartDateISO": "2017-05-01T00:00:00.00.0000000",
                    "CampaignId": 1234,
                    "PriorityId": 1234,
                    "GoalType": 1,
                    "Impressions": 20000
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"Name\":\"A Different Name\",\n  \"StartDateISO\":\"2017-05-01T00:00:00.00.0000000\",\n  \"EndDateISO\":\"2017-12-31T00:00:00.00.0000000\",\n  \"CampaignId\":1234,\n  \"PriorityId\":1234,\n  \"GoalType\": 1,\n  \"Impressions\":20000,\n  \"RateType\": 2,\n  \"Price\":5,\n  \"CapType\": 1,\n  \"DailyCapAmount\": 5000,\n  \"LifetimeCapAmount\": 50000,\n  \"IsActive\":true,\n  \"Keywords\":\"exercise\",\n  \"CustomTargeting\": null,\n  \"GeoTargeting\":[{\n    \"CountryCode\":\"US\",\n    \"Region\":\"NC\",\n    \"MetroCode\":560,\n    \"City\":\"Durham\",\n    \"CityGeonameId\":4464368,\n    \"IsExclude\":false\n  }],\n    \"SiteZoneTargeting\":[{\n    \"SiteId\":123,\n    \"ZoneId\":321,\n    \"IsExclude\":false\n  }],\n  \"IsActive\":true,\n  \"IsFreqCap\":true,\n  \"FreqCap\": 2,\n  \"FreqCapDuration\": 10,\n  \"FreqCapType\": 1,\n  \"DontAffectParentFreqCap\": true,\n  \"IsCompanion\":true,\n  \"IsNoDuplicates\":false,  \n  \"IsTrackingConversions\": true,\n  \"CanPassback\":true,\n  \"PassbackSortOrder\":1,\n  \"IsArchived\":false,\n  \"IsSunday\": true,\n  \"IsMonday\": false,\n  \"IsTuesday\": false,\n  \"IsWednesday\": false,\n  \"IsThursday\": false,\n  \"IsFriday\": false,\n  \"IsSaturday\": true,\n  \"IsECPMOptimized\":true,\n  \"ECPMOptimizePeriod\":30,\n  \"ECPMMultiplier\":1.25,\n  \"FloorECPM\":0.15,\n  \"CeilingECPM\":0.35,\n  \"DefaultECPM\":0.28,\n  \"ECPMBurnInImpressions\":1000,\n  \"BehavioralTargeting\": {\n    \"onClick\": {\n      \"stopShowingAdsFromFlight\": true,\n      \"stopShowingAdsFromAdvertiser\": true,\n      \"storeCategoriesFromFlightAsInterest\": true\n    },\n    \"onConvert\": {\n      \"stopShowingAdsFromFlight\": true,\n      \"stopShowingAdsFromAdvertiser\": true,\n      \"storeCategoriesFromFlightAsInterest\": true\n    }\n  }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "Name": {
                      "type": "string",
                      "example": "A Different Name"
                    },
                    "StartDateISO": {
                      "type": "string",
                      "example": "2017-05-01T00:00:00.00.0000000"
                    },
                    "EndDateISO": {
                      "type": "string",
                      "example": "2017-12-31T00:00:00.00.0000000"
                    },
                    "CampaignId": {
                      "type": "integer",
                      "example": 1234,
                      "default": 0
                    },
                    "PriorityId": {
                      "type": "integer",
                      "example": 1234,
                      "default": 0
                    },
                    "GoalType": {
                      "type": "integer",
                      "example": 1,
                      "default": 0
                    },
                    "Impressions": {
                      "type": "integer",
                      "example": 20000,
                      "default": 0
                    },
                    "RateType": {
                      "type": "integer",
                      "example": 2,
                      "default": 0
                    },
                    "Price": {
                      "type": "integer",
                      "example": 5,
                      "default": 0
                    },
                    "CapType": {
                      "type": "integer",
                      "example": 1,
                      "default": 0
                    },
                    "DailyCapAmount": {
                      "type": "integer",
                      "example": 5000,
                      "default": 0
                    },
                    "LifetimeCapAmount": {
                      "type": "integer",
                      "example": 50000,
                      "default": 0
                    },
                    "IsActive": {
                      "type": "boolean",
                      "example": true,
                      "default": true
                    },
                    "Keywords": {
                      "type": "string",
                      "example": "exercise"
                    },
                    "CustomTargeting": {},
                    "GeoTargeting": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "CountryCode": {
                            "type": "string",
                            "example": "US"
                          },
                          "Region": {
                            "type": "string",
                            "example": "NC"
                          },
                          "MetroCode": {
                            "type": "integer",
                            "example": 560,
                            "default": 0
                          },
                          "City": {
                            "type": "string",
                            "example": "Durham"
                          },
                          "CityGeonameId": {
                            "type": "integer",
                            "example": 4464368,
                            "default": 0
                          },
                          "IsExclude": {
                            "type": "boolean",
                            "example": false,
                            "default": true
                          }
                        }
                      }
                    },
                    "SiteZoneTargeting": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "SiteId": {
                            "type": "integer",
                            "example": 123,
                            "default": 0
                          },
                          "ZoneId": {
                            "type": "integer",
                            "example": 321,
                            "default": 0
                          },
                          "IsExclude": {
                            "type": "boolean",
                            "example": false,
                            "default": true
                          }
                        }
                      }
                    },
                    "IsFreqCap": {
                      "type": "boolean",
                      "example": true,
                      "default": true
                    },
                    "FreqCap": {
                      "type": "integer",
                      "example": 2,
                      "default": 0
                    },
                    "FreqCapDuration": {
                      "type": "integer",
                      "example": 10,
                      "default": 0
                    },
                    "FreqCapType": {
                      "type": "integer",
                      "example": 1,
                      "default": 0
                    },
                    "DontAffectParentFreqCap": {
                      "type": "boolean",
                      "example": true,
                      "default": true
                    },
                    "IsCompanion": {
                      "type": "boolean",
                      "example": true,
                      "default": true
                    },
                    "IsNoDuplicates": {
                      "type": "boolean",
                      "example": false,
                      "default": true
                    },
                    "IsTrackingConversions": {
                      "type": "boolean",
                      "example": true,
                      "default": true
                    },
                    "CanPassback": {
                      "type": "boolean",
                      "example": true,
                      "default": true
                    },
                    "PassbackSortOrder": {
                      "type": "integer",
                      "example": 1,
                      "default": 0
                    },
                    "IsArchived": {
                      "type": "boolean",
                      "example": false,
                      "default": true
                    },
                    "IsSunday": {
                      "type": "boolean",
                      "example": true,
                      "default": true
                    },
                    "IsMonday": {
                      "type": "boolean",
                      "example": false,
                      "default": true
                    },
                    "IsTuesday": {
                      "type": "boolean",
                      "example": false,
                      "default": true
                    },
                    "IsWednesday": {
                      "type": "boolean",
                      "example": false,
                      "default": true
                    },
                    "IsThursday": {
                      "type": "boolean",
                      "example": false,
                      "default": true
                    },
                    "IsFriday": {
                      "type": "boolean",
                      "example": false,
                      "default": true
                    },
                    "IsSaturday": {
                      "type": "boolean",
                      "example": true,
                      "default": true
                    },
                    "IsECPMOptimized": {
                      "type": "boolean",
                      "example": true,
                      "default": true
                    },
                    "ECPMOptimizePeriod": {
                      "type": "integer",
                      "example": 30,
                      "default": 0
                    },
                    "ECPMMultiplier": {
                      "type": "number",
                      "example": 1.25,
                      "default": 0
                    },
                    "FloorECPM": {
                      "type": "number",
                      "example": 0.15,
                      "default": 0
                    },
                    "CeilingECPM": {
                      "type": "number",
                      "example": 0.35,
                      "default": 0
                    },
                    "DefaultECPM": {
                      "type": "number",
                      "example": 0.28,
                      "default": 0
                    },
                    "ECPMBurnInImpressions": {
                      "type": "integer",
                      "example": 1000,
                      "default": 0
                    },
                    "BehavioralTargeting": {
                      "type": "object",
                      "properties": {
                        "onClick": {
                          "type": "object",
                          "properties": {
                            "stopShowingAdsFromFlight": {
                              "type": "boolean",
                              "example": true,
                              "default": true
                            },
                            "stopShowingAdsFromAdvertiser": {
                              "type": "boolean",
                              "example": true,
                              "default": true
                            },
                            "storeCategoriesFromFlightAsInterest": {
                              "type": "boolean",
                              "example": true,
                              "default": true
                            }
                          }
                        },
                        "onConvert": {
                          "type": "object",
                          "properties": {
                            "stopShowingAdsFromFlight": {
                              "type": "boolean",
                              "example": true,
                              "default": true
                            },
                            "stopShowingAdsFromAdvertiser": {
                              "type": "boolean",
                              "example": true,
                              "default": true
                            },
                            "storeCategoriesFromFlightAsInterest": {
                              "type": "boolean",
                              "example": true,
                              "default": true
                            }
                          }
                        }
                      }
                    },
                    "CategoryTargeting": {
                      "type": "array",
                      "description": "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.",
                      "items": {
                        "type": "object",
                        "properties": {
                          "Id": {
                            "type": "string",
                            "description": "The category the rule matches."
                          },
                          "IsExclude": {
                            "type": "boolean",
                            "description": "`true` for an exclude rule, `false` for an include rule."
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "x-readme": {
          "code-samples": [
            {
              "language": "curl",
              "code": "curl -X PUT \\\n     -H \"X-Adzerk-ApiKey:$ADZERK_API_KEY\" \\\n     -H \"Content-Type:application/json\" \\\n     --data-binary '{\"Id\":123456,\"PriorityId\":12345,\"GoalType\":2,\"RateType\":2,\"CampaignId\":123456,\"Name\":\"A Different Name\",\"StartDateISO\":\"2018-06-03\",\"IsActive\":true}' \\\n     \"https://api.kevel.co/v1/flight/123456\""
            },
            {
              "language": "javascript",
              "code": "const Adzerk = require('@adzerk/management-sdk');\nconst apiKey = process.env.ADZERK_API_KEY;\n\nasync function updateFlight() {\n  let specifications = await Adzerk.fetchSpecifications();\n  let client = await Adzerk.buildClient({apiKey, specifications});\n\n  let flight = await client.run(\"flight\", \"update\", {id: 12345, name: \"A Different Name\"});\n  console.log(flight);\n}\n\nupdateFlight();"
            },
            {
              "language": "ruby",
              "code": "require \"adzerk\"\n\ndef update_flight()\n    client = Adzerk::Client.new(ENV[\"ADZERK_API_KEY\"])\n    flight_id = 12345\n    data = client.flights.get(flight_id)\n    data[:name] = \"Updated Name\"\n    pp client.flights.update(data)\nend\nupdate_flight()"
            }
          ],
          "samples-languages": [
            "curl",
            "javascript",
            "ruby"
          ]
        }
      }
    }
  },
  "x-readme": {
    "headers": [
      {
        "key": "X-Adzerk-Sdk-Version",
        "value": "Readme.io:ManagementAPI2"
      }
    ],
    "explorer-enabled": false,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```