> ## 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 authenticated user and (when present) workspace behind the current API key or OAuth access token. Useful to verify credentials.

## 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                                              |
| ----------------------- | ------------------- | -------------------------------------------------------- |
| `user`                  | object              | The authenticated user                                   |
| `user.userId`           | string              | User identifier                                          |
| `user.username`         | string              | Username (may be empty)                                  |
| `user.email`            | string \| undefined | Primary email, when known                                |
| `user.metadata`         | object              | Free-form user metadata                                  |
| `user.createdAt`        | string              | Record creation time (ISO 8601)                          |
| `user.updatedAt`        | string              | Record last-update time (ISO 8601)                       |
| `workspace`             | object \| undefined | The caller's workspace — absent when the caller has none |
| `workspace.workspaceId` | string              | Workspace identifier                                     |
| `workspace.name`        | string              | Workspace display name (may be empty)                    |
| `workspace.slug`        | string              | Workspace slug (may be empty)                            |
| `workspace.metadata`    | object              | Free-form workspace metadata                             |
| `workspace.createdAt`   | string              | Record creation time (ISO 8601)                          |
| `workspace.updatedAt`   | string              | Record last-update time (ISO 8601)                       |

### Example Response

```json theme={null}
{
  "user": {
    "userId": "user_abc123",
    "username": "jane",
    "email": "jane@acme.com",
    "metadata": {},
    "createdAt": "2026-01-15T09:00:00.000Z",
    "updatedAt": "2026-03-01T12:00:00.000Z"
  },
  "workspace": {
    "workspaceId": "org_abc123",
    "name": "Acme, Inc.",
    "slug": "acme-inc",
    "metadata": {},
    "createdAt": "2026-01-15T09:00:00.000Z",
    "updatedAt": "2026-03-01T12:00:00.000Z"
  }
}
```
