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

# 3. Administrative User Profile Management

> [!WARNING]
>
> You are viewing the documentation of release 26.1, which is no longer the current one. [Go to the documentation of the current release 26.2](https://developers.circularo.com/).

## Administrative User Profile Management

This scenario demonstrates how administrators can update and manage user profiles within Circularo. Unlike user self-service profile updates through the UI, administrative profile management allows authorized administrators to modify user attributes that users themselves cannot change, such as group memberships and account status.

**Key features:**

* Update user profile information as an administrator, including properties users cannot modify themselves
* Modify advanced attributes like group memberships and permissions that are restricted from user self-service
* Maintain accurate organizational records through centralized administration
* Ensure users have correct contact information for notifications even when they cannot access their accounts

### Prerequisites

Before managing user profiles, you need:

* A valid authentication token with administrative privileges
* Knowledge of the user ID (typically email address) you want to modify
* Understanding of the user attributes that can be modified

> [!WARNING]
>
> Administrative user profile management requires administrator privileges. Only organization administrators or global administrators can perform these operations.

### Administrator-Editable User Attributes

Circularo allows administrators to update various user attributes, including some that users cannot modify themselves:

* **Basic Information**: Phone numbers, role, full name, etc. (users can also update these via UI)
* **User Preferences**: Language, time zone, and other personalization settings (users can also update these via UI)
* **Status**: Active or suspended status (controls account access, admin-only)
* **Group Memberships**: Organizational groups that determine permissions (admin-only)

> [!NOTE]
>
> While users can update some profile information themselves through the UI (like phone numbers), this API-based administrative scenario enables authorized administrators to modify any user attribute, including those restricted from user self-service.

## Step 1 - Administrative Update of User Profile

This endpoint demonstrates how administrators can update a user's profile information. Unlike user self-service updates, administrators can modify various user attributes including those that users themselves cannot change.

* Updates specific attributes of a user's profile without affecting other settings
* Requires the user ID (typically email address) to identify the user to update
* Changes take effect immediately and are reflected throughout the system
* Only specified attributes are modified; omitted attributes remain unchanged

> [!NOTE]
>
> When updating user profiles, only include the attributes you want to change. This prevents unintentional modifications to other user settings.

**Endpoint**

```http theme={null}
PUT /users/:id
```

**Request**

```http theme={null}
PUT /users/derek.trotter@circularo.com?token=1Lgi4QEpoqjhZvQ6k11rbveJFCnVMPhgeNufaGr8jOksMeNPk8dgSt0n631xrghr

Content-Type: application/json

{
  "phone": "+1234567890",  //User's phone number for contact and SMS notifications
  "role": "Project Manager"  //User's job title or functional role in the organization
}
```

**Response**

```json theme={null}
{
  "status": "SUCCESS"
}
```

The user profile has been successfully updated with the new information. The changes are immediately reflected in the system and will be visible to the user and other administrators.

* The user's phone number has been updated for contact purposes and SMS notifications
* The user's role designation has been updated to reflect their position in the organization
* Other user attributes remain unchanged
* No notification is automatically sent to the user about these changes

> [!NOTE]
>
> You can update multiple attributes in a single request. Simply include all the attributes you want to modify in the request body.

***

## User Profile Management Summary

You have successfully learned how to update user profiles in the Circularo system.

### Key Concepts

* **Profile Attributes**: Various user information fields that can be updated
* **Selective Updates**: Modifying only specific attributes while preserving others
* **Administrative Control**: Centralized management of user information
* **Contact Information**: Maintaining accurate details for notifications and communications

### Next Steps

With your understanding of user profile management, you can now:

* Implement profile update workflows in your integration
* Maintain accurate user information across your organization
* Update user roles to reflect organizational changes
* Ensure proper contact information for notifications and alerts
* Explore more advanced user management operations like permission changes

### Example Implementation

> [!NOTE]
>
> See our OpenAPI documentation to learn about the full set of API endpoints and parameters.

> [!NOTE]
>
> Please use proper exception handling and function decomposition in your own code. The code is provided for illustrative purposes only and is not intended for production use.

```javascript theme={null}
// User profile update example
const URL = "https://sandbox.circularo.com";
const API_PATH = "/api/v1";
const TOKEN = "YOUR_ADMIN_TOKEN"; // Must have administrative privileges
const USER_ID = "user@example.com"; // ID of the user to update

try {
    // Update user profile information
    const updateResponse = await fetch(`${URL}${API_PATH}/users/${USER_ID}?token=${TOKEN}`, {
        method: 'PUT',
        headers: {
            'Content-Type': 'application/json'
        },
        body: JSON.stringify({
            // Only include attributes you want to change
            phone: "+1234567890",
            role: "Project Manager"
        })
    });
    if (!updateResponse.ok) {
        throw new Error(`Profile update failed: ${updateResponse.status} ${updateResponse.statusText}`);
    }

    const updateResult = await updateResponse.json();
    console.log("User profile updated successfully:", updateResult);

} catch (error) {
    console.error('Error updating user profile:', error.message);
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.