# OpenAPI spec

The REST API is described by an OpenAPI 3.1 document with 14 operations. Use it to generate a client or hand it to an agent.

Source: https://flightqueue.com/docs/api/openapi

| Property | Value |
| --- | --- |
| URL | `https://flightqueue.com/openapi.json` |
| Version | OpenAPI 3.1.0 |
| Server | `https://flightqueue.com/api/v1` |
| Security schemes | `BearerAuth` (HTTP bearer) and `ApiKeyAuth` (`X-API-Key` header) |
| Operations | 14 |

## Fetch it

```bash
curl https://flightqueue.com/openapi.json -o flightqueue-openapi.json
```

## Generate types or a client

Any OpenAPI 3.1 generator works. For example, TypeScript types:

```bash
npx openapi-typescript https://flightqueue.com/openapi.json -o ./flightqueue-api.d.ts
```

## What is in it

- Every route in the [endpoint reference](https://flightqueue.com/docs/api/endpoints.md), with parameters and request bodies.
- A success example and a body for each documented error code.
- Payment-discovery metadata for the paid operations.

The [endpoint reference](https://flightqueue.com/docs/api/endpoints.md) is generated from this same document, so the two cannot disagree.
