Return cPanel account mailboxes status by name

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.

SecurityBasicAuth
Request
query Parameters
required
string or string

An email account or cPanel account's username.

Note:

_mainaccount is an alias representing the cPanel user's mailbox (for example, `_mainaccount@example.com represents the example mailbox.)

Example: account=user@example.com
Responses
200

HTTP Request was successful.

Response Schema: application/json
object
object
get/get_mailbox_status
Request samples
whmapi1 --output=jsonpretty \
  get_mailbox_status \
  account='user@example.com'
Response samples
application/json
{
  • "data": {
    • "INBOX": {
      • "guid": "111111234560f0c58d158c92a000044f",
      • "messages": 42000,
      • "vsize": 42
      },
    • "INBOX.Drafts": {
      • "guid": "11111111234560f0c58d158c92a00000",
      • "messages": 5,
      • "vsize": 522
      },
    • "INBOX.Sent": {
      • "guid": "1111111234560f0c58d158c92a000004",
      • "messages": 1,
      • "vsize": 56
      },
    • "INBOX.Trash": {
      • "guid": "1111234560f0c58d158c92a000044f0d",
      • "messages": 2001,
      • "vsize": 5643
      },
    • "INBOX.angel_face@example_com": {
      • "guid": "11234560f0c58d158c92a000044f0d23",
      • "messages": 3,
      • "vsize": 1524
      },
    • "INBOX.marla_singer@example_com": {
      • "guid": "1234560f0c58d158c92a000044f0d230",
      • "messages": 5,
      • "vsize": 100
      },
    • "INBOX.narrator@example_com": {
      • "guid": "11111234560f0c58d158c92a000044f0",
      • "messages": 0,
      • "vsize": 0
      },
    • "INBOX.robert_paulsen@example_com": {
      • "guid": "111111111234560f0c58d158c92a0001",
      • "messages": 2,
      • "vsize": 2222
      },
    • "INBOX.tyler_durden@example_com": {
      • "guid": "111234560f0c58d158c92a000044f0d2",
      • "messages": 55,
      • "vsize": 12244
      }
    },
  • "metadata": {
    • "command": "get_mailbox_status",
    • "reason": "OK",
    • "result": 1,
    • "version": 1
    }
}