Change an email account quota
PUT /api/v2/shared-hosting/{accountId}/email-accounts/{address}/quota
Sets the storage quota of a mailbox in MB. 0 means no limit. The call does not check that the mailbox exists first. The response reads the mailbox back and returns its quota and current use. When that read fails, quota shows the requested limit and usedGb is null. An account on Hostup’s previous hosting platform returns 409 account_not_eligible_cpanel.
Authentication: An API key with the scopes write:hosting and console:services. About keys and scopes
Request
Path parameters
accountIdstringrequiredThe hosting account ID (
acct_…).addressstringrequiredThe email address (
hello@example.com) or the email account ID (mail_…). Unicode IDN and punycode spellings are both accepted.Body
quotaMbnumberrequiredMailbox quota in MB, 0–1048576.
0 means no limit. 0 to 1048576.Example
curl -X PUT "https://cloud.hostup.se/api/v2/shared-hosting/acct_01hxa3b4c5d6e7f8g9h0j1k2m3/email-accounts/hello@example.com/quota" \ -H "Authorization: Bearer $HOSTUP_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "quotaMb": 2048 }'curl -X PUT "https://cloud.hostup.se/api/v2/shared-hosting/acct_01hxa3b4c5d6e7f8g9h0j1k2m3/email-accounts/hello@example.com/quota" \ -H "Authorization: Bearer $HOSTUP_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "quotaMb": 0 }'Responses
200 The quota is changed.
{ "email": "hello@example.com", "quota": { "usedGb": 0.125, "limitGb": 2, "usagePercent": 6.25, "exceeded": false }}Response fields
emailstringThe mailbox address. IDNs are in Unicode form.
quotaobjectStorage use against the new 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.Errors
Errors are Problem Details with a stable code. Branch on the code, not on the text.
| 400 | {address} is invalid or quotaMb is missing or outside 0–1048576. |
| 401 | Unauthorized. Authentication is required. |
| 403 | The mailbox domain is not on this hosting account (domain_not_owned), the API key lacks a required scope or the 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. Mailbox quotas cannot be changed 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 server did not change the quota (upstream_failed). This is also the answer when the domain is on the account but no mailbox has this address. Sending the same request again then fails the same way. Check the address with GET /api/v2/shared-hosting/{accountId}/email-accounts instead. |