Page tree
Skip to end of metadata
Go to start of metadata

 

Description

This function lists the status of a cPanel's mail account's mailboxes.

Examples


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/get_mailbox_status_list?api.version=1&account=user@example.com
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/get_mailbox_status_list?api.version=1&account=user@example.com
 Command Line
whmapi1 get_mailbox_status_list account=user@example.com

Notes:

  • You must URI-encode values.
  • For more information and additional output options, read our Guide to WHM API 1 documentation or run the whmapi1 --help command. 
  • We introduced this functionality in cPanel & WHM version 11.52.0.8.

 Output (JSON)
{ 
   "metadata":{  
      "command":"get_mailbox_status_list",
      "version":1,
      "result":1,
      "reason":"OK"
   },
   "data":{  
	 "mailboxes":[
       { 
           "guid":"1234560f0c58d158c92a000044f0d230",
           "messages":"0",
           "mailbox":"INBOX.marla_singer@example_com",
           "vsize":"0"
        },
        { 
           "guid":"11234560f0c58d158c92a000044f0d23",
           "messages":"0",
           "mailbox":"INBOX.angel_face@example_com",
           "vsize":"0"
        },
        { 
           "guid":"111234560f0c58d158c92a000044f0d2",
           "messages":"0",
           "mailbox":"INBOX.tyler_durden@example_com",
           "vsize":"0"
        },
        { 
           "guid":"1111234560f0c58d158c92a000044f0d",
           "messages":"0",
           "mailbox":"INBOX.Trash",
           "vsize":"0"
        },
        { 
           "guid":"11111234560f0c58d158c92a000044f0",
           "messages":"0",
           "mailbox":"INBOX.narrator@example_com",
           "vsize":"0"
        },
        { 
           "guid":"111111234560f0c58d158c92a000044f",
           "messages":"0",
           "mailbox":"INBOX",
           "vsize":"0"
        },
        { 
           "guid":"1111111234560f0c58d158c92a000004",
           "messages":"0",
           "mailbox":"INBOX.Sent",
           "vsize":"0"
        },
        { 
           "guid":"11111111234560f0c58d158c92a00000",
           "messages":"0",
           "mailbox":"INBOX.Drafts",
           "vsize":"0"
        },
        { 
           "guid":"111111111234560f0c58d158c92a0000",
           "messages":"0",
           "mailbox":"INBOX.robert_paulsen@example_com",
           "vsize":"0"
        }
     ]
   }
}
 Output (XML)
	<metadata>
		<command>get_mailbox_status_list</command>
		<version>1</version>
		<result>1</result>
		<reason>OK</reason>
	</metadata>
	<data>
		<mailboxes>
			<guid>1234560f0c58d158c92a000044f0d230</guid>
			<messages>0</messages>
			<mailbox>INBOX.marla_singer@example_com</mailbox>
			<vsize>0</vsize>
		</mailboxes>
		<mailboxes>
			<guid>11234560f0c58d158c92a000044f0d23</guid>
			<messages>0</messages>
			<mailbox>INBOX.angel_face@example_com</mailbox>
			<vsize>0</vsize>
		</mailboxes>
		<mailboxes>
			<guid>111234560f0c58d158c92a000044f0d2</guid>
			<messages>0</messages>
			<mailbox>INBOX.tyler_durden@example_com</mailbox>
			<vsize>0</vsize>
		</mailboxes>
		<mailboxes>
			<guid>1111234560f0c58d158c92a000044f0d</guid>
			<messages>0</messages>
			<mailbox>INBOX.Trash</mailbox>
			<vsize>0</vsize>
		</mailboxes>
		<mailboxes>
			<guid>11111234560f0c58d158c92a000044f0</guid>
			<messages>0</messages>
			<mailbox>INBOX.narrator@example_com</mailbox>
			<vsize>0</vsize>
		</mailboxes>
		<mailboxes>
			<guid>111111234560f0c58d158c92a000044f</guid>
			<messages>0</messages>
			<mailbox>INBOX</mailbox>
			<vsize>0</vsize>
		</mailboxes>
		<mailboxes>
			<guid>1111111234560f0c58d158c92a000004</guid>
			<messages>0</messages>
			<mailbox>INBOX.Sent</mailbox>
			<vsize>0</vsize>
		</mailboxes>
		<mailboxes>
			<guid>11111111234560f0c58d158c92a00000</guid>
			<messages>0</messages>
			<mailbox>INBOX.Drafts</mailbox>
			<vsize>0</vsize>
		</mailboxes>
		<mailboxes>
			<guid>111111111234560f0c58d158c92a0000</guid>
			<messages>0</messages>
			<mailbox>INBOX.robert_paulsen@example_com</mailbox>
			<vsize>0</vsize>
		</mailboxes>
	</data>

Note:

Use WHM's API Shell interface (Home >> Development >> API Shell) to directly test WHM API calls.

     

Parameters

ParameterTypeDescriptionPossible valuesExample
accountstring

Required

The email account's name.

  • A valid email account that exists on the server.
  • The cPanel user's account name.

    Note:

    _mainaccount is an alias that represents the cPanel user's mailbox (For example, _mainaccount@example.com represents the example mailbox).

  • user@example.com
  • example
  • _mainaccount@example.com

Returns

ReturnTypeDescriptionPossible valuesExample
mailboxesarray

An array that contains information about the mailbox's contents.

Note:

The mailbox name is the return's name.

This array contains the guid, mailbox, messages, and vsize returns. 

guid

string

The mailbox GUID.

This value returns in the mailboxes array.

A valid alpha-numeric 32-byte GUID that the account owns.
1234560f0c58d158c92a000044f0d230

mailbox

string
The mailbox name.
 This value returns in the mailboxes array.

A valid mailbox folder on the server that the user owns.

INBOX.marla_singer@example_com

messages

integer

The total number of messages in the mailbox.

The function returns this value in the mailboxes array.

A valid integer.0

vsize

integer

The total virtual size of the mailbox's contents, computed with CRLF line terminators.

The function returns this value in the mailboxes array.

A valid integer that represents the virtual size of the mailbox, in bytes.0