# Update an existing user Updates user profile fields such as role, email, phone, and scope settings. ## Endpoint **POST** `/emsapi/users/{userId}` ## Request URL ```text https://{server-hostname}:8383/emsapi/users/{userId} ``` ## Scope ```text Admin.UPDATE ``` ## Header ```text Authorization: d92d4xxxxxxxxxxxxx15f52 ``` ## Request Parameters ### Path Parameters **userId** `string` — **Mandatory** Unique user identifier. To get user id click here. [Get User Id](https://www.manageengine.com/products/desktop-central/help/api/onpremise/users-update-user-on-prem.html?Users_getUsersOnPrem) ### Request Body `application/json` `JSON object` - **phoneNumber** `string` — Optional Updated phone number for the user. - **roleID** `long` — Optional Updated role identifier for the user. - **mailID** `string` — Optional Updated email address for the user. - **authType** `string` — Optional Authentication mode for the user. ## Sample Request ```curl curl --request POST \ --url https://appdomain/emsapi/users/{userId} \ --header 'Authorization: d92d4xxxxxxxxxxxxx15f52' \ --header 'content-type: application/json' \ --data '{"phoneNumber":"12312","roleID":1,"mailID":"alex.morgan@example.com","authType":"localAuthentication"}' ``` ## Sample Request Body Update role, username, phone, and scope for an existing user. ```json { "phoneNumber": "12312", "roleID": 1, "mailID": "alex.morgan@example.com", "authType": "localAuthentication" } ``` ## Response Parameters ### HTTP Code 200 Response Body — `application/json` `JSON object` - **userCreatedByDC** `boolean` Indicates whether the user account was created by Endpoint Central. - **domainName** `string` Domain name of the updated user. - **userName** `string` Username after update. ## Possible Response Codes - **200** `HTTP code` ## Sample Response: HTTP 200 User update succeeds with current and previous identity context. ```json { "userCreatedByDC": true, "domainName": "local", "userName": "alex.morgan" } ``` ## Rate Limit ![](https://www.zohowebstatic.com/sites/zweb/images/people/ico-help.png) **Duration:** 1 minute | **Threshold:** 30 | **Lock period:** 5 minutes Duration - Time window for the threshold. Threshold - Number of API calls allowed within the specified duration. Lock Period - Wait time before consecutive API requests.