PUT - Add DKIM Details to a Domain

Purpose

This API is used to configure DKIM details for a particular domain added to Zoho Mail.  

OAuth Scope

Use the scope

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

to generate the Authtoken.

ALL - Grants full access to domains.

UPDATE - Grants update access to domains.

Request URL

Method: PUT

https://mail.zoho.com/api/organization/{zoid}/domains/{domainName}

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.
  • domainName* string
    • This parameter specifies the domain for which DKIM details are configured.

Request Body (JSON object)

  • mode* string
    • This parameter represents the type of operation that is to be performed.
    • Provide the value as addDkimDetail.
  • selector* string
    • This parameter is an attribute for the DKIM Signature.
    • Allowed values: Any string of your convenience.
  • hashType string
    • This parameter specifies the type of hash generated.
    • The default value is sha256.
  • isDefault boolean
    • This parameter specifies whether this DKIM details added needs to be set as the default or not.
    • Allowed values:
      • true -  This DKIM detail will be set as the default key.
      • false - This DKIM detail will not be set as the default key.
    • The default value is false.

 

* - Mandatory parameter

Response Codes

Refer here for the response codes and their meaning.

Sample Request

Copiedcurl " https://mail.zoho.com/api/organization/1234567890/domains/zylker.com" \
-X PUT \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization:Zoho-oauthtoken *****" \
-d '{  
"mode": "addDkimDetail",
"selector": "dkimselector",
"isDefault": false 
}'

Sample Response

Copied{
 "status": {
 "code": 200,
 "description": "success"
 },
 "data": {
 "isDefault": false,
 "isVerified": false,
 "selector": "dkimselector",
 "publicKey": "v=DKIM1; k=rsa; p=MIG/MA0GCSqGSIb3DQEBAQUAA4GtADCBqQKBoQC6oEhT775myv/gdT0BuBNbQVNRNwbTQXwD80jkaaO86vrLylVRuFQqYgmSsSdbDvxKSYNKzZ4PsNHs36NvIhFp/+E0Nv5kjD/mT68UV4qZPd2ZGc07iiUb+bUtLUsI6pnE2Z+ln6VUAelzpid2l8BEI43u+HQzy0PTYdZj0RFe6eVgpajKLdCqlTAy7BrcdhI7M7A2ZJJTHqaBZbEqk5O1AgMBAAE=",
 "hashType": "sha256",
 "domainId": "100000500000888999",
 "dkimId": "100000500000888000"
 }
}