PUT - Change the Role of a User
Purpose
This API can be used to change the role of any user in the organization.
OAuth Scope
Use the scope
ZohoMail.organization.accounts.ALL (or) ZohoMail.organization.accounts.UPDATE
to generate the Authtoken.
ALL - Grants full access to accounts.
UPDATE - Grants update access to accounts.
Request URL
Method: PUT
https://mail.zoho.com/api/organization/{zoid}/accounts
Path Parameters
- zoid* long
- This parameter denotes the unique Zoho Organization Identifier for the organization.
 - This value can be retrieved using the GET organization details API.
 
 
Request Body (JSON Object)
- userList* JSON array of long
- This parameter needs to be passed as an array of single or multiple zuids whose role has to be changed.
 - zuid is a unique identifier for a user in an organization. This value can be retrieved using the GET all org user details API.
 
 - mode* string
- This parameter represents the type of operation that is to be performed.
 - Provide the value as changeRole.
 
 - role* string
- role denotes the role to be assigned for the user.
 - Allowed values: 
- member
 - admin
 
 
 
* - Mandatory parameter
Response Codes
Refer here for the response codes and their meaning.
Sample Request
Copiedcurl "https://mail.zoho.com/api/organization/1234567890/accounts" \
-X PUT \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Zoho-oauthtoken *****" \
-d '{
   "userList":["8887771"],
   "mode": "changeRole",
   "role": "user"
}'Copied{
    "status": {
        "code": 200,
        "description": "success"
    },
    "data": [
        {
            "8887771": true
        }
    ]
}