PUT- Update DMARC Fail Option

Purpose

This API is used to update the action taken when an incoming email results in an DMARC fail during email validation. You can choose to move such emails to quarantine, spam, or allow them.

OAuth Scope

Use the scope

ZohoMail.organization.spam.ALL (or) ZohoMail.organization.spam.UPDATE

to generate the Authtoken.

ALL - Grants full access to spam settings.

UPDATE - Grants edit access to spam settings.

Request URL

Method: PUT

 https://mail.zoho.com/api/organization/{zoid}/antispam/options

Path Parameters

  • zoid* long
    • This parameter specifies the unique Zoho Organization Identifier for the organization.
    • This parameter can be fetched from Get Organization Details API.

Request Body(JSON Object)

  • mode* string
    • This parameter represents the type of operation that is to be performed.
    • Provide the value as updateDMARCFailOption.
  • option* string
    • This parameter specifies the action to take when an email fails the DMARC check.
    • Allowed values:
      • moveToQuarantine – Sends the email to quarantine.
      • moveToSpam – Sends the email to spam.
      • allowMail -Allows the email through despite DMARC failure.

 

* - Mandatory parameter

Response Codes

Refer here for the response codes and their meaning.

1. Sample Request

Copiedcurl "https://mail.zoho.com/api/organization/1234567890/antispam/options" \
-X PUT \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Zoho-oauthtoken ********" \
-d '{
  "mode": "updateDMARCFailOption",
  "option": "moveToQuarantine"
}'

2. Sample Request

Copiedcurl "https://mail.zoho.com/api/organization/1234567890/antispam/options" \
-X PUT \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Zoho-oauthtoken ********" \
-d '{
  "mode": "updateDMARCFailOption",
  "option": "moveToSpam"
}'

3. Sample Request

Copiedcurl "https://mail.zoho.com/api/organization/1234567890/antispam/options" \
-X PUT \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Zoho-oauthtoken ********" \
-d '{
  "mode": "updateDMARCFailOption",
  "option": "allowMail"
}'

Sample Response

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