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 deletes a Mail Exchanger (MX) record. For more information about MX record settings, read our Email Routing Configuration documentation.
Important:
When you disable the DNS role, the system disables this function.
The mail exchanger's priority value. If multiple MX entries match the exchanger value, the system uses this parameter to find the correct entry.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Email/delete_mx
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Email/delete_mx
- 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/delete_mx?domain=example.com&exchanger=mail.example.com&priority=15'{ "apiversion": 3, "func": "delete_mx", "module": "Email", "result": { "data": { … }, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
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 } }