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

# Authentication

> Authenticate REST API and MCP requests using project-scoped API keys.

Every request to `/api/v1/*` and `/mcp` must include a **project-scoped API key** generated in the AuroraX Developer Portal.

## Sending Your API Key

Pass your key via either header:

```http Authorization Bearer (Recommended) theme={null}
Authorization: Bearer ask_live_your_key_here
```

```http X-API-Key Header theme={null}
X-API-Key: ask_live_your_key_here
```

> [!WARNING]
>
> Never pass API keys in URL query strings (such as `?api_key=...`) or expose them in client-side browser bundles. The MCP endpoint explicitly rejects query-string credentials with `400 Bad Request`.

## Scoping & Isolation

* Each API key belongs to **exactly one project**.
* All requests, end users, linked phone numbers, transcripts, and recordings are strictly isolated to the API key's project. Accessing a resource from another project returns `404 Not Found`.
* Revoking a key in the Developer Portal immediately invalidates it (`401 Unauthorized`) without affecting active keys on the same project.

## Workspace & Project Gates

| Condition | HTTP Status | Behavior |
| - | - | - |
| Missing, malformed, or revoked key | `401` | Rejected on all endpoints. On `/mcp`, returns `WWW-Authenticate: Bearer realm="aurora-mcp"` without OAuth discovery metadata. |
| Organization workspace not yet activated | `402` | Read endpoints remain accessible; creating requests, submitting clarification answers, and linking phone numbers require an active workspace. |
| Project suspended | `403` | Mutating operations (`create_request`, `cancel_request`, phone linking) are blocked until re-enabled. |


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