---
title: "Create a new customer booking"
url: "https://dev.kong-air.com/apis/kong-air-bookings-0/versions/d9e4a8a9-751b-4906-ac7a-38910d0f4b7e/operations/post-booking"
---

> Full API specification: https://dev.kong-air.com/apis/kong-air-bookings-0/versions/d9e4a8a9-751b-4906-ac7a-38910d0f4b7e.md

# Create a new customer booking

`POST` `/bookings`

Operation ID: `post-booking`

Creates a new booking for the customer

## Request body

Content types: `application/json`

## Responses

- `201` - Booking Created Successfully
- `401` - Unauthorized
- `404` - Not Found, likely for the flight_number given

## OpenAPI definition

```yaml
openapi: 3.0.0
info:
  title: Bookings Service
  version: 0.4.0
servers:
  - description: KongAir API Server
    url: https://api.kong-air.com
paths:
  /bookings:
    post:
      description: Creates a new booking for the customer
      operationId: post-booking
      requestBody:
        content:
          application/json:
            examples:
              Example new booking request body:
                value: |
                  {
                    "flight_number": "KA924",
                    "seat": "32A"
                  }
            schema:
              $ref: "#/components/schemas/BookingRequest"
        description: Defines a Booking Request
      responses:
        "201":
          content:
            application/json:
              examples:
                Example new booking response body:
                  value: |
                    {
                     "ticket_number": "CDF3412"
                    }
              schema:
                $ref: "#/components/schemas/BookingResponse"
          description: Booking Created Successfully
        "401":
          description: Unauthorized
        "404":
          content:
            text/plain:
              example: Not found
              schema:
                type: string
          description: Not Found, likely for the flight_number given
      summary: Create a new customer booking
      tags:
        - sales
security:
  - applicationKey: []
components:
  schemas:
    BookingRequest:
      description: A flight Booking Request object
      example:
        flight_number: KA924
        seat: 32A
      properties:
        flight_number:
          type: string
        seat:
          type: string
      required:
        - flight_number
      type: object
    BookingResponse:
      description: A flight Booking Request Response object
      example:
        ticket_number: CDF3412
      properties:
        ticket_number:
          type: string
      required:
        - ticket_number
      type: object
  securitySchemes:
    applicationKey:
      description: API key from an approved Dev Portal application registration
      in: header
      name: X-API-Key
      type: apiKey
```
