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 lists Mail Exchanger (MX) records.
Important:
When you disable the DNS role, the system disables this function.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Email/list_mxs
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Email/list_mxs
- 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/Email/list_mxs?domain=example.com'{ "apiversion": 3, "func": "list_mxs", "module": "Email", "result": { "data": [ … ], "errors": null, "messages": null, "metadata": { … }, "status": 1, "warnings": null } }
The DMARC record to apply to the requested domains.
Note:
Visit the following link for more information about the DMARC record specification: https://dmarc.org/resources/specification/
The domain for which to apply the DMARC record.
Note:
To enable multiple domain DMARC records, duplicate or increment the parameter. For example, to enable DMARC records for three domains, perform either of the following actions:
- Use the
domainparameter three times. - Use the
domain,domain-1, anddomain-2parameters.
If you do not include this argument, the system applies the DMARC record to all the user's domains.
You cannot use this function to edit temporary domains' DMARC records.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/EmailAuth/apply_dmarc
- A server running cPanel.
https://cpanel-server.tld:2083/execute/EmailAuth/apply_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/apply_dmarc?policy=v%3DDMARC1%3Bp%3Dreject%3Bpct%3D100%3Brua%3Dmailto%3Apostmaster%40example.com&domain=string'{ "apiversion": 3, "func": "apply_dmarc", "module": "EmailAuth", "result": { "data": [ … ], "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
The domain for which to remove DKIM records on the DNS server.
Note:
To remove multiple domain DKIM 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/disable_dkim
- A server running cPanel.
https://cpanel-server.tld:2083/execute/EmailAuth/disable_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/disable_dkim?domain=string'{ "apiversion": 3, "func": "disable_dkim", "module": "EmailAuth", "result": { "data": [ … ], "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }