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

# Authentication

> Authenticate API requests with FormantAI Voice API keys.

All public API endpoints require an API key in the `Authorization` header.

```http
Authorization: Bearer YOUR_API_KEY
```

## Create an API key

Open your FormantAI dashboard.

Open **Developer -> API Keys** from the sidebar.

Give the key a recognizable name, such as `production-crm-sync` or `batch-calls-worker`.

Copy the key once and store it in your backend secret manager. Do not expose it in browsers or mobile apps.

## Example request

```bash
curl "https://api.voice.formantai.com/v1/conversations?limit=10" \
  -H "Authorization: Bearer $FORMANT_API_KEY"
```

## Security recommendations

* Store API keys in a server-side secret manager.
* Use separate keys for production and local development.
* Rotate keys when employees leave or integrations are retired.
* Disable unused keys from the dashboard.
* Never put API keys in frontend code, Git repositories, screenshots, or support tickets.

## Authentication errors

Invalid or missing API keys return:

```json
{
  "error": {
    "message": "invalid or missing api key",
    "type": "authentication_error"
  }
}
```