---
title: "Update User Profile"
method: PATCH
path: "/users/me"
tags: ["users"]
---

# Update User Profile

`PATCH /users/me`

Update the authenticated user's profile fields.

Uses service-role client to bypass RLS on the users table.

Args:
    request: Fields to update (onboarded, intent).
    auth: Authenticated user context.

Returns:
    UpdateUserProfileResponse with success status.

Raises:
    HTTPException: 400 if no fields provided, 500 on DB failure.

## Request body

- UpdateUserProfileRequest — Request for updating user profile fields. Attributes: onboarded: Mark onboarding as complete. intent: User's chosen workflow intent from onboarding. agent_mode: Preferred agent mode ('mle' or 'auto'). preferred_language: Preferred code language for inference snippets. preferred_framework: Preferred API framework for inference snippets. team_size: Self-reported team size bucket from onboarding. org_name: Organisation name from onboarding (persisted + Attio). use_case: Free-text use case from onboarding (persisted + Attio).
  - `onboarded` boolean, nullable
  - `intent` string, nullable
  - `agent_mode` string, nullable
  - `preferred_language` string, nullable
  - `preferred_framework` string, nullable
  - `adaptive_learning_cadence` string, nullable
  - `team_size` string, nullable
  - `org_name` string, nullable
  - `use_case` string, nullable
  - `training_opt_out` boolean, nullable

## Response `200`

Successful Response

- UpdateUserProfileResponse — Response for user profile update.
  - `success` boolean, required
  - `message` string, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/pioneer/apis/brain-api.md) · [All operations](https://skmtc.net/pioneer/apis/brain-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/pioneer/brain-api/revisions/31dfe831e079/schema)
