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

# Authentication

> API keys, access approval and rate limits.

Every request sends an API key as a Bearer token:

```bash theme={null}
Authorization: Bearer dk_live_4fX9...
```

## Keys

* Keys start with `dk_live_` and belong to one organization. You never send an organization id: the key decides it.
* Owners and admins create and revoke keys in Docistra under **Settings > Integrations > API**. A key is shown once, when it's created. Docistra stores only a hash of it.
* Revoking a key stops it at once, together with its webhook endpoint.
* An organization can have up to 10 active keys. Use one key per connected system.

## Access approval

The API works only while the organization's access is approved by Docistra. Until then, or after access is turned off, every call returns:

```json theme={null}
{ "error": "api_access_not_approved" }
```

with status `403`.

| Status | Error | Meaning |
| - | - | - |
| 401 | `unauthorized` | No key, a wrong key, or a revoked key |
| 403 | `api_access_not_approved` | The organization's API access isn't approved (yet) |
| 403 | `not_a_clinic` | The key belongs to an organization the API doesn't cover |

## Rate limits

300 requests per minute per key. Over that, you get `429 rate_limited` with a `Retry-After` header (seconds). Back off and retry.


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