Get domain DNS records

Return the customer-facing DNS state for one owned domain. {id} is the public dom_... ID returned by GET /api/v2/domains data[].id; to find that ID by domain name, call GET /api/v2/domains?name=example.com. records[] contains customer-editable DNS records; managed backing records for redirects, parking,…

Read full description Hide full description

Return the customer-facing DNS state for one owned domain. {id} is the public dom_... ID returned by GET /api/v2/domains data[].id; to find that ID by domain name, call GET /api/v2/domains?name=example.com. records[] contains customer-editable DNS records; managed backing records for redirects, parking, and email forwarding are intentionally omitted. Proxy-capable records include a compact actions.canChangeProxy gate when the API can tell whether CDN proxying may be changed. actions.canManageRootMxRecords tells clients when email forwarding prevents custom root MX records. Use filters such as type=MX, type=ALIAS, or name=mail when an agent only needs a targeted subset of records. zone.recordCount is the number of records in this response; zone.totalRecordCount, zone.liveRecordLimit, and zone.exceedsLiveRecordLimit let clients warn when the full zone is above the live DNS publication limit even if the current response is filtered.

Domains & DNS DNS

Authentication

Required API scopes: read:dnsread: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. Get it from GET /api/v2/domains `data[].id`. Do not invent this value; use the exact ID returned by the referenced API response.

Query Parameters

includeSystem boolean

Set to `true` to include system SOA and zone-apex NS records. They are hidden by default for normal record-management flows.

type string · enum

Return only records of this DNS type, for example `MX` to inspect mail routing without loading every record. SPF policies are returned as `TXT` records.

A
AAAA
CNAME
ALIAS
MX
TXT
NS
SRV
CAA
TLSA
name string · Example: mail

Return only records with this owner name. Use `@` for the zone root, a relative label such as `mail`, or a full name such as `mail.example.com`.

Headers

Accept Example
Content-Type Example

Responses

200 Domain DNS state.
zone objectnull required
records array<object> required
records[].id string required · Example: drr_01hxa3b4c5d6e7f8g9h0j1k2m3
records[].type string · enum required · Example: TXT
A
AAAA
CNAME
ALIAS
MX
TXT
SRV
CAA
NS
TLSA
records[].name string required · Example: _dmarc.example.com
records[].value string required · Example: v=DMARC1; p=none; rua=mailto:dmarc@example.com
records[].ttl integer required · Example: 3600
records[].priority integernull · Example: 10

Present only for MX and SRV records. `null` means the upstream DNS provider omitted priority for a priority-capable record.

records[].weight integernull · Example: 5

Present only for SRV records. `null` means the upstream DNS provider omitted weight for an SRV record.

records[].port integernull · Example: 5060

Present only for SRV records. `null` means the upstream DNS provider omitted port for an SRV record.

records[].proxied boolean · Example: false

Present only on A, AAAA, and CNAME records when the CDN proxy state is known. Omitted for record types that cannot be proxied.

records[].proxyReason string · Example: Mail server records cannot be proxied because MX records depend on them.

Present only when this proxy-capable record has a customer-facing reason that prevents changing the proxy state.

records[].actions object

Compact action gates for state that belongs to this DNS record. Present only when a server-side action gate is relevant to the record.

records[].actions.canChangeProxy object required
records[].actions.canChangeProxy.allowed boolean required · Example: true
records[].actions.canChangeProxy.reason stringnull required · Example: null
records[].actions.canChangeProxy.code stringnull · Example: pending_order

Machine-readable reason code when an action is blocked.

records[].warnings array<object>

Present on DNS write responses when the request succeeded but the resulting same-name record set deserves review, for example multiple A records, remaining AAAA records, or multiple MX records.

records[].warnings[].code string · enum required · Example: same_name_address_records
same_name_address_records
same_name_ipv6_records
same_name_mx_records
records[].warnings[].severity string · enum required · Example: warning
warning
records[].warnings[].message string required · Example: There are now multiple A records for example.com. This is valid for some setups, but if...
records[].warnings[].records array<object> required

Existing records that triggered the warning. The newly created or updated record is the main response object.

records[].warnings[].records[].id string required · Example: drr_01hxa3b4c5d6e7f8g9h0j1k2m4
records[].warnings[].records[].type string required · Example: A
records[].warnings[].records[].name string required · Example: example.com
records[].warnings[].records[].value string required · Example: 198.51.100.25
records[].warnings[].records[].priority integernull · Example: 10
nameservers array<string> required · Example: ["primary.ns.hostup.se","secondary.ns.hostup.se"]
actions object required
actions.canManageRecords object required
actions.canManageRecords.allowed boolean required · Example: true
actions.canManageRecords.reason stringnull required · Example: null
actions.canManageRecords.code stringnull · Example: pending_order

Machine-readable reason code when an action is blocked.

actions.canManageRootMxRecords object

False when email forwarding owns root-domain mail delivery; disable email forwarding before adding custom root MX records.

actions.canManageRootMxRecords.allowed boolean required · Example: true
actions.canManageRootMxRecords.reason stringnull required · Example: null
actions.canManageRootMxRecords.code stringnull · Example: pending_order

Machine-readable reason code when an action is blocked.

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}/dns
For AI assistants
View as Markdown
cURL
curl -X GET "https://cloud.hostup.se/api/v2/domains/dom_01hxa3b4c5d6e7f8g9h0j1k2m3/dns" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"
Response
{
  "zone": {
    "id": "zone_01hxa3b4c5d6e7f8g9h0j1k2m3",
    "name": "example.com",
    "status": "active",
    "recordCount": 1,
    "totalRecordCount": 306,
    "liveRecordLimit": 200,
    "exceedsLiveRecordLimit": true,
    "warnings": [
      {
        "code": "dns_live_record_limit_exceeded",
        "severity": "warning",
        "message": "This zone has 306 DNS records. Only the first 200 records can be published live; records beyond that limit may be saved but not resolve."
      }
    ]
  },
  "records": [
    {
      "id": "drr_01hxa3b4c5d6e7f8g9h0j1k2m4",
      "type": "A",
      "name": "www.example.com",
      "value": "203.0.113.10",
      "ttl": 3600,
      "proxied": false,
      "actions": {
        "canChangeProxy": {
          "allowed": true,
          "reason": null
        }
      }
    }
  ],
  "nameservers": [
    "primary.ns.hostup.se",
    "secondary.ns.hostup.se"
  ],
  "actions": {
    "canManageRecords": {
      "allowed": true,
      "reason": null
    },
    "canManageRootMxRecords": {
      "allowed": false,
      "reason": "Email forwarding is enabled. Disable email forwarding before adding custom root MX records."
    }
  }
}