Get the default address of a hosted domain
GET /api/v2/shared-hosting/{accountId}/email-default-address
Shows what happens to mail sent to an address on the domain that has no mailbox and no forwarder. action says it. main_account_inbox keeps the mail in the hosting account’s own inbox without a bounce. That inbox is not one of the mailboxes in GET /api/v2/shared-hosting/{accountId}/email-accounts. forward sends the mail to destinations. reject bounces it to the sender with rejectMessage. discard deletes it without a bounce. pipe hands it to a program on the account. The domain must be on the account (main, addon, parked or subdomain).
Authentication: An API key with the scopes read:hosting and console:services. About keys and scopes
Request
Path parameters
accountIdstringrequiredacct_…).Query parameters
domainstringrequiredExample
curl "https://cloud.hostup.se/api/v2/shared-hosting/acct_01hxa3b4c5d6e7f8g9h0j1k2m3/email-default-address?domain=example.com" \ -H "Authorization: Bearer $HOSTUP_API_KEY"Responses
200 The default address setting of the domain.
{ "domain": "example.com", "action": "main_account_inbox", "destinations": [], "rejectMessage": null}Response fields
domainstringactionstringmain_account_inbox: kept in the hosting account’s own inbox, no bounce. forward: sent to destinations. reject: refused with a bounce. discard: deleted, no bounce. pipe: handed to a program on the account. unknown: the setting could not be read or is none of these. One of main_account_inbox, forward, reject, discard, pipe, unknown.destinationsarray of stringaction is forward. Empty otherwise.rejectMessagestring or nullaction is reject. null for other actions or when no text is set.Errors
Errors are Problem Details with a stable code. Branch on the code, not on the text.
| 400 | domain is missing or not a valid domain name. |
| 401 | Unauthorized. Authentication is required. |
| 403 | The 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. The default address cannot be read 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. |