---
title: "Create a new flight"
url: "https://devportal.jilson.dev/apis/kong-air-ap-is-1-0-0/versions/7a8b8282-7fdc-432a-a618-88582e8fb712/paths/flights/post"
---

> Full API specification: https://devportal.jilson.dev/apis/kong-air-ap-is-1-0-0/versions/7a8b8282-7fdc-432a-a618-88582e8fb712.md

# Create a new flight

`POST` `/flights`

Creates a new flight in the system.

## Request body (required)

Content types: `application/json`

## Responses

- `201` - Flight created successfully

## OpenAPI definition

```yaml
openapi: 3.1.0
info:
  title: KongAir APIs
  version: 1.0.0
servers:
  - url: https://api.kongair.dev
    description: KongAir API Dev
paths:
  /flights:
    post:
      summary: Create a new flight
      description: Creates a new flight in the system.
      tags:
        - Flights
      requestBody:
        description: Flight details to create
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Flight"
      responses:
        "201":
          description: Flight created successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Flight"
security:
  - ApiKeyAuth: []
  - BearerAuth: []
components:
  schemas:
    Flight:
      type: object
      properties:
        number:
          type: string
        route_id:
          type: string
        scheduled_departure:
          type: string
          format: date-time
        scheduled_arrival:
          type: string
          format: date-time
      required:
        - number
        - route_id
        - scheduled_departure
        - scheduled_arrival
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
```
