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

# Session

> GET /api/session — retrieve the current authenticated user's session

## Get Current Session

Returns information about the authenticated user, their organization, and the current license.

```
GET /api/session
```

### Response

```json theme={null}
{
  "user": {
    "id": "usr_01hx...",
    "email": "alice@acme.com",
    "name": "Alice Smith",
    "role": "ORG_ADMIN",
    "dashboard_access": true
  },
  "org": {
    "id": "org_01hx...",
    "name": "Acme Corp",
    "domain": "acme.com"
  },
  "license": {
    "plan": "pro",
    "status": "active",
    "billing_cycle": "monthly",
    "expires_at": "2025-11-14T00:00:00Z"
  }
}
```

### Fields

**user**

| Field              | Type    | Description                                  |
| ------------------ | ------- | -------------------------------------------- |
| `id`               | string  | Internal user ID                             |
| `email`            | string  | Auth0 email                                  |
| `name`             | string  | Display name                                 |
| `role`             | string  | `ORG_ADMIN`, `ANALYST`, or `APP_USER`        |
| `dashboard_access` | boolean | Whether the user is allowed dashboard access |

**org**

| Field    | Type   | Description                           |
| -------- | ------ | ------------------------------------- |
| `id`     | string | Organization ID                       |
| `name`   | string | Display name                          |
| `domain` | string | Email domain (null for personal orgs) |

**license**

| Field           | Type   | Description                                      |
| --------------- | ------ | ------------------------------------------------ |
| `plan`          | string | `none`, `basic`, `pro`, or `enterprise`          |
| `status`        | string | `pending`, `onboarding`, `active`, or `canceled` |
| `billing_cycle` | string | `monthly` or `annual`                            |
| `expires_at`    | string | ISO 8601 expiration timestamp                    |

### Errors

| Code  | Description                             |
| ----- | --------------------------------------- |
| `401` | Missing or invalid Authorization header |
| `403` | User's dashboard access is disabled     |
