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 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.


Path Params
int32
required

This is the ID of the Flight

Query Params
boolean
Defaults to false

If true, the endpoint returns only the flight metadata without ad objects

Body Params
int32
required

The ID of the Flight

string
required

The name of the Flight

string
required

Start date in ISO 8601 format: YYYY-MM-DDTHH:MM:SS.SSSSSSS. You can also just use YYYY-MM-DD

string

End date in ISO 8601 format: YYYY-MM-DDTHH:MM:SS.SSSSSSS. You can also just use YYYY-MM-DD

boolean

If flight has no specified End Date, set to true

int32
required

The ID of the campaign

int32
required

The ID of the Priority

int32
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

int32
required

The Goal Amount

boolean
required

Active/inactive state of the flight

boolean

If want to delete, set to true

boolean
Defaults to false

Specifies whether flight is archived.

BidModifiers
array of objects

See Bid Modifiers documentation for example usage.

BidModifiers
CategoryTargeting
array of objects

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.

CategoryTargeting
Response

Language
Credentials
Header
LoadingLoading…
Response
Choose an example:
application/json