WHM API.
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/
https://{host}:{port}/json-api/
The domain for which to enable DKIM records on the DNS server.
Note:
To enable multiple domain DKIM records, duplicate the parameter name. For example, use the domain=example-1.com, domain=example-2.com, and domain=example-3.com parameters.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/enable_dkim
- A server running WHM.
https://whm-server.tld:2087/json-api/enable_dkim
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
'https://api.docs.cpanel.net/_mock/specifications/whm.openapi/enable_dkim?domain=string'{ "data": { "payload": [ … ] }, "metadata": { "command": "enable_dkim", "reason": "OK", "result": 1, "version": 1 } }
Request
This function confirms the validity of a DomainKeys Identified Mail (DKIM) key for one or more domains.
Note:
- If an existing DKIM key does not meet the server's security requirements, the system replaces the existing DKIM key.
- If no DKIM key exists, the system creates a new key for the domain.
The domain for which to confirm a valid DKIM key exists.
Note:
To check the DKIM key validity for multiple domain, duplicate the parameter name. For example, use the domain-1=example.com, domain-2=example2.com, and domain-3=example3.com parameters.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/ensure_dkim_keys_exist
- A server running WHM.
https://whm-server.tld:2087/json-api/ensure_dkim_keys_exist
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
'https://api.docs.cpanel.net/_mock/specifications/whm.openapi/ensure_dkim_keys_exist?domain=string'{ "data": { "payload": [ … ] }, "metadata": { "command": "ensure_dkim_keys_exist", "reason": "OK", "result": 1, "version": 1 } }
Request
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.
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.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/fetch_dkim_private_keys
- A server running WHM.
https://whm-server.tld:2087/json-api/fetch_dkim_private_keys
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
'https://api.docs.cpanel.net/_mock/specifications/whm.openapi/fetch_dkim_private_keys?domain=string'{ "data": { "payload": [ … ] }, "metadata": { "command": "fetch_dkim_private_keys", "reason": "OK", "result": 1, "version": 1 } }