Create a flight
Authorization
bearerAuth flight.create.ownSend Authorization: Bearer <credential>. Create API keys in AirTrail Security settings. OAuth clients use authorization code with PKCE S256 and a resource identifier matching /api/v1.
In: header
Scope: flight.create.own
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/v1/flights" \ -H "Content-Type: application/json" \ -d '{ "date": "2019-08-24", "fromId": 1, "toId": 1, "passengers": [ {} ] }'{ "data": { "id": "string" }}List visible flights GET
Returns flights in deterministic descending order by flight date, then descending ID. Results are cursor-paginated. Start without a cursor, then pass the returned `page.nextCursor` value unchanged as `cursor` to fetch the next page. When `page.nextCursor` is `null`, the response is the last page. Cursors are opaque and must not be decoded or constructed by clients.
Get a visible flight GET
Next Page
