WHM API.
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/
https://{host}:{port}/json-api/
Request
This function lists the status of a cPanel's mail account's mailboxes.
Important:
When you disable the Receive Mail role, the system disables this function.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/get_mailbox_status
- A server running WHM.
https://whm-server.tld:2087/json-api/get_mailbox_status
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
whmapi1 --output=jsonpretty \
get_mailbox_status \
account='user@example.com'HTTP Request was successful.
{ "data": { "INBOX": { … }, "INBOX.Drafts": { … }, "INBOX.Sent": { … }, "INBOX.Trash": { … }, "INBOX.angel_face@example_com": { … }, "INBOX.marla_singer@example_com": { … }, "INBOX.narrator@example_com": { … }, "INBOX.robert_paulsen@example_com": { … }, "INBOX.tyler_durden@example_com": { … } }, "metadata": { "command": "get_mailbox_status", "reason": "OK", "result": 1, "version": 1 } }
Request
This function lists the status of a cPanel's mail account's mailboxes.
Important:
When you disable the Receive Mail role, the system disables this function.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/get_mailbox_status_list
- A server running WHM.
https://whm-server.tld:2087/json-api/get_mailbox_status_list
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
whmapi1 --output=jsonpretty \
get_mailbox_status_list \
account='user@example.com'{ "data": { "mailboxes": [ … ] }, "metadata": { "command": "get_mailbox_status_list", "reason": "OK", "result": 1, "version": 1 } }
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/get_unique_recipient_count_per_sender_for_user
- A server running WHM.
https://whm-server.tld:2087/json-api/get_unique_recipient_count_per_sender_for_user
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
whmapi1 --output=jsonpretty \
get_unique_recipient_count_per_sender_for_user \
user='username' \
start_time='1550872800' \
end_time='1550923200'{ "data": { "payload": [ … ] }, "metadata": { "command": "get_unique_recipient_count_per_sender_for_user", "reason": "OK", "result": 1, "version": 1 } }