List email accounts
GET /api/v2/shared-hosting/{accountId}/email-accounts
Lists the mailboxes on the web hosting account with the storage each one uses. It also says how many more the plan allows. Check actions.canCreate before you create a mailbox. Mailbox domains are returned in readable Unicode form. An account on Hostup’s previous hosting platform returns 409 account_not_eligible_cpanel. Support moves such an account to cPanel at no charge.
Authentication: An API key with the scope read:hosting. About keys and scopes
Request
Path parameters
accountIdstringrequiredThe hosting account ID (
acct_…).Query parameters
domainstringOnly mailboxes on this domain. Unicode IDN and punycode spellings are both accepted.
quota and actions still count the whole account.Example
curl "https://cloud.hostup.se/api/v2/shared-hosting/acct_01hxa3b4c5d6e7f8g9h0j1k2m3/email-accounts" \ -H "Authorization: Bearer $HOSTUP_API_KEY"Responses
200 Mailboxes on the account.
{ "emailAccounts": [ { "id": "mail_01hxa3b4c5d6e7f8g9h0j1k2m3", "email": "hello@example.com", "domain": "example.com", "quota": { "usedGb": 0.125, "limitGb": 32, "usagePercent": 0.39, "exceeded": false } } ], "quota": { "used": 1, "limit": 10, "remaining": 9 }, "actions": { "canCreate": { "allowed": true, "reason": null } }}Response fields
emailAccountsarray of objectidstringEmail account ID (
mail_…). Paths accept it in place of the address.emailstringFull email address. IDNs are in Unicode form.
domainstringMailbox domain. IDNs are in Unicode form.
quotaobjectStorage use against the mailbox quota.
usedGbnumber or nullStorage used in GB.
null when the server gave no usable reading.limitGbnumber or nullMailbox quota in GB.
null when the mailbox has no limit.usagePercentnumber or nullShare of the quota used, 0–100.
null without a limit or a reading.exceededbooleantrue when the storage used is above the quota.quotaobjectMailboxes used and allowed by the plan.
usedintegerMailboxes on the account.
limitinteger or nullMailboxes the plan allows.
null when there is no limit or it could not be read.remaininginteger or nullMailboxes left.
null when limit is null.actionsobjectcanCreateobjectWhether another mailbox can be created, with the reason when it cannot.
allowedbooleanreasonstring or nullcodestring or nullA machine-readable code for why the action is blocked.
Errors
Errors are Problem Details with a stable code. Branch on the code, not on the text.
| 400 | The domain filter is not a valid domain name. |
| 401 | Unauthorized. Authentication is required. |
| 403 | forbidden. With requiredScopes in the body, the key lacks read:hosting. Without it, the hosting account is not active. |
| 404 | Not found. The resource does not exist or is not owned by the caller. |
| 409 | The account is on Hostup’s previous hosting platform. Mailboxes cannot be listed there through the API. |
| 429 | Rate limited. Retry after the limit resets. 429 responses include Retry-After seconds plus X-RateLimit-* headers. |
| 500 | Internal error. Retry later or contact support if the issue persists. |
| 502 | The mailboxes could not be loaded from the server. Try again. |