# Update an existing user's profile and permissions Modifies an existing user account identified by the login ID. Supports updating the role, email, phone number, and computer scope. Changes take effect immediately. ## Endpoint `POST /dcapi/users-cloud/{userId}` ## Request URL `https://[{serverurl}](https://www.manageengine.com/products/desktop-central/help/api/cloud/oauth-authentication-endpoint-domain.html)/dcapi/users-cloud/{userId}` ## Scope `DesktopCentralCloud.Admin.CREATE` ## Header `Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52` ## Request Parameters ### Request Headers - **content-type** `string` — **Mandatory** - `application/userModification.v1+json` - Specifies the request payload format. Set to application/userModification.v1+json to submit the user data in JSON format. ### 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/cloud/users-public-update-user.html?UsersPublic_getUserMeta) ### Request Body `application/json` `JSON Object` - **userName** `string` — **Mandatory** - Updated username for the user. - **mailID** `string` — **Mandatory** - Updated email address for the user. - **roleID** `string` — **Mandatory** - Updated role identifier for the user. To get available role IDs, use this API. [Get Role ID](https://www.manageengine.com/products/desktop-central/help/api/cloud/users-public-update-user.html?Roles_getRoles) - **computerScopeType** `integer` — **Mandatory** - Computer scope type for the user. `0` = All computers, `1` = Custom scope. - **phoneNumber** `string` — **Mandatory** - Updated phone number for the user. ## Sample Request ```curl curl --request POST \ --url https://appdomains/dcapi/users-cloud/{userId} \ --header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' \ --header 'content-type: application/userModification.v1+json' \ --data '{"computerScopeType":0,"roleID":"9502000000014452","mailID":"john.smith@example.com","userName":"john.smith"}' ``` ## Sample Request Body Update user details including username, email, role, and scope settings. ```json { "computerScopeType": 0, "roleID": "9502000000014452", "mailID": "john.smith@example.com", "userName": "john.smith" } ``` ## Response Parameters ### HTTP Code 200 Response Body — `application/json` `string` ### HTTP Code 400 Response Body — `application/json` `JSON Object` - **errorCode** `string` - Application-specific error code indicating the reason for the request failure. - **errorMsg** `string` - Error message describing the cause of the error. ## Possible Response Codes - **200** — HTTP code - **400** — HTTP code ## Sample Response: HTTP 200 ```json {} ``` ## Sample Response: HTTP 400 Error response when the user name is shorter than the minimum required length. ```json { "errorCode": "IAM0024", "errorMsg": "Parameter length of \"userName\" is shorter than minimum requirement." } ``` ## Rate Limits ![](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.