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)

  • mode* string
    • This parameter represents the type of operation that is to be performed.
    • Provide the value as regenerateDkimKey.
  • dkimId* long
    • This parameter specifies the Unique ID of the DKIM value you would like to regenerate.
    • This parameter can be fetched from the Get Domain Details API.

 

* - 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": "dkimselector",
 "publicKey": "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCVXVSFILu0sCArmOb9nk2r4fCsUxHGH56u125hZJJqvmvNNfi/WRsyt6UPmb+hqbQBDurIlCHa5QP8xNC9ozHvLbBuiSo+ROjzUJiCOUBVWKvjvUo77CWWSlcYo00jYKRI9D+AKbBcJPxrzgxgWbrRXDpeq/GbMlQlVV3zLx7TnQIDAQAB",
 "hashType": "sha256",
 "domainId": "1000005000000000000",
 "dkimId": "1000505000000500000"
 }
}