Install existing private key to DKIM record

This function installs existing keys for use in a DomainKeys Identified Mail (DKIM) record. This is useful if you do not want the system to generate keys for DKIM records.

Notes:

  • This function does not update the local DNS server's records.
  • If the local DNS server is authoritative for the domain's DNS records, use the WHM API 1 enable_dkim function to update the local DNS server's DNS records.
  • We recommend that you use the WHM API 1 install_dkim_private_keys and enable_dkim functions in a batch WHM API 1 call.
SecurityBasicAuth
Request
query Parameters
domain
required
string <domain>

The domain for which to install an RSA private key to the local server's DKIM record.

Note:

To install RSA private keys for multiple domains, increment the parameter name. For example, use the domain-1=example-1.comdomain-2=example-2.com, and domain-3=example-3.com parameters.

Examples:
domain=domain-1=example-1.com&domain-2=example-2.com&domain-3=example-3.com
domain=example.com
key
required
string

An RSA key in Privacy-Enhanced Mail (PEM) format.

Note:

  • You must provide this parameter for each domain parameter.
  • To install multiple RSA keys for a domain, increment the parameter name. For example, use the key-1key-2 parameters. examples: single: summary: An RSA key in Privacy-Enhanced Mail (PEM) format. value: key multiple: summary: RSA keys in Privacy-Enhanced Mail (PEM) format. value: key-1=KEYKEYKEY&key-2=KEYKEYKEY
Example: key=AAAAB3NzaC1yc2EAAAABIwAAAQEA5kSivOqhs0U9ZMN20nxFe27QZ3t0lT2zbH7OSXylKd1rjAjYXGnSXC9j2uaZlemHlptBKVziMJC86ha7Hcj6dVOVrDQ6vF4q34bOCjtKLphQ0IjBzVIvqILH9eLJdRaOrS34CmgmPaisrCk5wKVlakygvUfcj3HzaTKS6THyZDGx5shdTpa9lby8tpOD3JceV7ay4w8r0DipoKPC0OLpvS4EABEeMo9sx8zQEaKv03XygjNCCYtFvxlQQIRGlVoL7mPaHSaL3anI05RpNbm/PS+9BhZg+BqNjU4ofHBbfkXk5MiN6M7ieR4Sk5BquccboGF13U5slNgmCEekdt0amw
Responses
200

HTTP Request was successful.

Response Schema: application/json
object
object
get/install_dkim_private_keys
Request samples
whmapi1 --output=jsonpretty \
  install_dkim_private_keys \
  domain='example.com' \
  key='AAAAB3NzaC1yc2EAAAABIwAAAQEA5kSivOqhs0U9ZMN20nxFe27QZ3t0lT2zbH7OSXylKd1rjAjYXGnSXC9j2uaZlemHlptBKVziMJC86ha7Hcj6dVOVrDQ6vF4q34bOCjtKLphQ0IjBzVIvqILH9eLJdRaOrS34CmgmPaisrCk5wKVlakygvUfcj3HzaTKS6THyZDGx5shdTpa9lby8tpOD3JceV7ay4w8r0DipoKPC0OLpvS4EABEeMo9sx8zQEaKv03XygjNCCYtFvxlQQIRGlVoL7mPaHSaL3anI05RpNbm/PS+9BhZg+BqNjU4ofHBbfkXk5MiN6M7ieR4Sk5BquccboGF13U5slNgmCEekdt0amw'
Response samples
application/json
{
  • "data": {
    • "payload": [
      • {
        • "domain": "example.com",
        • "msg": "Installed Keys",
        • "status": 1
        }
      ]
    },
  • "metadata": {
    • "command": "install_dkim_private_keys",
    • "reason": "OK",
    • "result": 1,
    • "version": 1
    }
}