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

# Authentication

> Authorize Public API requests with an organization API key.

The Public API uses API key authentication via the `Authorization` header.

## Header format

```
Authorization: ApiKey <token_value>
```

Example:

```bash theme={null}
curl -sS "https://apipub.firstbasehq.com/api/v1/people" \
  -H "Authorization: ApiKey fb_live_xxxxxxxx" \
  -H "Accept: application/json"
```

<Warning>
  Never commit API keys to source control or share them in client-side code.
</Warning>

## Creating and rotating keys

Organization admins create keys in the Firstbase admin portal. See [Getting Started with the Firstbase API](https://support.firstbase.com/hc/en-us/articles/34906537518487-Getting-Started-with-the-Firstbase-API) for step-by-step instructions.

Rotate compromised keys immediately by revoking the old key and issuing a new one.

## Swagger UI

When testing in [Swagger UI](https://apipub.firstbasehq.com/swagger-ui/index.html), authorize with the same `ApiKey <token_value>` format in the **Authorize** dialog.

## Playground

Use the **Try it** panel on API reference pages. Enter your key as `ApiKey <token_value>` in the authorization field.
