GET - Get All Policies
Purpose
This API is used to retrieve the list of policies created.
OAuth Scope
Use the scope
ZohoMail.organization.policy.ALL (or) ZohoMail.organization.policy.READ
to generate the Authtoken.
ALL - Provides full access to policy.
READ - Retrieve the list of policies.
Request URL
Method: GET
https://mail.zoho.com/api/organization/{zoid}/policy
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.
Query Parameters
- start int
- This parameter specifies the start sequence number of the policies to be retrieved.
- The default value is 0.
- limit int
- This parameter specifies the number of policies to be retrieved from the start value mentioned.
- The default value is 50.
- searchKey string
- This parameter specifies the particular data to search for.
* - Mandatory parameter
Response Codes
Refer here for the response codes and their meaning.
Sample Request
Copiedcurl "https://mail.zoho.com/api/organization/12345678/policy?limit=10&start=0&searchKey=business" \
-X GET \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization:Zoho-oauthtoken ***"
Sample Response
Copied{
{
"status": {
"code": 200,
"description": "success"
},
"data": [
{
"externalImap": true,
"policyName": "business",
"zoid": 12345678,
"usersCount": "0",
"incomingMaxMailRate": 100,
"shareMailBox": {
"restricted": false,
"value": true
},
"junkCleanup": {
"restricted": false,
"value": 30
},
"contactRestriction": {
"org": true,
"personal": true,
"group": true
},
"strictTLS": {
"isInHerited": false,
"tlsType": 0
},
"incomingMaxMailSizePerMail": 40960,
"policyID": "1003505000089962560",
"groupCount": "0",
"popSetting": {
"restricted": false,
"value": false
},
"smartFilter": {
"restricted": false,
"value": false
},
"hugeAttachment": {
"value": 1024
}
}
]
}