Assign Forward Restriction to Policy

Purpose

This API assigns a specific forward 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 a forward 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 changeMailForwardPolicyID.
  • orgMailRestrictionID* long
    • This parameter is the unique identifier assigned to a forward restriction.
    • This parameter can be retrieved from the Get All Forward 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": "changeMailForwardPolicyID",
  "orgMailRestrictionID": 1003505000048951000
}

Sample Response

Copied{
  "status": {
    "code": 200,
    "description": "success"
  }
}