> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flyskye.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a booking session

> Locks one offer for 30 minutes and returns the Skye checkout link. Scope `book`. `quote.displayAmount` in `quote.displayCurrency` is exactly what the traveller pays.



## OpenAPI

````yaml /api-reference/openapi.yaml post /bookings/session
openapi: 3.1.0
info:
  title: Skye Flights API
  version: '1.0'
  description: Search and book real flights for your users. Skye is the Merchant of Record.
servers:
  - url: https://api.flyskye.ai/v1
security:
  - accessToken: []
tags:
  - name: Authentication
  - name: Flights
  - name: Booking sessions
  - name: Payments
  - name: Bookings
paths:
  /bookings/session:
    post:
      tags:
        - Booking sessions
      summary: Create a booking session
      description: >-
        Locks one offer for 30 minutes and returns the Skye checkout link. Scope
        `book`. `quote.displayAmount` in `quote.displayCurrency` is exactly what
        the traveller pays.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SessionRequest'
            example:
              offerId: off_test_...
      responses:
        '200':
          description: The session and its checkout link.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Session'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '502':
          $ref: '#/components/responses/Upstream'
components:
  schemas:
    SessionRequest:
      type: object
      required:
        - offerId
      properties:
        offerId:
          type: string
          description: The offerId from /search.
        currency:
          type: string
          default: INR
          description: Currency to charge in.
        prefill:
          type: object
          description: Prefilled on Skye checkout. Never send passport numbers.
          properties:
            contactEmail:
              type: string
              format: email
            contactName:
              type: string
        successUrl:
          type: string
          format: uri
          description: Where to send the user after booking.
    Session:
      type: object
      properties:
        sessionId:
          type: string
        checkoutUrl:
          type: string
          format: uri
          description: Open this for the user.
        clientToken:
          type: string
          example: skt_...
        expiresAt:
          type: string
          format: date-time
        quote:
          $ref: '#/components/schemas/Quote'
    Quote:
      type: object
      properties:
        displayAmount:
          type: number
          example: 6412
          description: Exactly what the traveller pays.
        displayCurrency:
          type: string
          example: INR
        route:
          type: string
          example: BLR-DEL
        departDate:
          type: string
          format: date
        returnDate:
          type:
            - string
            - 'null'
          format: date
        passengerCount:
          type: integer
          example: 1
        passengerTypes:
          type: object
          properties:
            adults:
              type: integer
            children:
              type: integer
            infants:
              type: integer
        expiresAt:
          type: string
          format: date-time
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              example: invalid_request
            message:
              type: string
              example: departDate cannot be in the past
            field:
              type: string
              example: departDate
  responses:
    BadRequest:
      description: '`invalid_json`, `invalid_request` or `traveller_count`.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Missing, invalid or expired key or token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: The key lacks the scope, or the resource belongs to another partner.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Upstream:
      description: Temporarily unavailable. Retry.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    accessToken:
      type: http
      scheme: bearer
      description: An access token (`sat_...`) from `POST /token`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.