List email forwarders
GET /api/v2/shared-hosting/{accountId}/email-forwarders
Lists the email forwarders on the web hosting account, with how many more the plan allows. A forward row lists its destinations. A discard row drops the mail and has no destinations. Forwarding set up on a domain without web hosting is under GET /api/v2/domains/{id}/email-forwarding. On an account on Hostup’s previous hosting platform the list is empty. Creating a forwarder there returns 409 account_not_eligible_cpanel.
Authentication: An API key with the scopes read:hosting and console:services. About keys and scopes
Request
Path parameters
accountIdstringrequiredThe hosting account ID (
acct_…).Query parameters
domainstringOnly forwarders on this domain. Unicode IDN and punycode spellings are both accepted.
Example
curl "https://cloud.hostup.se/api/v2/shared-hosting/acct_01hxa3b4c5d6e7f8g9h0j1k2m3/email-forwarders" \ -H "Authorization: Bearer $HOSTUP_API_KEY"Responses
200 Forwarders on the account.
{ "forwarders": [ { "id": "efwd_01hxa3b4c5d6e7f8g9h0j1k2m3", "email": "info@example.com", "domain": "example.com", "localPart": "info", "action": "forward", "destinations": [ "anna@example.net" ] } ], "quota": { "used": 1, "limit": null, "remaining": null }, "actions": { "canCreate": { "allowed": true, "reason": null } }}Response fields
forwardersarray of objectidstringForwarder ID (
efwd_…). Paths accept it in place of the source address.emailstringSource address. IDNs are in Unicode form.
domainstringSource domain. IDNs are in Unicode form.
localPartstringThe part of the source address before
@.actionstringforward sends the mail to destinations. discard drops it. One of forward, discard.destinationsarray of stringAddresses the mail goes to. Empty for
discard.quotaobjectForwarders used and allowed by the plan.
usedintegerForwarders on the account.
limitinteger or nullForwarders the plan allows.
null when there is no limit or it could not be read.remaininginteger or nullForwarders left.
null when limit is null.actionsobjectcanCreateobjectWhether another forwarder 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 | The API key lacks a required scope or the hosting account is not active. |
| 404 | Not found. The resource does not exist or is not owned by the caller. |
| 409 | Conflict. code is account_suspended, account_not_eligible_cpanel. |
| 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 | Upstream failure. A dependent provider request failed; the Problem Details code is upstream_failed. Retry later or contact support if the issue persists. |