---
title: "Create a new customer booking"
url: "https://kongair.kong-sales-engineering.com/apis/bookings/versions/e76ff5ce-5835-40ee-817e-077abce466fd/operations/post-booking"
---

> Full API specification: https://kongair.kong-sales-engineering.com/apis/bookings/versions/e76ff5ce-5835-40ee-817e-077abce466fd.md

# Create a new customer booking

`POST` `/bookings`

Operation ID: `post-booking`

## 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: 1.0.0
servers:
  - url: https://shared-services.kong-sales-engineering.com/kongair
    description: KongAir API Server
paths:
  /bookings:
    post:
      tags:
        - sales
      summary: Create a new customer booking
      operationId: post-booking
      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
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/BookingRequest"
            examples:
              Example new booking request body:
                value: |
                  {
                    "flight_number": "KA924",
                    "seat": "32A"
                  }
security:
  - basicAuth: []
components:
  schemas:
    BookingResponse:
      type: object
      properties:
        ticket_number:
          type: string
      required:
        - ticket_number
    BookingRequest:
      type: object
      properties:
        flight_number:
          type: string
        seat:
          type: string
      required:
        - flight_number
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
```
