POST - Add Allowed IPs
Purpose
This API is used to add an Allowed IP range for your organization and assign them to the users based on their role or the entire organization.
OAuth Scope
Use the scope ZohoMail.organization.accounts.ALL (or) ZohoMail.organization.accounts.CREATE to generate the Authtoken.
ALL - Full access to all allowed APIs
CREATE - Add Allowed IPs range
Request URL
Method : POST
https://mail.zoho.com/api/organization/<zoid>/allowedIps
Path Parameters
- zoid*long
- The zoid of the organization that can be fetched using the GET Organization details API.
Request Parameters
- fromIpRange*string
- The fromIpRange denotes the start of the IP address range that's allowed for your users to access their accounts.
- toIpRange*string
- The toIpRange denotes the end of the IP address range that's allowed for your users to access their accounts.
- roleId*int
- The roleId helps you to assign the allowed IP range to different users in your organization.
- The allowed values are:
- 0 - The allowed IPs will be assigned to the Users in the organization.
- 1 - The allowed IPs will be assigned to the Admins of the organization.
- 2 - The allowed IPs will be assigned to the Super Admin of the organization.
- -1 - The allowed IPs will be assigned to all the members of the organization.
* - Mandatory parameter
Response Codes
Refer here for the response codes and their meaning.
Sample Request URL
Copiedhttps://mail.zoho.com/api/organization/12345678/allowedIps
Sample Body Input
Copied{
"allowedIps":[
{
"fromIpRange":"0.0.0.0",
"toIpRange":"255.255.255.255",
"roleId":0
}
]
}
Sample Response
Copied{
"status":{
"code":200,
"description":"success"
},
"data":{
"allowedIps":[
{
"ip":[
{
"isipinRange":"true",
"user":[
{
"ipid":987654321,
"toip":"255.255.255.255",
"fromip":"0.0.0.0"
}
]
}
]
}
],
"failedList":[
{
}
]
}
}