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

> 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 customer booking

`POST` `/bookings`

Operation ID: `post-booking`

Creates a new booking for a customer.

## Request body (required)

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.1.0
info:
  title: KongAir APIs
  version: 1.0.0
servers:
  - url: https://api.kongair.dev
    description: KongAir API Dev
paths:
  /bookings:
    post:
      summary: Create a new customer booking
      description: Creates a new booking for a customer.
      operationId: post-booking
      tags:
        - Bookings
      security:
        - BearerAuth: []
      requestBody:
        description: Booking request details
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/BookingRequest"
            examples:
              Example new booking request body:
                value:
                  flight_number: KA924
                  seat: 32A
      responses:
        "201":
          description: Booking Created Successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BookingResponse"
              examples:
                Example new booking response body:
                  value:
                    ticket_number: CDF3412
        "401":
          description: Unauthorized
        "404":
          description: Not Found, likely for the flight_number given
          content:
            text/plain:
              schema:
                type: string
              example: Not found
security:
  - BearerAuth: []
components:
  schemas:
    BookingRequest:
      type: object
      properties:
        flight_number:
          type: string
        seat:
          type: string
      required:
        - flight_number
    BookingResponse:
      type: object
      properties:
        ticket_number:
          type: string
      required:
        - ticket_number
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
```
