> ## Documentation Index > Fetch the complete documentation index at: https://developer.rocket.chat/llms.txt > Use this file to discover all available pages before exploring further. # Update User Details > Use this endpoint to update the details of an existing user. This endpoint requires 2FA.
**Permissions required**: - `edit-other-user-password`: Permission to modify other user's passwords - `edit-other-user-info_description`: Permission to change other user's name, username or email address - `edit-other-user-active-status`: Permission to enable or disable other accounts ### Changelog | Version | Description | | ---------------- | ------------| |7.0.0 | Removed upsert behaviour and stopped allowing `joinDefaultChannels` param| |0.48.0 | Renamed to `users.update` | |0.35.0 | Added | ## OpenAPI ````json POST /api/v1/users.update { "openapi": "3.0.0", "info": { "version": "1.0.0", "title": "User Management" }, "servers": [ { "url": "https://apiexplorer.support.rocket.chat" } ], "tags": [ { "name": "LDAP" }, { "name": "Permissions" }, { "name": "Roles" }, { "name": "Users" }, { "name": "SAML" } ], "paths": { "/api/v1/users.update": { "post": { "tags": [ "Users" ], "summary": "Update User Details", "description": "Use this endpoint to update the details of an existing user. This endpoint requires 2FA.
\n**Permissions required**:\n- `edit-other-user-password`: Permission to modify other user's passwords\n- `edit-other-user-info_description`: Permission to change other user's name, username or email address\n- `edit-other-user-active-status`: Permission to enable or disable other accounts\n\n### Changelog\n| Version | Description | \n| ---------------- | ------------|\n|7.0.0 | Removed upsert behaviour and stopped allowing `joinDefaultChannels` param|\n|0.48.0 | Renamed to `users.update` |\n|0.35.0 | Added |", "operationId": "post-api-v1-users.update", "parameters": [ { "$ref": "#/components/parameters/UserId" }, { "$ref": "#/components/parameters/Auth-Token" }, { "name": "x-2fa-code", "in": "header", "required": "true", "description": "Enter the 2FA code. This parameter is required if 2FA is enabled in your workspace. See the Introduction to Two-Factor Authentication document for details.", "schema": { "type": "string" }, "example": "148750" }, { "name": "x-2fa-method", "in": "header", "required": "true", "schema": { "type": "string" }, "description": "Enter the method with which you get the 2FA code. It can be `email`, `totp`, or `password`. This parameter is required if 2FA is enabled in your workspace." } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "userId": { "type": "string", "description": "The user ID to update. This value must not be empty.", "example": "PMGoujw82oETsaw9828rQh2oXM" }, "data": { "type": "object", "description": "The object that includes the user information to update with the following parameters. Note: If you provide an empty object, the user details are returned.", "properties": { "name": { "type": "string", "description": "The name of the user.", "example": "Agent 2 Updated" }, "email": { "type": "string", "example": "agent2@agent.com", "description": "The email ID of the user." }, "password": { "type": "string", "example": "passw0rd", "description": "The password for the user." }, "username": { "type": "string", "example": "example", "description": "The username for the user." }, "active": { "type": "boolean", "description": "Whether the user is active, which determines if they can login or not.", "default": "true" }, "roles": { "type": "array", "description": "The roles the user has been assigned.", "items": { "type": "string" } }, "requirePasswordChange": { "type": "boolean", "description": "Whether the user should be required to change their password when they login.", "default": "false" }, "sendWelcomeEmail": { "type": "boolean", "default": "false", "description": "Whether the user should get a welcome email." }, "freeSwitchExtension": { "type": "string", "description": "The voice call extension." }, "verified": { "type": "boolean", "description": "Whether the user's email address should be verified.", "default": "true" }, "customFields": { "type": "object", "example": { "clearance": "High", "team": "Queen" }, "description": "Any custom fields the user should have on their account.\nTo save custom fields, you must first define the custom fields in the admin panel (Manage > Workspace > Settings > Accounts > Registration > Custom Fields). For details on how to configure this field, see [Custom Fields](https://docs.rocket.chat/use-rocket.chat/workspace-administration/settings/accounts/custom-fields).\nFor information on how to view the custom fields, see the [Get Users List](https://developer.rocket.chat/reference/api/rest-api/endpoints/user-management/users-endpoints/get-users-list) endpoint." } } } }, "required": [ "userId", "data" ] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "user": { "type": "object", "properties": { "_id": { "type": "string" }, "createdAt": { "type": "string" }, "username": { "type": "string" }, "emails": { "type": "array", "items": { "type": "object", "properties": { "address": { "type": "string" }, "verified": { "type": "boolean" } } } }, "type": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "status": { "type": "string" }, "active": { "type": "boolean" }, "inactiveReason": { "type": "string" }, "name": { "type": "string" }, "_updatedAt": { "type": "string" }, "__rooms": { "type": "array", "items": { "type": "string" } }, "requirePasswordChange": { "type": "boolean" }, "settings": { "type": "object", "properties": {} }, "statusText": { "type": "string" }, "livechatStatusSystemModified": { "type": "boolean" }, "statusLivechat": { "type": "string" } } }, "success": { "type": "boolean" } } }, "examples": { "Example": { "value": { "user": { "_id": "PMGoujw82oETsaw9828rQh2oXM", "createdAt": "2026-02-24T23:22:54.986Z", "username": "agent2", "emails": [ { "address": "agent2@agent.com", "verified": "false" } ], "type": "user", "roles": [ "user", "livechat-agent" ], "status": "offline", "active": "true", "inactiveReason": null, "name": "Agent 2 Updated", "_updatedAt": "2026-02-25T14:25:59.157Z", "__rooms": [ "GENERAL" ], "requirePasswordChange": "false", "settings": {}, "statusText": "", "livechatStatusSystemModified": "false", "statusLivechat": "not-available" }, "success": "true" } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "error": { "type": "string" }, "errorType": { "type": "string" }, "details": { "type": "object", "properties": { "method": { "type": "string" }, "action": { "type": "string" } } } } }, "examples": { "Example 1": { "value": { "success": "false", "error": "Editing user is not allowed [error-action-not-allowed]", "errorType": "error-action-not-allowed", "details": { "method": "insertOrUpdateUser", "action": "Editing_user" } } } } } } }, "401": { "$ref": "#/components/responses/authorizationError" } } } } }, "components": { "parameters": { "UserId": { "name": "X-User-Id", "in": "header", "description": "The authenticated user ID.", "required": "true", "schema": { "type": "string" }, "example": "rbAXPnMktTFbNpwtJ" }, "Auth-Token": { "name": "X-Auth-Token", "in": "header", "description": "The authenticated user token.", "required": "true", "schema": { "type": "string" }, "example": "RScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f" } }, "responses": { "authorizationError": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "message": { "type": "string" } } }, "examples": { "Authorization Error": { "value": { "status": "error", "message": "You must be logged in to do this." } } } } } } } } } ````