PUT - Add/ Update Organization Spam Listing Info
Purpose
The API adds or updates the Organization's Spam Listing Info. The type of listing can be Organization Whitelist/ Blacklist Domains/ Email Addresses/ IP addresses.
OAuth Scope
Use the scope ZohoMail.organization.spam.ALL (or) ZohoMail.organization.spam.UPDATE to generate the Authtoken.
ALL - Full access to all spam details
UPDATE - Add/ update spam details
Request URL
https://mail.zoho.com/api/organization/<zoid>/antispam/data
Path Parameters
- zoidlong, mandatory
- The zoid of the organization that can be fetched using the GET Organization details API.
Request Body (JSON Object)
- spamCategorystring, mandatory
- Use this parameter to specify the type of Spam Listing that needs to be added/ updated.
- Supported values are:
- whiteListEmail
- spamEmail
- rejectEmail
- quarantineEmail
- trustedEmail
- whiteListDomain
- spamDomain
- rejectDomain
- quarantineDomain
- trustedDomain
- whiteListIP
- spamIP
- rejectIP
- quarantineIP
- spamTLD
- rejectTLD
- quarantineTLD
- recipientSpamEmail
- recipientRejectEmail
- recipientQuarantineEmail
- ValueArray of strings, mandatory
- The values such as emails ids, domains, and IP addresses need to be given as value for this parameter.
- Supported format: ["Value 1", "Value 2", ......, "Value n"]
Response Codes
Refer here for the response codes and their meaning.
Sample Request
Copiedhttps://mail.zoho.com/api/organization/987654321/antispam/data
Request Body (JSON Object)
Copied{
"spamCategory":"whiteListEmail",
"whiteListEmail":[
"mysupply@mysupplydomain.com"
]
}
Sample Response
Copied{
"status": {
"code": 200,
"description": "success"
}
}