UAPI accesses the cPanel interface's features. Use this API to access and modify cPanel account data and settings.
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/
https://{host}:{port}/execute/
The domain for which to enable DKIM records on the DNS server.
Note:
To enable multiple domain DKIM records, duplicate or increment the parameter. For example, to perform this for three domains, you could:
- Use the
domainparameter multiple times. - Use the
domain,domain-1, anddomain-2parameters.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/EmailAuth/enable_dkim
- A server running cPanel.
https://cpanel-server.tld:2083/execute/EmailAuth/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/cpanel.openapi/EmailAuth/enable_dkim?domain=string'{ "apiversion": 3, "func": "enable_dkim", "module": "EmailAuth", "result": { "data": [ … ], "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
Request
This function confirms the validity of a DomainKeys Identified Mail (DKIM) key for one or more domains.
Notes:
- 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 domains, duplicate the parameter name. For example, use the domain=example.com, domain=example2.com, and domain=example3.com parameters.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/EmailAuth/ensure_dkim_keys_exist
- A server running cPanel.
https://cpanel-server.tld:2083/execute/EmailAuth/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/cpanel.openapi/EmailAuth/ensure_dkim_keys_exist?domain=string'{ "apiversion": 3, "func": "ensure_dkim_keys_exist", "module": "EmailAuth", "result": { "data": [ … ], "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
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 domain for which to retrieve the installed DKIM private key.
Note:
To retrieve multiple domain DKIM keys, duplicate the parameter name. For example, use the domain=example.com, domain=example2.com, and domain=example3.com parameters.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/EmailAuth/fetch_dkim_private_keys
- A server running cPanel.
https://cpanel-server.tld:2083/execute/EmailAuth/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/cpanel.openapi/EmailAuth/fetch_dkim_private_keys?domain=string'{ "apiversion": 3, "func": "fetch_dkim_private_keys", "module": "EmailAuth", "result": { "data": [ … ], "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }