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/
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Email/release_outgoing
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Email/release_outgoing
- 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/release_outgoing?email=username%40example.com'{ "apiversion": 3, "func": "release_outgoing", "module": "Email", "result": { "data": null, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
Request
This function configures a default (catchall) email address.
Important:
When you disable the Mail Receive role, the system disables this function.
The method to use to handle unroutable mail.
fwd— Forward messages to thefwdemailparameter’s address.fail— Bounce messages back to the sender, and include thefailmsgsparameter’s failure message.blackhole— Send messages to the/dev/null/directory. This method does not generate a failure notice.pipe— Pipe mail to thepipefwdparameter’s application. This parameter requires the File Storage role.
The domain whose default email behavior you want to configure.
Note:
This parameter defaults to the cPanel account’s main domain.
The failure message for the message’s sender.
Note:
Use this parameter if you used the fail method for the fwdopt parameter.
The email address to which the system forwards messages.
Note:
Use this parameter if you used the fwd method for the fwdopt parameter.
The application to which the system pipes messages.
Note:
Use this parameter if you used the pipe method for the fwdopt parameter.
Important:
This parameter requires the File Storage role.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Email/set_default_address
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Email/set_default_address
- 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/set_default_address?fwdopt=fwd&domain=example.com&failmsgs=Failure+echos+loud.+That+address+does+not+exist.+Softly+I+regret.+-+an+email+failure+haiku&fwdemail=admin%40example.com&pipefwd=mailscript.pl'{ "apiversion": 3, "func": "set_default_address", "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.
The domain, IPv4, or IPv6 address to redirect the domain value's emails to.
Note:
- To add multiple MX hosts, increment the parameter. For example, use the
mx_host,mx_host-1, andmx_host-2parameters. - For multiple MX hosts, you must include its corresponding
domainvalue.
A domain name.
A domain name.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Email/set_manual_mx_redirects
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Email/set_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/set_manual_mx_redirects?domain=example.com&mx_host=string'{ "apiversion": 3, "func": "set_manual_mx_redirects", "module": "Email", "result": { "data": { … }, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }