Update domain nameservers

POST /api/v2/domains/{id}/nameservers

Replace authoritative nameservers for one active domain.

Get {id} from GET /api/v2/domains data[].id and read GET /api/v2/domains/{id}/nameservers first; call this endpoint only when actions.canChangeNameservers.allowed is true.

HostUp managed nameservers are primary.ns.hostup.se and secondary.ns.hostup.se.

Every accepted change returns HTTP 202 with an operation envelope; poll operation.pollUrl.

HostUp managed nameservers additionally prepare the DNS zone before the registry write.

nsips is optional and aligned by index with nameservers; use it only for in-bailiwick child nameservers such as ns1.example.com when the registry requires glue IPs.

Domains & DNS Nameservers

Authentication

Required API scope: write:domains

Authenticate with an API key in the Authorization: Bearer <token> header.

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

Authorization Bearer <token>
Accept application/json
Content-Type application/json

Body

required
application/json
nameservers array<string> required · Example: ["primary.ns.hostup.se","secondary.ns.hostup.se"]

Between one and ten non-empty nameserver hostnames. Empty entries are ignored before the count is checked. A single nameserver is accepted only for .se/.nu domains pointing at third-party DNS; HostUp-managed nameservers must be sent as a pair, and all other TLDs require at least two.

nsips array<string> · Example: ["192.0.2.53","192.0.2.54"]

Optional glue IPs aligned by array index with nameservers; leave entries empty when no glue IP is needed.

recoveryValues object

Values requested by a previous nameserver_recovery_required response. Send only keys returned in recovery.fields; account fields must be updated in account settings instead.

Responses

200 Nameservers updated synchronously.
updated boolean · Example: true
syncTriggered boolean · Example: false
serviceStatus string · enum · Example: active
active
suspended
terminated
pending
cancelled
expired
fraud
unknown
registryStatus string · enum · Example: pending_propagation

Whether the authoritative parent delegation already matches the requested nameservers.

verified
pending_propagation
registryVerification object
registryVerification.checked boolean required · Example: true

False when the authoritative parent could not be queried.

registryVerification.verified boolean required · Example: false

True when the parent delegation exactly matches the requested nameserver set.

registryVerification.actualNameservers array<string> required · Example: ["ns1.example.net","ns2.example.net"]
202 Nameserver change queued. Poll operation.pollUrl; a registry rejection is reported as a failed job whose error carries the customer-facing reason, and progressDetails.contactRecovery lists any account details the registry requires. A domain lock, an unregistered glue host, or an unavailable parent-delegation check surface the same way through the job instead of as 4xx/503 problems.
operation object
operation.status string · enum required · Example: queued

Operation status. 202 Accepted responses only carry pending, queued, or in_progress; the terminal completed and failed values appear only in 200 OK responses for operations that finished within the request, or when polling pollUrl.

pending
queued
in_progress
completed
failed
operation.jobId string required · Example: job_01hxa3b4c5d6e7f8g9h0j1k2m3
operation.pollUrl string · nullable required · Example: /api/jobs/job_01hxa3b4c5d6e7f8g9h0j1k2m3

URL to poll for progress while the operation is in flight. null when status is already terminal (completed or failed), so there is nothing left to poll.

400 Validation failed. In-bailiwick nameservers can return glue_host_not_registered when the required child host is not registered at the registry.

No response body

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; code is domain_not_found.
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
409 Conflict. code is account_suspended, or a route-specific blocker with its own recovery fields.
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
502 Upstream failure. A dependent provider request failed; the Problem Details code is upstream_failed. 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
POST https://cloud.hostup.se/api/v2/domains/{id}/nameservers
For AI assistants
View as Markdown
cURL
curl -X POST "https://cloud.hostup.se/api/v2/domains/dom_01hxa3b4c5d6e7f8g9h0j1k2m3/nameservers" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "nameservers": [
      "primary.ns.hostup.se",
      "secondary.ns.hostup.se"
    ]
  }'
Response
{
  "updated": true,
  "syncTriggered": false,
  "serviceStatus": "active",
  "registryStatus": "pending_propagation",
  "registryVerification": {
    "checked": true,
    "verified": false,
    "actualNameservers": [
      "ns1.example.net",
      "ns2.example.net"
    ]
  }
}
Request Body Use HostUp managed nameservers
{
  "nameservers": [
    "primary.ns.hostup.se",
    "secondary.ns.hostup.se"
  ]
}