---
updatedAt: 2026-08-01T11:27:33.000Z
agentTools:
  projectIndex: https://dev.kevel.com/llms.txt
---

# List Flights

Lists all the flights in the network. For the explorer, use the API Key.

## Why List Flights?

The `List Flights` endpoint enables you to call the Flights endpoint and return an array of existing flights in the campaign.

The filter attribute specifies the set of flights that will be returned by selecting them based on the state of the `IsArchived` and `IsActive` properties.

> 🚧 Caution
>
> Specifying both `filter` and either `isActive` or `isArchived` generates an error.

<Table align={["left","left","left","left"]}>
  <thead>
    <tr>
      <th>
        `filter`

         value
      </th>

      <th>
        Includes flights where IsActive is
      </th>

      <th>
        Includes flights where IsArchived is
      </th>

      <th>
        Comments
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        not-archived
      </td>

      <td>
        Any value
      </td>

      <td>
        `false` or `null`
      </td>

      <td>
        The default - omitting the `filter` attribute is equivalent to specifying this value.
      </td>
    </tr>

    <tr>
      <td>
        archived
      </td>

      <td>
        Any value
      </td>

      <td>
        `true`
      </td>

      <td>

      </td>
    </tr>

    <tr>
      <td>
        active
      </td>

      <td>
        `true`
      </td>

      <td>
        `false` or `null`
      </td>

      <td>

      </td>
    </tr>

    <tr>
      <td>
        inactive
      </td>

      <td>
        `false`
      </td>

      <td>
        `false` or `null`
      </td>

      <td>

      </td>
    </tr>
  </tbody>
</Table>

## API Syntax

When using the *List Flights* 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:

`GET https://api.kevel.co/v1/flight`

Where:

* `GET` - 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.

# 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": {
      "get": {
        "summary": "List Flights",
        "description": "Lists all the flights in the network. For the explorer, use the API Key.",
        "operationId": "list-flights",
        "parameters": [
          {
            "name": "filter",
            "in": "query",
            "description": "Limit the set of returned flights. Omission is equivalent to `not-archived`. See below.",
            "schema": {
              "type": "string",
              "enum": [
                "not-archived",
                "archived",
                "active",
                "inactive"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{  \n    \"page\":1,\n    \"items\":[  \n        {  \n            \"Id\":12345,\n            \"Price\":1.000,\n            \"Impressions\":100,\n            \"IsNoDuplicates\":true,\n            \"Keywords\":\"\",\n            \"Name\":\"My Flight is Best Flight\",\n            \"IsCompanion\":false,\n            \"CampaignId\":1234,\n            \"PriorityId\":1234,\n            \"IsDeleted\":false,\n            \"IsActive\":true,\n            \"CustomTargeting\":\"\",\n            \"GoalType\":2,\n            \"RateType\":1,\n            \"IsSunday\":true,\n            \"IsMonday\":true,\n            \"IsTuesday\":true,\n            \"IsWednesday\":true,\n            \"IsThursday\":true,\n            \"IsFriday\":true,\n            \"IsSaturday\":true,\n            \"FreqCap\":0,\n            \"FreqCapDuration\":0,\n            \"FreqCapType\":0,\n            \"DontAffectParentFreqCap\": true,\n            \"DeliveryStatus\":1,\n            \"IsArchived\":null,\n            \"CanPassback\":true,\n            \"PassbackSortOrder\":1,\n            \"StartDateISO\":\"2017-05-29T15:41:00.0000000\",\n            \"Created\": \"2022-03-08T12:34:56.123Z\",\n            \"LastModified\": \"2022-03-08T12:34:56.123Z\",\n            \"Version\": 1\n        },..."
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "x-readme": {
          "code-samples": [
            {
              "language": "curl",
              "code": "curl -X GET \\\n     -H \"X-Adzerk-ApiKey:$ADZERK_API_KEY\" \\\n     \"https://api.kevel.co/v1/flight\"\n     \n# List Archived only\ncurl -X GET \\\n     -H \"X-Adzerk-ApiKey:$ADZERK_API_KEY\" \\\n     \"https://api.kevel.co/v1/flight?isArchived=true\""
            },
            {
              "language": "javascript",
              "code": "const Adzerk = require('@adzerk/management-sdk');\nconst apiKey = process.env.ADZERK_API_KEY;\n\nasync function listFlights() {\n  let specifications = await Adzerk.fetchSpecifications();\n  let client = await Adzerk.buildClient({apiKey, specifications});\n\n  let flights = await client.run(\"flight\", \"list\");\n  console.log(flights);\n\n  let names = flights.items.map(a => a.name)\n  console.log(names);\n}\n\nlistFlights();"
            },
            {
              "language": "ruby",
              "code": "require \"adzerk\"\n\ndef list_flights()\n    client = Adzerk::Client.new(ENV[\"ADZERK_API_KEY\"])\n    pp client.flights.list()\nend\nlist_flights()"
            }
          ],
          "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
}
```