Create Account Restriction

Purpose

This API is used for creating an account 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 account restriction.

Request URL 

Method: POST

https://mail.zoho.com/api/organization/{zoid}}/policy/accountRestriction

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

Sample Response

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