# Update user profile

URL: /en/docs/api/v1/users/id/patch
Last Updated: 2026-07-30T21:15:30.465Z

## Description
No description available.

## Available Actions
- Execute PATCH request
- View request parameters
- View response schema
- Get code examples
- Navigate to related topics
- View step-by-step instructions
- Get best practices

## Content
### PATCH /api/v1/users/{id}

**Update user profile**

Update user profile information including personal details, preferences, and status. Non-admins can update their own profile fields; admins can update any user in their tenant and are required for role or status changes.

**Authentication:** Bearer token (`Authorization: Bearer <token>`)

**Path parameters:**

| Name | Type | Required | Description |
|---|---|---|---|
| `id` | string (uuid) | Yes | User ID |

**Request body** (`application/json`) - required:

- `first_name` (string): User's first name
- `last_name` (string): User's last name
- `title` (string): User's job title
- `appearance` (enum: light | dark | system): User's UI theme preference (maps to theme field)
- `language` (string): User's language preference
- `role` (enum: admin | account_manager | content_manager | viewer): Role to assign (admin only)
- `status` (enum: active | suspended | archived): User status to set (admin only)

Example (Update profile information):

```json
{
  "first_name": "Jane",
  "last_name": "Smith",
  "title": "Senior Compliance Manager"
}
```

Example (Update UI preferences):

```json
{
  "appearance": "dark",
  "language": "en"
}
```

Example (Change theme only):

```json
{
  "appearance": "system"
}
```

Example (Change user role (admin only)):

```json
{
  "role": "account_manager"
}
```

Example (Change user status (admin only)):

```json
{
  "status": "suspended"
}
```

**Responses:**

- `200` - User profile updated successfully
  - `success` (boolean)
  - `data` (object)
    - `user` (UserProfile (object))
      - `id` (string (uuid)): Unique user identifier
      - `first_name` (string): User's first name
      - `last_name` (string): User's last name
      - `email` (string (email)): User's email address
      - `title` (string): User's job title
      - `theme` (enum: light | dark | system): User's UI theme preference
      - `language` (string): User's language preference
      - `status` (enum: active | invited | suspended | archived): User account status
- `400` - Bad Request - validation failed or no valid fields provided
  - `error` (string): Validation error message
- `401` - Unauthorized
- `403` - Forbidden - insufficient permissions (e.g., non-admin attempting to change role or edit another user's data) or target user not in your tenant
  - `error` (string)
  - `code` (string)

  Example (Non-admin attempting role change):
  
  ```json
  {
  "error": "Insufficient permissions to change roles"
}
  ```

  Example (Non-admin attempting status change):
  
  ```json
  {
  "error": "Insufficient permissions to change status"
}
  ```

  Example (User attempting to change their own status):
  
  ```json
  {
  "error": "You cannot change your own status.",
  "code": "self_status_change"
}
  ```

  Example (Target user not in caller's tenant):
  
  ```json
  {
  "error": "User is not part of your tenant"
}
  ```
- `404` - User not found
- `500` - Internal server error

**Code samples:**

cURL:

```bash
curl -X PATCH "https://app.orbiqhq.com/api/v1/users/{id}" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json"
```

