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 

 http://<hostname>/api/organization/<zoid>/accounts/<accountid>

Request Parameters

ParameterData TypeDescription
zoid* Integerzoid - 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)

ParameterData TypeAllowed ValuesDescription
mode* String 

 changeRole

 To change the Role of the member in the Organization.

zuid* Integerzuid 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 (To change Admin to User)


				{
   "zuid": "1111111",
   "mode": "changeRole",
   "role": "user"
}			

Sample Request (To change User to Admin)


				{
   "zuid": "1111111",
   "mode": "changeRole",
   "role": "admin"
}