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 terminates all IMAP and POP3 connections for a cPanel account.
Note:
This function ends connections for every email address, which includes the default address.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Email/terminate_mailbox_sessions
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Email/terminate_mailbox_sessions
- 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/terminate_mailbox_sessions{ "metadata": { "command": "terminate_mailbox_sessions", "reason": "OK", "result": 1, "version": 1 } }
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Email/trace_delivery
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Email/trace_delivery
- 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/trace_delivery?recipient=username%40example.com'{ "apiversion": 3, "func": "trace_delivery", "module": "Email", "result": { "data": { … }, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
Request
This function lets you create a manual Exim mail exchanger (MX) redirect for a domain. An MX redirection lets you bypass the domain's MX lookup via the Domain Name System (DNS). This function adds the manual redirect entries to the /etc/manualmx file.
Note:
To remove a domain's manual MX redirection, use the UAPI Email unset_manual_mx_redirect function.
The domain for which to add a manual MX redirect entry.
Note:
- To add multiple domain entries, increment the parameter. For example, use the
domain,domain-1, anddomain-2parameters. - For multiple domains, you must include its corresponding
mx_hostvalue.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Email/unset_manual_mx_redirects
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Email/unset_manual_mx_redirects
- 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/unset_manual_mx_redirects?domain=example.com'{ "apiversion": 3, "func": "unset_manual_mx_redirects", "module": "Email", "result": { "data": { … }, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }