APIFlight

Create or update a flight

Deprecated

POST
/flight/save

Deprecated: This endpoint will be removed in the next major AirTrail release. Migrate to POST /api/v1/flights for new flights or PUT /api/v1/flights/{id} for updates. Create a new flight or update an existing one. Creating a flight for the API-key user requires flight.create.own; creating one for other users requires flight.create.any. Updating follows the equivalent flight.update.* permissions. On an existing flight, adding, removing, or changing passengers requires the matching flight.passengers.manage.* permission.

Authorization

bearerAuth
AuthorizationBearer <token>

Go to Settings -> Security and create a new API key. Use the generated key as the bearer token.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/flight/save" \  -H "Content-Type: application/json" \  -d '{    "from": "string",    "to": "string",    "departure": "string",    "passengers": [      {}    ]  }'
{  "success": true}