try the call Email::listpopswithdisk
Code:
<apicall>
<module>Email</module>
<function>listpopswithdisk</function>
<version>2</version>
<description>List email accounts associated with a particular domain. This function will also list quota and disk usage information.</description>
<param>
<name>domain</name>
<value>string (optional)</value>
<description>The domain whose email accounts you wish to view.</description>
</param>
<param>
<name>nearquotaonly</name>
<value>boolean (optional)</value>
<description>Passing '1' to this parameter allows you to only view accounts that have used 95% or more of their allotted disk space.</description>
</param>
<param>
<name>no_validate</name>
<value>boolean (optional)</value>
<description>Passing '1' to this parameter will cause the function to only read data from your '.cpanel/email_accounts.yaml' file. This parameter is 'off' by default, causing the function to check the passwd file, quota files, etc. Theoretically, each of these files should contain identical values.</description>
</param>
<param>
<name>regex</name>
<value>Regular Expressions (optional)</value>
<description>Regular expressions allow you to filter results based on a set of criteria.</description>
</param>
<output>Returns a list of hashes, 1 per email account. Note: Certain output values can potentially come out in a format other than the one indicated. This is a fallback in case a function fails. In the event that a function fails, check the cPanel error_log for details.
$VAR1 = [
{
'txtdiskquota' => An integer value that contains the disk quota in megabytes.,
'diskquota' => An integer or string value that contains the disk quota in megabytes. This value is affected by the account's locale (language). (e.g. '250' or 'unlimited'),
'diskusedpercent' => An integer value that contains the percentage of disk space used.,
'diskused' => A floating point value that contains the disk space used in megabytes. (e.g. 108.83),
'humandiskquota' => A string value that contains the disk quota with the descriptor. (e.g. '250 MB'),
'_diskused' => An integer value that contains the disk space used in bytes.,
'login' => A string value that contains the login name of the account. This value contains the domain. (e.g. user@example.com),
'email' => A string value that contains the email address of the account.,
'domain' => A string value that contains the domain name you have queried. (e.g. example.com),
'user' => A string value that contains the username that corresponds to the domain.,
'humandiskused' => A string value that contains the amount of disk space used and the signifier. (e.g. '109.39 MB' or 'none'),
'diskusedpercent20' => An integer value that contains the percentage of disk space used.,
'_diskquota' => An integer value that contains the disk quota in bytes.
},
</output>
</apicall>