Transfer Users and Delete Role
Purpose
To delete a role and transfer the users to a new role in your organization.
- DELETE /settings/roles/{role_ID}
Request Details
Request URL
{api-domain}/crm/{version}/settings/roles/{role_ID}
Header
Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52
Scope
ZohoCRM.settings.roles.{operation_type}
Possible operation types
ALL - Full access to roles data
DELETE - Delete roles data
Parameters
- transfer_to_IDstring, mandatorySpecify the unique ID of the role to which the users must be transferred to. 
Sample Request
Copiedcurl "https://www.zohoapis.com/crm/v8/settings/roles/4150868000005435016?transfer_to_id=4150868000000026005"
-X DELETE
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"Possible Errors
- INVALID_REQUEST_METHODHTTP 400The 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 at the beginning of this page for more details.
- INVALID_DATAHTTP 400The id given seems to be invalid 
 Resolution: The role ID specified in the request URL is invalid. Specify valid role ID.
- REQUIRED_PARAM_MISSINGHTTP 400One of the expected parameter is missing 
 Resolution: Specify the transfer_to_id parameter in the request input.
- UNABLE_TO_PARSE_DATA_TYPEHTTP 400Either 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.
- OAUTH_SCOPE_MISMATCHHTTP 401The access token you have used to make this API call does not have the required scope. 
 Resolution: Generate a new access token with the required scopes for this API. Refer to the Scope section at the beginning of this page for the list of required scopes.
- AUTHORIZATION_FAILEDHTTP 401User does not have sufficient privilege to delete roles 
 Resolution: The user does not have the permission to delete. Contact your system administrator.
- NO_PERMISSIONHTTP 403Permission denied to delete 
 Resolution: The user does not have permission to delete roles data. Contact your system administrator.
- INVALID_URL_PATTERNHTTP 404The request URL is incorrect. 
 Resolution: Specify a valid request URL. Refer to the Request URL section at the beginning of this page for more details.
- INTERNAL_ERRORHTTP 500Internal Server Error 
 Resolution: Unexpected and unhandled exception in Server. Contact support team.
Sample Response
Copied{
    "code": "SUCCESS",
    "details": {
        "id": "4150868000005435016"
    },
    "message": "Role Deleted",
    "status": "success"
}