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/
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 } }
Request
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.
Note:
- 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 UAPI
EmailAuth::enable_dkimfunction to update the local DNS server's DNS records.- We recommend that you use the UAPI
EmailAuth::install_dkim_private_keysandEmailAuth::enable_dkim functionsin a batch UAPI call.
- We recommend that you use the UAPI
The domain for which to install a DKIM private key on the local server.
Note:
To install multiple RSA private keys for multiple domains, duplicate the parameter name. For example, use the domain=example.com, domain=example2.com, and domain=example3.com parameters.
An RSA key in Privacy-Enhanced Mail (PEM) format.
Note:
You must provide this parameter for each domain parameter.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/EmailAuth/install_dkim_private_keys
- A server running cPanel.
https://cpanel-server.tld:2083/execute/EmailAuth/install_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/install_dkim_private_keys?domain=string&key=-----BEGIN%2520RSA%2520PRIVATE%2520KEY-----%250aAAAAB3NzaC1yc2EAAAABIwAAAQEA5kSivOqhs0U9ZMN20nxFe27QZ3t0lT2zbH7OSXylKd%250a1rjAjYXGnSXC9j2uaZlemHlptBKVziMJC86ha7Hcj6dVOVrDQ6vF4q34bOCjtKLphQ0IjB%250azVIvqILH9eLJdRaOrS34CmgmPaisrCk5wKVlakygvUfcj3HzaTKS6THyZDGx5shdTpa9lb%250ay8tpOD3JceV7ay4w8r0DipoKPC0OLpvS4EABEeMo9sx8zQEaKv03XygjNCCYtFvxlQQIRG%250alVoL7mPaHSaL3anI05RpNbm%2FPS%2B9BhZg%2BBqNjU4ofHBbfkXk5MiN6M7ieR4Sk5BquccboG%250aF13U5slNgmCEekdt0amw%250a-----END%2520RSA%2520PRIVATE%2520KEY-----%250a'{ "apiversion": 3, "func": "install_dkim_private_keys", "module": "EmailAuth", "result": { "data": [ … ], "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }