PUT - Regenerate DKIM Public Key

Purpose

This API is used to regenerate a DKIM public key for a particular domain.

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 name of the domain, for which you want to regenerate a DKIM public key.

Request Body (JSON object)

 

* - 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":"regenerateDkimKey",
"dkimId":"100000500000888000"    
}'

Sample Response

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