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

# Authentication

Every call sends the key in the header. The request carries no email and no organisation id. The organisation and the user come from the key.

```http theme={null}
Authorization: Bearer fyv_api_…
```

The key starts with `fyv_api_`. A token that starts with `fyv_mcp_` or `fyv_addin_` is rejected.

## Create a key

Only an administrator sees the tab and can create or revoke keys.

1. In Fyvel, open **Company settings → API**.
2. Choose **New API key** and enter a name, for example `BI nightly pull`.
3. Copy the bearer token immediately. It is shown only once.

An administrator can hold up to five active keys. A new key leaves the existing ones valid. Revoke one key when you rotate it.

The call runs with that administrator's access. A company the administrator can see is a company the key can see.

The key stops working when that administrator loses the admin role or leaves the organisation.

## Errors

Errors are JSON with `error` and `code`.

| HTTP | `code` | Meaning |
| - | - | - |
| 401 | `AUTH_HEADER_MISSING` | The header is missing or is not a bearer token |
| 401 | `AUTH_INVALID` | The key is unknown or wrong |
| 403 | `CREDENTIAL_REVOKED` | The key was revoked |
| 403 | `NOT_ADMIN` | The owner is no longer an administrator |
| 429 | `RATE_LIMITED` | Too many calls or failed attempts. `Retry-After` is the wait in seconds. See [Limits](https://docs.fyvel.io/en/api/rate-limit.md). |

Other endpoints use the same shape. Common codes there are `INVALID_FILTER`, `FORBIDDEN`, `REFRESH_PENDING`, and `LOAD_FAILED`.


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