Return domain's DKIM private key

This function returns a domain's installed DKIM private key in Privacy-Enhanced Mail (PEM) format.

Warning:

We strongly recommend that you protect your private key. If others obtain your private DKIM key, they could sign emails and impersonate you as a sender.

SecurityBasicAuth
Request
query Parameters
domain
required
string

The queried domain.

Note:

To retrieve multiple domain DKIM keys, increment the parameter name. For example, use the domain-1=example-1.com, domain-2=example-2.com, and domain-3=example-3.com parameters.

Examples:
domain=domain=example-1.com&domain=example-2.com&domain=example-3.com
domain=example.com
Responses
200

HTTP Request was successful.

Response Schema: application/json
object
object
get/fetch_dkim_private_keys
Request samples
whmapi1 --output=jsonpretty \
  fetch_dkim_private_keys \
  domain='example.com'
Response samples
application/json
{
  • "data": {
    • "payload": [
      • {
        • "domain": "example.com",
        • "pem": "-----BEGIN RSA PRIVATE KEY-----\nMIICLDCCAdKgAwIBAgIBADAKBggqhkjOPQQDAjB9MQswCQYDVQQGEwJCRTEPMA0G\nA1UEChMGR251VExTMSUwIwYDVQQLExxHbnVUTFMgY2VydGlmaWNhdGUgYXV0aG9y\naXR5MQ8wDQYDVQQIEwZMZXV2ZW4xJTAjBgNVBAMTHEdudVRMUyBjZXJ0aWZpY2F0\nZSBhdXRob3JpdHkwHhcNMTEwNTIzMjAzODIxWhcNMTIxMjIyMDc0MTUxWjB9MQsw\nCQYDVQQGEwJCRTEPMA0GA1UEChMGR251VExTMSUwIwYDVQQLExxHbnVUTFMgY2Vy\ndGlmaWNhdGUgYXV0aG9yaXR5MQ8wDQYDVQQIEwZMZXV2ZW4xJTAjBgNVBAMTHEdu\ndVRMUyBjZXJ0aWZpY2F0ZSBhdXRob3JpdHkwWTATBgcqhkjOPQIBBggqhkjOPQMB\nBwNCAARS2I0jiuNn14Y2sSALCX3IybqiIJUvxUpj+oNfzngvj/Niyv2394BWnW4X\nuQ4RTEiywK87WRcWMGgJB5kX/t2no0MwQTAPBgNVHRMBAf8EBTADAQH/MA8GA1Ud\nDwEB/wQFAwMHBgAwHQYDVR0OBBYEFPC0gf6YEr+1KLlkQAPLzB9mTigDMAoGCCqG\nSM49BAMCA0gAMEUCIDGuwD1KPyG+hRf88MeyMQcqOFZD0TbVleF+UsAGQ4enAiEA\nl4wOuDwKQa+upc8GftXE2C//4mKANBC6It01gUaTIpo==\n-----END RSA PRIVATE KEY-----\n"
        }
      ]
    },
  • "metadata": {
    • "command": "fetch_dkim_private_keys",
    • "reason": "OK",
    • "result": 1,
    • "version": 1
    }
}