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 retrieves the disk space that an email account uses.
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/get_disk_usage
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Email/get_disk_usage
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
uapi --output=jsonpretty \
--user=username \
Email \
get_disk_usage \
user='user' \
domain='example.com'{ "apiversion": 3, "func": "get_disk_usage", "module": "Email", "result": { "data": { … }, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
Request
This function returns the count of 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/get_held_message_count
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Email/get_held_message_count
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
uapi --output=jsonpretty \
--user=username \
Email \
get_held_message_count{ "apiversion": 3, "func": "get_held_message_count", "module": "Email", "result": { "data": 0, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
Request
This function returns the disk space that the main account uses.
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/get_main_account_disk_usage
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Email/get_main_account_disk_usage
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
uapi --output=jsonpretty \
--user=username \
Email \
get_main_account_disk_usage{ "apiversion": 3, "func": "get_main_account_disk_usage", "module": "Email", "result": { "data": "3076 bytes", "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }