Update Profile Permissions
Purpose
To update the permissions of a profile.
Endpoints
Request Details
Request URL
{api-domain}/crm/{version}/settings/profiles/{profile-id}
Where, profile-id is the unique ID of the existing profile you want to update the permission for. Use the Get Profiles API to get this ID.
Header
Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52
Scope
scope=ZohoCRM.settings.profiles.ALL
(or)
scope=ZohoCRM.settings.profiles.UPDATE
Sample Request
Copiedcurl "https://www.zohoapis.com/crm/v4/settings/profiles/3652397000009592005"
-X PUT
-d "@update.json"
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"
Input JSON
- namestring, optional
The name of the profile.
- permissions_detailsJSON Array, mandatory
- id-string, mandatory - The ID of the permission you want to enable or disable for this profile. The permission_details key in the response of Get Profiles API gives you the ID of every permission available for the profile.
- enabled-boolean, mandatory - The boolean key to enable or disable a permission for this profile.
Sample Input
Copied{
"profiles": [
{
"name": "test",
"permissions_details": [
{
"id": "3652397000000026530",
"enabled": true
}
]
}
]
}
Possible Errors
- INVALID_DATAHTTP 400
The profile ID is incorrect.
Resolution: Use the Get Profiles API to get this ID.
Sample Response
Copied{
"profiles": [
{
"code": "SUCCESS",
"details": {
"id": "3652397000009592005"
},
"message": "profile updated successfully",
"status": "success"
}
]
}