For the complete documentation index, see llms.txt. This page is also available as Markdown.

API Keys

API keys are a long-lived, revocable alternative to the session-token login flow, intended for third-party server-to-server integrations. Instead of logging in with an email and password to obtain a session token (which expires after 14 days), an integration sends a single static key on every request.

A key is bound to a user in your company and authenticates as that user — it inherits exactly that user's permissions (user group / ACL). Choose the bound user carefully; give integrations a dedicated, least-privilege user where possible.

You can keep using the session-token login for interactive clients. API keys and session tokens work side by side — they are accepted on the same Authorization: Bearer header.

Using a key

Send the key as a Bearer token, exactly like a session token. API keys are prefixed with flk_:

Authorization: Bearer flk_3pQ8...Zr
curl https://fmc.flylogs.com/v1/flights.json \
  -H "Authorization: Bearer flk_3pQ8...Zr"

Keys do not expire on inactivity and are not affected by logout. A key stops working only when it is revoked or, if an expiry date was set, after that date passes.


Managing keys

API keys are created and revoked by a company administrator in the Flylogs app, under Company Settings → API → API keys. They are not managed with an API key itself — management requires an interactive admin session.

The management endpoints below sit under the manager routing prefix and are used by the app; they are documented here for completeness.

List keys

GET /manager/api_keys.json

Returns the company's keys. The secret itself is never returned — only a short, non-secret key_prefix for identification.

Response

Create a key

POST /manager/api_keys/add.json

Issues a new key. The plaintext key is returned once, in this response only, and cannot be recovered afterwards. Store it immediately.

Request Body

Field
Type
Required
Description

name

string

Yes

Human label for the integration (e.g. "Zapier")

user_id

number

Yes

A user in your company the key will authenticate as

expires

number

No

Unix timestamp after which the key is rejected. Omit for a key that never expires

Response

Example

Revoke a key

POST /manager/api_keys/revoke/{id}.json

Permanently disables a key. Revocation is immediate and irreversible; the key is retained for audit but is rejected on every subsequent request.

Path Parameters

Parameter
Type
Description

id

string

The key's id (not the secret)

Response


Access control

Capability
Who

Create / list / revoke API keys

Company Administrators & Operations Managers (user group ≤ 110)

What a key can do once issued

Whatever the bound user's user group permits

A key can only be bound to a user in the same company as the administrator creating it. Cross-company keys are rejected.


API keys vs. session tokens

API key
Session token

Obtained by

Admin issues it in API key management

POST /login with email + password

Lifetime

Until revoked (optional expiry)

14 days / until logout

Identity

Bound user

Logged-in user

Best for

Unattended server-to-server integrations

Interactive clients (e.g. the NEO app)

2FA / IP allowlist

Not applicable

Applies to interactive logins

See also: Authentication.

Last updated