Get domain nameservers

Return current nameservers plus action gates for changing them. Get {id} from GET /api/v2/domains data[].id. actions.canChangeNameservers.allowed is false during transfer, pending/suspended states, or when a registry-lock unlock flow is required. If registrarLock.unlockAction is non-null, call that action…

Read full description Hide full description

Return current nameservers plus action gates for changing them. Get {id} from GET /api/v2/domains data[].id. actions.canChangeNameservers.allowed is false during transfer, pending/suspended states, or when a registry-lock unlock flow is required. If registrarLock.unlockAction is non-null, call that action before changing nameservers. dnssecAutoWillBeBlocked is the server-composed warning for automatic DNSSEC: when true, a nameserver update will pause DNSSEC automation for the 72-hour cooldown window. HostUp-managed delegation normally uses primary.ns.hostup.se and secondary.ns.hostup.se; when automatic DNSSEC is active on that delegation, callers should prefer /api/v2/domains/{id}/dnssec-auto over manual DS/KEY writes.

Domains & DNS Nameservers

Authentication

Required API scope: read:domains

Use Authorization: Bearer <token> for API keys. Dashboard sessions may also use hostup_session.

Context

Path Parameters

id string required Example: dom_01hxa3b4c5d6e7f8g9h0j1k2m3

Public domain ID from `GET /api/v2/domains` `data[].id`. Do not invent this value; use the exact ID returned by the referenced API response.

Headers

Accept Example
Content-Type Example

Responses

200 Domain nameserver state.
nameservers array<string> · Example: ["primary.ns.hostup.se","secondary.ns.hostup.se"]
registrarLock object
registrarLock.enabled booleannull required · Example: false
registrarLock.requiresRegistryUnlockFlow boolean required · Example: false

True for domains whose lock must be removed through the unlock request flow before nameservers can change.

registrarLock.unlockAction object | null required · Example: null
registrarLock.unlockAction.method string · enum required · Example: POST
POST
registrarLock.unlockAction.href string required · Example: /api/v2/domains/dom_01hxa3b4c5d6e7f8g9h0j1k2m3/actions/request-unlock
actions object
actions.canChangeNameservers object required
actions.canChangeNameservers.allowed boolean required · Example: true
actions.canChangeNameservers.reason stringnull required · Example: null
actions.canChangeNameservers.code stringnull · Example: pending_order

Machine-readable reason code when an action is blocked.

dnssecAutoWillBeBlocked boolean · Example: false

True when changing nameservers now will pause automatic DNSSEC management for the cooldown window.

400 Invalid request. The response body is an RFC 7807 Problem Details document.
type string · Example: https://developer.hostup.se/errors/invalid_request
title string · Example: Validation failed
status integer · Example: 400
detail string · Example: The request body failed validation.
code string · Example: invalid_request

Stable machine-readable code. Branch on this field, not on `detail`.

instance string · Example: /api/v2/orders
requestId string · Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3
timestamp string · Example: 2026-04-27T12:34:56.000Z
errors array<object>

Field-level validation errors when `code` is `invalid_request`.

errors[].pointer string required · Example: /items/0/eppCode
errors[].detail string required · Example: `eppCode` is required for this transfer.
errors[].code string required · Example: missing_required
extensions object
401 Unauthorized. Authentication is required.
type string · Example: https://developer.hostup.se/errors/invalid_request
title string · Example: Validation failed
status integer · Example: 400
detail string · Example: The request body failed validation.
code string · Example: invalid_request

Stable machine-readable code. Branch on this field, not on `detail`.

instance string · Example: /api/v2/orders
requestId string · Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3
timestamp string · Example: 2026-04-27T12:34:56.000Z
errors array<object>

Field-level validation errors when `code` is `invalid_request`.

errors[].pointer string required · Example: /items/0/eppCode
errors[].detail string required · Example: `eppCode` is required for this transfer.
errors[].code string required · Example: missing_required
extensions object
403 Forbidden. The caller lacks a required scope or does not own the resource.
type string · Example: https://developer.hostup.se/errors/invalid_request
title string · Example: Validation failed
status integer · Example: 400
detail string · Example: The request body failed validation.
code string · Example: invalid_request

Stable machine-readable code. Branch on this field, not on `detail`.

instance string · Example: /api/v2/orders
requestId string · Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3
timestamp string · Example: 2026-04-27T12:34:56.000Z
errors array<object>

Field-level validation errors when `code` is `invalid_request`.

errors[].pointer string required · Example: /items/0/eppCode
errors[].detail string required · Example: `eppCode` is required for this transfer.
errors[].code string required · Example: missing_required
extensions object
404 Not found. The resource does not exist or is not owned by the caller.
type string · Example: https://developer.hostup.se/errors/invalid_request
title string · Example: Validation failed
status integer · Example: 400
detail string · Example: The request body failed validation.
code string · Example: invalid_request

Stable machine-readable code. Branch on this field, not on `detail`.

instance string · Example: /api/v2/orders
requestId string · Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3
timestamp string · Example: 2026-04-27T12:34:56.000Z
errors array<object>

Field-level validation errors when `code` is `invalid_request`.

errors[].pointer string required · Example: /items/0/eppCode
errors[].detail string required · Example: `eppCode` is required for this transfer.
errors[].code string required · Example: missing_required
extensions object
429 Rate limited. Retry after the limit resets. 429 responses include `Retry-After` seconds plus `X-RateLimit-*` headers.
type string · Example: https://developer.hostup.se/errors/invalid_request
title string · Example: Validation failed
status integer · Example: 400
detail string · Example: The request body failed validation.
code string · Example: invalid_request

Stable machine-readable code. Branch on this field, not on `detail`.

instance string · Example: /api/v2/orders
requestId string · Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3
timestamp string · Example: 2026-04-27T12:34:56.000Z
errors array<object>

Field-level validation errors when `code` is `invalid_request`.

errors[].pointer string required · Example: /items/0/eppCode
errors[].detail string required · Example: `eppCode` is required for this transfer.
errors[].code string required · Example: missing_required
extensions object
500 Internal error. Retry later or contact support if the issue persists.
type string · Example: https://developer.hostup.se/errors/invalid_request
title string · Example: Validation failed
status integer · Example: 400
detail string · Example: The request body failed validation.
code string · Example: invalid_request

Stable machine-readable code. Branch on this field, not on `detail`.

instance string · Example: /api/v2/orders
requestId string · Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3
timestamp string · Example: 2026-04-27T12:34:56.000Z
errors array<object>

Field-level validation errors when `code` is `invalid_request`.

errors[].pointer string required · Example: /items/0/eppCode
errors[].detail string required · Example: `eppCode` is required for this transfer.
errors[].code string required · Example: missing_required
extensions object
GET https://cloud.hostup.se/api/v2/domains/{id}/nameservers
For AI assistants
View as Markdown
cURL
curl -X GET "https://cloud.hostup.se/api/v2/domains/dom_01hxa3b4c5d6e7f8g9h0j1k2m3/nameservers" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"
Response
{
  "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
}