Get domain email forwarding
GET /api/v2/domains/{id}/email-forwarding
Returns the email forwarding set up on the domain: whether it is on, the forwarding rules, the recipient addresses and the catch-all. This forwarding needs the domain’s DNS at Hostup. A domain on a web hosting account normally uses the forwarders on that account instead (/api/v2/shared-hosting/{accountId}/email-forwarders). integrationStatus is enabled (rules work), disabled (turn it on with PATCH) or unavailable (see reason). dnsActivation shows whether the DNS zone is ready. While it is activating, each read asks for the activation check again. It usually becomes active within minutes. The answer can come from a cached copy that is refreshed in the background. Send refresh=true to read the current state.
Authentication: An API key with the scopes read:dns and read:domains. About keys and scopes
Request
Path parameters
idstringrequireddom_…).Query parameters
refreshstringtrue to skip the cached copy and read the current state. Default false. One of true, false. Default "false".Example
curl "https://cloud.hostup.se/api/v2/domains/dom_01hxa3b4c5d6e7f8g9h0j1k2m3/email-forwarding" \ -H "Authorization: Bearer $HOSTUP_API_KEY"Responses
200 The domain’s email forwarding state.
{ "enabled": false, "integrationStatus": "disabled", "reason": "Email forwarding is not enabled for this domain. Enable it to start receiving rules.", "maxRules": 200, "ruleCount": 0, "rules": [], "destinations": [], "catchAll": null, "existingMxRecords": [ { "type": "MX", "value": "mail.example.com", "priority": 10 } ], "dnsActivation": { "status": "active", "reason": null, "checkedAt": "2026-08-22T12:00:00.000Z" }, "actions": { "canCreateNewRule": { "allowed": false, "reason": "Email forwarding is not enabled for this domain. Enable it to start receiving rules." }, "canSetCatchAll": { "allowed": false, "reason": "Email forwarding is not enabled for this domain. Enable it to start receiving rules." } }}Response fields
enabledbooleanintegrationStatusstringenabled, disabled, unavailable.reasonstring or nullmaxRulesintegerruleCountintegerrulesarray of objectidstringemailstringdestinationstringisEnabledbooleannamestring or nullpriorityintegerdestinationsarray of objectidstringemailstringverificationStatusstringverified, pending, unverified.createdAtstring or nullverifiedAtstring or nullcatchAllobject | nullactionstringforward, drop, disabled.destinationstring or nullexistingMxRecordsarray of objecttypestringMX.valuestringpriorityinteger or nulldnsActivationobjectactive: forwarding can be turned on now. activating: the domain already uses our nameservers and the zone is being activated. Reading this resource starts the check. Poll until active, usually a few minutes. not_delegated: the domain uses other nameservers. unavailable: there is no zone at Hostup or its state could not be read.statusstringactive, activating, not_delegated, unavailable.reasonstring or nullcheckedAtstringactionsobjectcanCreateNewRuleobjectallowedbooleanreasonstring or nullcodestring or nullcanSetCatchAllobjectallowedbooleanreasonstring or nullcodestring or nullErrors
Errors are Problem Details with a stable code. Branch on the code, not on the text.
| 400 | Invalid request. The response body is an RFC 7807 Problem Details document. |
| 401 | Unauthorized. Authentication is required. |
| 403 | Forbidden. The caller lacks a required scope or does not own the resource. |
| 404 | Not found. The resource does not exist or is not owned by the caller; code names the missing resource: domain_not_found, email_forwarding_not_found. |
| 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. |