Assign Access Restriction to Policy
Purpose
This API is used to assign a specific access restriction to a particular policy.
OAuth Scope
Use the scope
ZohoMail.organization.policy.ALL (or) ZohoMail.organization.policy.UPDATE
to generate the Authtoken.
ALL - Provides full access to policy.
UPDATE - Assign an access restriction to a policy.
Request URL
Method: PUT
https://mail.zoho.com/api/organization/{zoid}/policy/{policyId}
Path Parameters
- zoid* long
- This parameter denotes the unique Zoho Organization Identifier for the organization.
- This parameter can be retrieved from the Get Organization Details API.
- policyId* long
- This parameter is the unique identifier for the policy.
- This parameter can be retrieved from the Get All Policies API.
Request Body (JSON Object)
- mode* string
- This parameter specifies the type of operation that is to be performed.
- Provide the value as changeAccessRestrictionID.
- orgMailRestrictionID* long
- This parameter is the unique identifier assigned to an access restriction.
- This parameter can be retrieved from the Get All Access Restrictions API.
* - Mandatory parameter
Response Codes
Refer here for the response codes and their meaning.
Sample Request
Copiedcurl "https://mail.zoho.com/api/organization/12345678/policy/45677777" \
-X PUT \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization:Zoho-oauthtoken ***"
-d '{
"mode": "changeAccessRestrictionID",
"orgMailRestrictionID": 1003505000048951000
}
Sample Response
Copied{
"status": {
"code": 200,
"description": "success"
}
}