GET - Get All Email Restrictions
Purpose
This API is used to retrieve details of all the email restrictions 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 email restrictions.
Request URL
Method: GET
https://mail.zoho.com/api/organization/{zoid}/policy/mailRestriction
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 restrictions to be retrieved.
- The default value is 0.
- limit int
- This parameter specifies the number of restrictions to be retrieved from the start value mentioned.
- The default value is 10.
- 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/mailRestriction?limit=10&start=0" \
-X GET \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization:Zoho-oauthtoken ***"
Sample Response
Copied{
"status": {
"code": 200,
"description": "success"
},
"data": [
{
"incomingDomainRestrictionStatus": "noRestriction",
"incomingAttachmentRestrictionStatus": "noRestriction",
"restrictionName": "noRestriction",
"policyCount": "1",
"incomingEmailRestrictionStatus": "noRestriction",
"outgoingSubjectRestrictionStatus": "noRestriction",
"incomingSubjectRestrictionStatus": "noRestriction",
"outgoingDomainRestrictionStatus": "noRestriction",
"outgoingAttachmentRestrictionStatus": "noRestriction",
"restrictionID": "1003505000077177286",
"zoid": 12345678,
"outgoingEmailRestrictionStatus": "noRestriction"
},
{
"incomingDomainRestrictionStatus": "restrictedDomain",
"incomingAttachmentRestrictionStatus": "noRestriction",
"restrictionName": "Copy All Policy",
"policyCount": "1",
"incomingEmailRestrictionStatus": "noRestriction",
"outgoingSubjectRestrictionStatus": "noRestriction",
"incomingSubjectRestrictionStatus": "noRestriction",
"outgoingDomainRestrictionStatus": "noRestriction",
"outgoingAttachmentRestrictionStatus": "noRestriction",
"restrictionID": "1003505000077337001",
"zoid": 12345678,
"outgoingEmailRestrictionStatus": "noRestriction"
}
]
}