Transfer Users and Delete Role
Purpose
To delete a role and transfer the users to a new role in your organization.
Request Details
Request URL
{api-domain}/crm/{version}/settings/roles/{role_id}
Header
Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52
Scope
scope=ZohoCRM.settings.roles.{operation_type}
Possible operation types
ALL - Full access to roles data
DELETE - Delete roles data
Parameters
- transfer_to_idstring, mandatory
Specify the unique ID of the role to which the users must be transferred to.
Sample Request
Copiedcurl "https://www.zohoapis.com/crm/v5/settings/roles/4150868000005435016?transfer_to_id=4150868000000026005"
-X DELETE
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"
Possible Errors
- OAUTH_SCOPE_MISMATCHHTTP 401
Unauthorized
Resolution: Client does not have ZohoCRM.settings.roles.DELETE scope. Create a new client with valid scope. Refer to scope section above. - NO_PERMISSIONHTTP 403
Permission denied to delete
Resolution: The user does not have permission to delete roles data. Contact your system administrator. - INTERNAL_ERRORHTTP 500
Internal Server Error
Resolution: Unexpected and unhandled exception in Server. Contact support team. - INVALID_REQUEST_METHODHTTP 400
The http request method type is not a valid one
Resolution: You have specified an invalid HTTP method to access the API URL. Specify a valid request method. Refer to endpoints section above. - AUTHORIZATION_FAILEDHTTP 401
User does not have sufficient privilege to delete roles
Resolution: The user does not have the permission to delete. Contact your system administrator. - INVALID_DATAHTTP 400
the id given seems to be invalid
Resolution: The role ID specified in the request URL is invalid. Specify valid role ID. - REQUIRED_PARAM_MISSINGHTTP 400
One of the expected parameter is missing
Resolution: Specify the transfer_to_id parameter in the request input. - UNABLE_TO_PARSE_DATA_TYPEHTTP 400
either the request body or parameters is in wrong format
Resolution: The value specified in the transfer_to_id is in the wrong format. Refer to sample in the right pane and specify valid input.
Sample Response
Copied{
"code": "SUCCESS",
"details": {
"id": "4150868000005435016"
},
"message": "Role Deleted",
"status": "success"
}