Skip to content

Get the DNS setup of a hosting domain

GET /api/v2/shared-hosting/{accountId}/domains/dns-setup

Shows where the website and email of a domain on the web hosting account point today. It also shows whether its DNS can be pointed at the account. Read it before POST /api/v2/shared-hosting/{accountId}/domains/dns-setup and send its revision back with the choice. classification.recommendedPreference is the choice that keeps the current services working. The domain must be the main domain, an addon domain or a parked domain of the account. The account must be active. A domain that is not on the account returns 503 domain_not_attached. Retrying does not help then.

Authentication: An API key with the scopes read:hosting and read:dns and console:services. About keys and scopes

Request

Path parameters

accountIdstringrequired
The hosting account ID (acct_…).

Query parameters

domainstringrequired
Domain on the hosting account, without protocol or path.

Example

GET /api/v2/shared-hosting/{accountId}/domains/dns-setup
curl "https://cloud.hostup.se/api/v2/shared-hosting/acct_01hxa3b4c5d6e7f8g9h0j1k2m3/domains/dns-setup?domain=example.com" \
-H "Authorization: Bearer $HOSTUP_API_KEY"

Responses

200 Where the domain’s website and email point and what the setup can do.

Response 200
{
"domain": "example.com",
"hostingName": "example.se",
"currentMailAddresses": [],
"enabled": true,
"delegation": "hostup",
"hostingIp": "192.0.2.10",
"classification": {
"website": "parking",
"mail": "missing",
"apex": [
"192.0.2.80"
],
"www": [
"192.0.2.80"
],
"mx": [],
"requiresChoice": false,
"recommendedPreference": "full"
},
"revision": "5f8c1d2e9a7b4c3d6e1f0a9b8c7d6e5f4a3b2c1d0e9f8a7b6c5d4e3f2a1b0c9d",
"pendingChoice": true,
"publication": null,
"canApply": true
}
Response fields
domainstring
The domain checked.
hostingNamestring
The hosting account’s main domain.
currentMailAddressesarray of string
IP addresses of the domain’s current MX hosts, when those hosts are names in this zone. Missing when enabled is false.
enabledboolean
false when this hosting account does not offer the setup. POST then returns 409 dns_not_enabled.
delegationstring
hostup: the domain uses Hostup’s nameservers. external: other nameservers. unknown: the lookup failed. A choice can be saved while the delegation is external. It takes effect when the nameservers move to Hostup. One of hostup, external, unknown.
hostingIpstring or null
IPv4 address the website records point at after the setup. null when it is not known.
classificationobject | null
What the domain’s records point at now. null when the setup is not offered (enabled: false), when the domain has no DNS zone at Hostup, or when the zone could not be read.
websitestring
hosting: this account. parking: Hostup’s parking page. stale: a Hostup server that no longer hosts the domain. missing: no website record. elsewhere: another provider. redirect: a domain redirect is active. One of hosting, parking, stale, missing, elsewhere, redirect.
mailstring
hosting: this account. missing: no MX record. elsewhere: another provider. disabled: a null MX record says the domain takes no mail. One of hosting, missing, elsewhere, disabled.
apexarray of string
Current A, AAAA, CNAME and ALIAS values of the bare domain.
wwwarray of string
Current A, AAAA, CNAME and ALIAS values of www.
mxarray of string
Current MX targets. . stands for a null MX record.
requiresChoiceboolean
true when the website or email point elsewhere. Pointing them at the hosting account would replace them.
recommendedPreferencestring
The choice that keeps the current services working. One of full, email-only, website-only, none.
revisionstring or null
Fingerprint of the current records and nameservers. Send it in POST. null when classification is null or the nameservers could not be looked up.
pendingChoiceboolean
true while the domain waits for a setup choice.
publicationstring or null
pending while an applied setup is not in the zone yet. done on the first read after it is, null after that. null also when no setup was applied in the last hour. One of pending, done.
canApplyboolean
true when the setup is offered, the domain’s DNS zone at Hostup was read and the hosting address is known. POST with a choice other than none also needs a revision. While revision is null the POST returns 503.

Errors

Errors are Problem Details with a stable code. Branch on the code, not on the text.

400domain is missing or not a valid domain name.
401Unauthorized. Authentication is required.
403The API key lacks a required scope or the hosting account is not active.
404Not found. The resource does not exist or is not owned by the caller.
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.
503The read failed. code is domain_not_attached when the domain is not the main, an addon or a parked domain of the account; retrying does not help then. It is dns_read_unavailable when the DNS could not be checked; try again later.