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 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 } }
The domain for which to install an SPF record on the DNS server.
Note:
To install multiple SPF records, 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/install_spf_records
- A server running cPanel.
https://cpanel-server.tld:2083/execute/EmailAuth/install_spf_records
- 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_spf_records?domain=string&record=%22v%3Dspf1+ip4%3A10.0.0.1+%252Ba+%252Bmx+%252Bip4%3A10.0.0.2+%252Bip4%3A10.0.0.3+-all%22'{ "apiversion": 3, "func": "install_spf_records", "module": "EmailAuth", "result": { "data": [ … ], "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
The domain from which to remove the DMARC record.
Note:
If you do not include this argument, the system will remove all DMARC records from all domains owned by the user.
To remove multiple domain DMARC records, duplicate the parameter name. For example, use the domain=example.com, domain=example2.com, and domain=example3.com parameters.
You cannot remove DMARC records on temporary domains.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/EmailAuth/remove_dmarc
- A server running cPanel.
https://cpanel-server.tld:2083/execute/EmailAuth/remove_dmarc
- 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/remove_dmarc?domain=string'{ "apiversion": 3, "func": "remove_dmarc", "module": "EmailAuth", "result": { "data": [ … ], "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }