PUT- Update DKIM Fail Option

Purpose

This API is used to update the action taken when an incoming email results in an DKIM fail during email validation. You can choose to move such emails to quarantine, reject them (permanently or temporarily), 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 updateDKIMFailOption.
  • option* string
    • This parameter specifies the action to take when an email fails the DKIM check.
    • Allowed values:
      • moveToQuarantine – Sends the email to quarantine.
      • permanentReject – Blocks the email entirely.
      • temporaryReject – Temporarily rejects the email.
      • allowMail -Allows the email through despite DKIM 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": "updateDKIMFailOption",
  "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": "updateDKIMFailOption",
  "option": "permanentReject"
}'

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": "updateDKIMFailOption",
  "option": "temporaryReject"
}'

4. 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": "updateDKIMFailOption",
  "option": "allowMail"
}'

Sample Response

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