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

# User & Workspaces

> Identify the caller and list the workspaces a key can act on

Every budget in Kualia lives in a **workspace**. Almost all endpoints are scoped to one: `/v1/workspaces/{workspace_id}/...`. Start here to find your workspace ids.

## Get the authenticated user

```text theme={null}
GET /v1/user
```

```bash theme={null}
curl https://api.kualia.com/v1/user \
  -H "Authorization: Bearer YOUR_API_KEY"
```

```json theme={null}
{
  "data": {
    "user": {
      "id": "user_2ab...",
      "email": "you@example.com",
      "name": "Igor",
      "default_workspace_id": "k1234..."
    }
  }
}
```

## List workspaces

```text theme={null}
GET /v1/workspaces
```

```json theme={null}
{
  "data": {
    "workspaces": [
      {
        "id": "k1234...",
        "name": "Family Budget",
        "currency": "USD",
        "timezone": "America/New_York",
        "role": "admin",
        "archived": false
      }
    ]
  }
}
```

`role` is `admin` for workspaces you own (or family groups you manage) and `member` otherwise.

## Get a workspace

```text theme={null}
GET /v1/workspaces/{workspace_id}
```

Returns the same fields plus `ready_to_assign` — the amount of money not yet assigned to any category:

```json theme={null}
{
  "data": {
    "workspace": {
      "id": "k1234...",
      "name": "Family Budget",
      "currency": "USD",
      "timezone": "America/New_York",
      "role": "admin",
      "archived": false,
      "ready_to_assign": "412.50"
    }
  }
}
```

<Note>Archived workspaces are listed by `GET /v1/workspaces` but reject all other API calls with `403`.</Note>
