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

# Who Am I

> Return the identity behind the current API key or OAuth access token.

```text theme={null}
GET /v1/auth/whoami
```

Return the identity behind the current API key or OAuth access token. Useful to verify credentials and inspect available scopes.

## Headers

| Header          | Required | Description                              |
| --------------- | -------- | ---------------------------------------- |
| `Authorization` | Yes      | `Bearer <api-key>` or OAuth access token |

## Example Request

<CodeGroup>
  ```bash curl theme={null}
  curl "https://api.monid.ai/v1/auth/whoami" \
    -H "Authorization: Bearer monid_live_..."
  ```

  ```typescript TypeScript theme={null}
  const res = await fetch("https://api.monid.ai/v1/auth/whoami", {
    headers: { Authorization: "Bearer monid_live_..." },
  });
  ```

  ```python Python theme={null}
  import requests

  res = requests.get(
      "https://api.monid.ai/v1/auth/whoami",
      headers={"Authorization": "Bearer monid_live_..."},
  )
  ```
</CodeGroup>

## 200 OK

| Field    | Type           | Description                              |
| -------- | -------------- | ---------------------------------------- |
| `userId` | string         | User identifier                          |
| `email`  | string \| null | User email (if scope allows)             |
| `name`   | string \| null | User display name (if scope allows)      |
| `scopes` | string\[]      | Scopes granted to the current credential |

### Example Response

```json theme={null}
{
  "userId": "user_abc123",
  "email": "jane@acme.com",
  "name": "Jane Doe",
  "scopes": ["openid", "profile", "email", "use:org:read"]
}
```
