PUT - Change the role of a User
Purpose
This API can be used to change the role of a user in the organization to an admin or the role of an admin to a user.
Request URL
https://<hostname>/api/organization/<zoid>/accounts/<accountid>
Scope
organization.accounts
Request Parameters
Parameter | Data Type | Description |
zoid* | Integer | zoid - The unique Zoho Organization Identifier for the organization |
accountid* | Integer | Account Id of the user whose role should be changed using this API |
* - Mandatory parameters
Request Body (JSON Object)
Parameter | Data Type | Allowed Values | Description |
mode* | String | changeRole | To change the Role of the member in the Organization. |
zuid* | Integer | zuid of the user whose role should be changed | Provide the ZUID of the user whose role should be changed |
role* | String | user admin | The name of the role, to which the user should be switched to. |
* - Mandatory parameters
Response Codes
Please refer Response Codes.
Sample Request
Copied{
"zuid": "1111111",
"mode": "changeRole",
"role": "user"
}
Sample Request (To change User to Admin)
Copied{
"zuid": "1111111",
"mode": "changeRole",
"role": "admin"
}