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

# Authentication

> API keys for the dashboard, MCP, and REST. Org scoping and 401s.

The endpoints in this API reference require a live key.

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl "https://api.freshtalent.ai/v1/me" \
  -H "Authorization: Bearer ft_live_…"
```

`X-Api-Key: ft_live_…` is accepted as well. Send only one method; a nonempty `X-Api-Key` takes precedence if both headers are present.

## Recruiter

You do not need a key to use Search, Companies, Lists, Targets, and Monitoring in the [dashboard](https://freshtalent.ai). Create a key only when someone on your team is connecting Claude, a script, or the ATS. Sidebar → **API Keys** (not inside Settings).

## Create a key

<Steps>
  <Step title="Dashboard">
    Sidebar → **API Keys**. Plaintext is shown once, on create or rotate.
  </Step>

  <Step title="CI / servers">
    ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
    export FRESHTALENT_API_KEY=ft_live_…
    export FRESHTALENT_API_URL=https://api.freshtalent.ai
    ```

    `FRESHTALENT_APP_URL` (`https://freshtalent.ai`) is only for device login.
  </Step>
</Steps>

## Scoping

Customer keys see only their own org. `X-FreshTalent-Org-Id` is ignored on those keys.

The App's platform key may impersonate a session org with `X-FreshTalent-Org-Id`.

## Failures

| Status | `error.type`       | Meaning                                                                                 |
| ------ | ------------------ | --------------------------------------------------------------------------------------- |
| `401`  | `unauthorized`     | Missing, malformed, or revoked key                                                      |
| `400`  | `invalid_request`  | Invalid organization context or request; framework validation can use a different shape |
| `402`  | `payment_required` | Organization access is locked after its trial; subscribe or restore access              |

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "error": {
    "type": "unauthorized",
    "message": "valid API key required (Authorization: Bearer ft_live_…)"
  }
}
```

<Warning>
  Never put keys in frontend bundles, mobile apps, or git. Rotate in the dashboard if one leaks.
</Warning>

[GET /me](/api-reference/account/me) reports plan and Target-slot usage (`watch_slots`). Index's 100 unique profiles/day is reported; the Gateway does not enforce that cap yet.

[Get account](/api-reference/account/me) remains available to inspect `access.allowed`. See [Errors](/errors) for status-first handling and retry guidance.
