Create Email Restriction

Purpose

This API is used for creating an email restriction.

OAuth Scope

Use the scope

ZohoMail.organization.policy.ALL (or) ZohoMail.organization.policy.CREATE 

to generate the Authtoken.

ALL - Provides full access to policy.

CREATE - Enables the creation of an email restriction.

Request URL 

Method: POST

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.

 

Request Body (JSON Object)

  • restrictionName* string
    • Specify a name for the email restriction being created.

 

* - 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" \
-X POST \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization:Zoho-oauthtoken ***" 
-d '{
    "restrictionName":"Email Restriction"
}'

Sample Response

Copied{
    "status": {
        "code": 200,
        "description": "success"
    },
    "data": {
        "restrictionName": "Email Restriction",
        "restrictionID": "1003505000088483001"
    }
}