---
title: "Create a new flight"
method: POST
path: "/measurement/display_ads/{ad_id}/flights"
tags: ["Flights/Display Ad Flights"]
---

# Create a new flight

`POST /measurement/display_ads/{ad_id}/flights`

## Request

- Base URL: `https://api.magellan.ai/v2`
- URL: `https://api.magellan.ai/v2/measurement/display_ads/{ad_id}/flights`
- Auth: API key in header `Authorization`

Submit start and end dates along with buy info for a single flight, to facilitate spend calculation.

## Path parameters

- `ad_id` string, required

## Request body

- object
  - `measurementFlight` FlightUpdatableAttributes, required
    - `startDate` string, date, required
    - `endDate` string, date, required
    - `expectedImpressions` integer
    - `impressionCap` integer
    - `cpm` number
    - `costPerSpot` number
    - `uid` string

## Response `200`

OK

- object
  - `measurementFlight` DynamicFlightWithParent
    - `id` integer
    - `startDate` string, date, required
    - `endDate` string, date, required
    - `expectedImpressions` integer
    - `impressionCap` integer
    - `cpm` number
    - `costPerSpot` number
    - `uid` string
    - `ad` union
      - DisplayAd
        - `id` string
        - `name` string
        - `uid` string
        - `adServer` 'acast' | 'adarcade' | 'adswizz' | 'amperwave' | 'art19' | 'audioboom' | 'audiohook' | 'audiomeans' | 'barstool' | 'basis' | 'beeswax' | 'beeswax_pod' | 'beeswax_stream' | 'dax' | 'dovetail' | 'dv_360' | 'frequency_ads' | 'gam' | 'gt_impression' | 'iheart_pd' | 'iheart_stream' | 'mediamath' | 'megaphone' | 'omny' | 'podbean' | 'redcircle' | 'sas' | 'simplecast' | 'soundcast' | 'soundstack' | 'spgam' | 'spotify' | 'spreaker' | 'tap' | 'transistor' | 'triton' | 'triton_pd' | 'triton_streaming' | 'ttd' | 'xandr' | 'xandr_pod' | 'xandr_stream'
        - `redirectUrl` string, uri: Where Magellan AI will redirect people after their response has been recorded.
        - `cohorts` AdCohort[]: The cohorts and sub-cohorts currently assigned to this ad's line item.
          - `cohortName` string, required: Name of the cohort (shown as a Group in the dashboard), unique within the ad's campaign. Created on first use if no cohort of this name exists for the campaign.
          - `subCohortName` string, required: Name of the sub-cohort (shown as a Sub-group in the dashboard), unique within the cohort. Created on first use if no sub-cohort of this name exists in the cohort.
      - DynamicAd
        - `id` string
        - `name` string
        - `uid` string
        - `adServer` 'acast' | 'adarcade' | 'adswizz' | 'amperwave' | 'art19' | 'audioboom' | 'audiohook' | 'audiomeans' | 'barstool' | 'basis' | 'beeswax' | 'beeswax_pod' | 'beeswax_stream' | 'dax' | 'dovetail' | 'dv_360' | 'frequency_ads' | 'gam' | 'gt_impression' | 'iheart_pd' | 'iheart_stream' | 'mediamath' | 'megaphone' | 'omny' | 'podbean' | 'redcircle' | 'sas' | 'simplecast' | 'soundcast' | 'soundstack' | 'spgam' | 'spotify' | 'spreaker' | 'tap' | 'transistor' | 'triton' | 'triton_pd' | 'triton_streaming' | 'ttd' | 'xandr' | 'xandr_pod' | 'xandr_stream'
        - `streaming` boolean: Whether this ad is a streaming ad.
        - `cohorts` AdCohort[]: The cohorts and sub-cohorts currently assigned to this ad's line item.
          - `cohortName` string, required: Name of the cohort (shown as a Group in the dashboard), unique within the ad's campaign. Created on first use if no cohort of this name exists for the campaign.
          - `subCohortName` string, required: Name of the sub-cohort (shown as a Sub-group in the dashboard), unique within the cohort. Created on first use if no sub-cohort of this name exists in the cohort.
      - AmazonAd
        - `id` string
        - `name` string
        - `uid` string
        - `adServer` 'acast' | 'adarcade' | 'adswizz' | 'amperwave' | 'art19' | 'audioboom' | 'audiohook' | 'audiomeans' | 'barstool' | 'basis' | 'beeswax' | 'beeswax_pod' | 'beeswax_stream' | 'dax' | 'dovetail' | 'dv_360' | 'frequency_ads' | 'gam' | 'gt_impression' | 'iheart_pd' | 'iheart_stream' | 'mediamath' | 'megaphone' | 'omny' | 'podbean' | 'redcircle' | 'sas' | 'simplecast' | 'soundcast' | 'soundstack' | 'spgam' | 'spotify' | 'spreaker' | 'tap' | 'transistor' | 'triton' | 'triton_pd' | 'triton_streaming' | 'ttd' | 'xandr' | 'xandr_pod' | 'xandr_stream'
        - `streaming` boolean: Whether this ad is a streaming ad.
        - `cohorts` AdCohort[]: The cohorts and sub-cohorts currently assigned to this ad's line item.
          - `cohortName` string, required: Name of the cohort (shown as a Group in the dashboard), unique within the ad's campaign. Created on first use if no cohort of this name exists for the campaign.
          - `subCohortName` string, required: Name of the sub-cohort (shown as a Sub-group in the dashboard), unique within the cohort. Created on first use if no sub-cohort of this name exists in the cohort.

## Other responses

- `400`: The request body is missing its top-level resource key, such as `measurementCampaign`, or that key is empty.
- `401`: Unauthorized. When the access token is missing, invalid, expired or revoked, the body is empty. When the token is valid but its user may not access the resource, the body is an `Error`.
- `403`: The access token has a scope, such as an MCP token. The v2 API only accepts unscoped tokens.
- `404`: Not Found
- `422`: Unprocessable Content

## Changes

- **2026-11-03** `beceb462c707`: 1 breaking, 7 info
  - added `#/components/schemas/AmazonAd` to the `measurementFlight/allOf[subschema #2]/ad` response property `oneOf` list for the response status `200`
  - added the media type `application/json` for the response with the status `401`
  - added the media type `application/json` for the response with the status `404`
  - added the media type `application/json` for the response with the status `422`
  - …4 more

[Operation history](https://skmtc.dev/magellan/apis/magellan-ai-api/changes/measurement/display_ads/:ad_id/flights/post.md)

---

[API](https://skmtc.dev/magellan/apis/magellan-ai-api.md) - [All operations](https://skmtc.dev/magellan/apis/magellan-ai-api/llms.txt) - [OpenAPI document](https://skmtc.dev/magellan/apis/magellan-ai-api/revisions/beceb462c707?raw)
