> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.hollr.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.hollr.ai/_mcp/server.

# Authentication

Every request to the HollrAI API must include your API key in the `hollr-api-key` header.

```bash
curl https://api.hollr.ai/v1/conversation/conversations \
  -H "hollr-api-key: YOUR_API_KEY"
```

Keep your API key on your server. Do not expose it in browser-side JavaScript,
mobile apps, public repositories, or other client-side code.

## Getting an API key

API keys are managed from the HollrAI platform at [app.hollr.ai](https://app.hollr.ai).

#### Open HollrAI

Sign in to [app.hollr.ai](https://app.hollr.ai).

#### Open API Keys

Open the **API Keys** section and create a key for the integration you are building.

#### Store it securely

Store the key in an environment variable or secrets manager.

```bash
export HOLLR_API_KEY="your-key-here"
```

## Sending the header

```bash title="cURL"
curl https://api.hollr.ai/v1/conversation/conversations \
  -H "hollr-api-key: $HOLLR_API_KEY"
```

```javascript title="JavaScript"
const response = await fetch(
  "https://api.hollr.ai/v1/conversation/conversations",
  {
    headers: {
      "hollr-api-key": process.env.HOLLR_API_KEY,
    },
  },
);
```

```python title="Python"
import os
import requests

response = requests.get(
    "https://api.hollr.ai/v1/conversation/conversations",
    headers={"hollr-api-key": os.environ["HOLLR_API_KEY"]},
)
```

## Authentication failures

| Status | Meaning                                                      |
| ------ | ------------------------------------------------------------ |
| `401`  | The API key is missing or not recognized.                    |
| `403`  | The API key is valid but is not authorized for the resource. |

The standard error response looks like:

```json
{
  "status": "error",
  "error_code": "401",
  "message": "Unauthorized"
}
```

## Protect your key

If you suspect a key has been exposed, rotate or revoke it from the HollrAI platform and replace it in your application.