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 all outbound email messages held in the mail queue for the specified email account.
Important:
When you disable the Receive Mail role, the system disables this function.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Email/delete_held_messages
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Email/delete_held_messages
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
uapi --output=jsonpretty \
--user=username \
Email \
delete_held_messages \
email='username@example.com'{ "apiversion": 3, "func": "delete_held_messages", "module": "Email", "result": { "data": 0, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
Request
This function deletes an email address.
Important:
When you disable the Receive Mail role, the system disables this function.
The email account username or address.
- A valid email account username. For example,
userif the email address isuser@example.com. - A valid email address.
The email account's domain. For example, example.com if the email address is user@example.com.
Whether to remove the mail account's home mail directory. If you do not specify a value, the function removes the mail account's home directory.
passwd— Preserve the mail account's home directory.- Any other value — Remove the mail account's home directory.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Email/delete_pop
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Email/delete_pop
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
uapi --output=jsonpretty \
--user=username \
Email \
delete_pop \
email='user@domain.com'{ "apiversion": 3, "func": "delete_pop", "module": "Email", "result": { "data": null, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
Request
This function sends an email account's client settings to an email address.
Important:
When you disable the Receive Mail role, the system disables this function.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Email/dispatch_client_settings
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Email/dispatch_client_settings
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
uapi --output=jsonpretty \
--user=username \
Email \
dispatch_client_settings \
to='user@example.com' \
account='username'{ "apiversion": 3, "func": "dispatch_client_settings", "module": "Email", "result": { "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }