Get domain nameservers
GET /api/v2/domains/{id}/nameservers
Shows the domain’s nameservers and whether they can be changed now. Check actions.canChangeNameservers.allowed before you call POST /api/v2/domains/{id}/nameservers. A change is blocked during a transfer and while the domain is pending, suspended, expired or no longer managed here. On a .se or .nu domain, registrarLock.requiresRegistryUnlockFlow is always true and registrarLock.unlockAction is always set. The lock only blocks a change when registrarLock.enabled is also true. Then request an unlock with unlockAction first. dnssecAutoWillBeBlocked is true when a nameserver change now would pause automatic DNSSEC for a cooldown period. Hostup’s own nameservers are primary.ns.hostup.se and secondary.ns.hostup.se.
Authentication: An API key with the scope read:domains. About keys and scopes
Request
Path parameters
idstringrequireddom_…).Example
curl "https://cloud.hostup.se/api/v2/domains/dom_01hxa3b4c5d6e7f8g9h0j1k2m3/nameservers" \ -H "Authorization: Bearer $HOSTUP_API_KEY"Responses
200 The nameservers, the domain lock and whether the nameservers can be changed.
{ "nameservers": [ "primary.ns.hostup.se", "secondary.ns.hostup.se" ], "registrarLock": { "enabled": false, "requiresRegistryUnlockFlow": true, "unlockAction": { "method": "POST", "href": "/api/v2/domains/dom_01hxa3b4c5d6e7f8g9h0j1k2m3/actions/request-unlock" } }, "actions": { "canChangeNameservers": { "allowed": true, "reason": null } }, "dnssecAutoWillBeBlocked": true}Response fields
nameserversarray of stringregistrarLockobjectenabledboolean or nullrequiresRegistryUnlockFlowbooleanPOST /api/v2/domains/{id}/actions/request-unlock. The lock only blocks a nameserver change when enabled is also true.unlockActionobject | nullenabled is true.methodstringPOST.hrefstringactionsobjectcanChangeNameserversobjectallowedbooleanreasonstring or nullcodestring or nulldnssecAutoWillBeBlockedbooleanErrors
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 is domain_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. |
| 502 | Upstream failure. A dependent provider request failed; the Problem Details code is upstream_failed. Retry later or contact support if the issue persists. |