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

# User Endpoints

> User state management and preferences

> **Source:** `equa-server/modules/api/src/endpoints/user-endpoints.ts`

# User Endpoints

Endpoints for managing user-level state and preferences. These are separate from the auth endpoints which handle authentication and profile updates.

All user endpoints require authentication.

## User State

User state stores onboarding progress, UI preferences, and feature flags for the authenticated user.

### Update User State

```
PATCH /v1/user/state
```

| Field | Value    |
| ----- | -------- |
| Auth  | Required |

Update the user's state (onboarding steps completed, UI preferences, etc.).

**Request:**

```json theme={null}
{
  "completedSteps": ["profile", "organization", "captable"],
  "preferences": {
    "theme": "dark",
    "dashboardLayout": "compact"
  }
}
```

**Response:**

```json theme={null}
{
  "state": {
    "completedSteps": ["profile", "organization", "captable"],
    "preferences": {
      "theme": "dark",
      "dashboardLayout": "compact"
    }
  }
}
```

***

### Get User State

```
GET /v1/user/state
```

| Field | Value    |
| ----- | -------- |
| Auth  | Required |

Retrieve the current user's state.

**Response:**

```json theme={null}
{
  "state": {
    "completedSteps": ["profile", "organization"],
    "preferences": {
      "theme": "light"
    }
  }
}
```
