Add Allowed IP Address to Access Restriction
Purpose
This API is used to add the allowed IP address range to an existing access restriction.
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 - Updates an access restriction.
Request URL
Method: PUT
https://mail.zoho.com/api/organization/{zoid}/policy/accessRestriction/{accessRestrictionId}
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.
- accessRestrictionId* long
- This parameter is the unique identifier assigned to an access restriction.
- This parameter can be retrieved from the Get All Access Restrictions API.
Request Body (JSON Object)
- mode* string
- This parameter specifies the type of operation that is to be performed.
- Provide the value as addIPRestriction.
- ipRestriction* JSON Object
- This parameter must be passed as an object with the details of the allowed IP address range. Here
- startIP is the start of the allowed IP range.
- endIP is the end of the allowed IP range.
- description is the information provided about the added IP address.
- This parameter must be passed as an object with the details of the allowed IP address range. Here
* - Mandatory parameter
Response Codes
Refer here for the response codes and their meaning.
Sample Request
Copiedcurl "https://mail.zoho.com/api/organization/12345678/accessRestriction/123455555" \
-X PUT \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization:Zoho-oauthtoken *************" \
-d '{
"mode": "addIPRestriction",
"ipRestriction": [
{
"startIP": "1.1.1.1",
"endIP": "255.1.1.1",
"description": "Test IP Restriction"
}
]
}Sample Response
Copied{
"status": {
"code": 200,
"description": "success"
}
}