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

# Authentication

> Auth0 Bearer tokens, access:temi, and X-Workspace-ID.

Temi authenticates **members** through Auth0. Product authorization always comes
from workspace membership — never from the client UI alone.

## Bearer access token

API and native clients send:

```http theme={null}
Authorization: Bearer <access_token>
```

Requirements:

* Auth0 audience is the Temi Platform API
* Permission / scope includes `access:temi`
* Token maps to a Temi member via `auth_identities`

Web browsers typically use Temi’s BFF cookie session (`temi_web_session`) instead
of exposing the access token to JavaScript.

## Workspace header

After bootstrap / membership list, send the active workspace on scoped routes:

```http theme={null}
X-Workspace-ID: 33333333-3333-3333-3333-333333333333
```

> [!WARNING]
>
> Changing `X-Workspace-ID` to a workspace you do not belong to returns an
> authorization error. The header never creates membership.

## First-call recipe

```bash theme={null}
# 1) Confirm API host
curl -s https://temi.curiosityflex.xyz/api/healthz

# 2) Resolve member
curl -s https://temi.curiosityflex.xyz/api/v1/me \
  -H "Authorization: Bearer $TEMI_TOKEN"

# 3) Bootstrap personal workspace if needed (verified environments)
curl -s -X POST https://temi.curiosityflex.xyz/api/v1/workspaces/bootstrap \
  -H "Authorization: Bearer $TEMI_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

# 4) List memberships for the product switcher
curl -s https://temi.curiosityflex.xyz/api/v1/workspaces \
  -H "Authorization: Bearer $TEMI_TOKEN"
```

## Playground

Open any generated endpoint under the **API** tab, paste your Bearer token into
the auth field, and send. Prefer staging while experimenting:

`https://staging-temi.curiosityflex.xyz/api`


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