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

# Update User

> Update user details

<Note>
  This endpoint requires Admin role to change roles. Users can update their own non-role fields via
  `/api/users/me`.
</Note>

## Path Parameters

<ParamField path="id" type="string" required>
  User UUID
</ParamField>

## Request

<ParamField body="name" type="string">
  New display name
</ParamField>

<ParamField body="role" type="string">
  New role: `employee`, `manager`, `admin` (Admin only)
</ParamField>

<ParamField body="preferences" type="object">
  User preferences
</ParamField>

## Response

Returns the updated user.

<RequestExample>
  ```bash cURL theme={null}
  curl -X PATCH "https://api.hitler.app/api/users/user-uuid-123" \
    -H "Authorization: Bearer YOUR_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
      "role": "manager"
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "id": "user-uuid-123",
    "email": "john@acme.com",
    "name": "John Doe",
    "role": "manager",
    "isActive": true,
    "organizationId": "org-uuid",
    "createdAt": "2024-01-10T15:30:00.000Z",
    "updatedAt": "2024-01-15T14:00:00.000Z"
  }
  ```
</ResponseExample>
