Skip to content

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

accountIdstringrequired
The hosting account ID (acct_…).
addressstringrequired
The email address (hello@example.com) or the email account ID (mail_…). Unicode IDN and punycode spellings are both accepted.

Body

quotaMbnumberrequired
Mailbox quota in MB, 0–1048576. 0 means no limit. 0 to 1048576.

Example

PUT /api/v2/shared-hosting/{accountId}/email-accounts/{address}/quota
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
}'

Responses

200 The quota is changed.

Response 200
{
"email": "hello@example.com",
"quota": {
"usedGb": 0.125,
"limitGb": 2,
"usagePercent": 6.25,
"exceeded": false
}
}
Response fields
emailstring
The mailbox address. IDNs are in Unicode form.
quotaobject
Storage use against the new quota.
usedGbnumber or null
Storage used in GB. null when the server gave no usable reading.
limitGbnumber or null
Mailbox quota in GB. null when the mailbox has no limit.
usagePercentnumber or null
Share of the quota used, 0–100. null without a limit or a reading.
exceededboolean
true 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.
401Unauthorized. Authentication is required.
403The mailbox domain is not on this hosting account (domain_not_owned), the API key lacks a required scope or the account is not active.
404Not found. The resource does not exist or is not owned by the caller.
409The account is on Hostup’s previous hosting platform. Mailbox quotas cannot be changed there through the API.
429Rate limited. Retry after the limit resets. 429 responses include Retry-After seconds plus X-RateLimit-* headers.
500Internal error. Retry later or contact support if the issue persists.
502The 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.