Get DNS records

Return DNS records for one DNS zone, plus a small zone summary. This is the canonical list-records endpoint for v2 DNS; GET /api/v2/dns-zones/{id}/records is also available as an alias for tools that model records as a subresource. Use records[].id when updating or deleting a record. The response example is…

Read full description Hide full description

Return DNS records for one DNS zone, plus a small zone summary. This is the canonical list-records endpoint for v2 DNS; GET /api/v2/dns-zones/{id}/records is also available as an alias for tools that model records as a subresource. Use records[].id when updating or deleting a record. The response example is representative; the response schema lists conditional fields such as MX priority, SRV weight/port, CDN proxy action gates, and write warnings. SPF policies are TXT records whose value starts with v=spf1. The response does not return authoritative domain nameservers; use GET /api/v2/domains/{id}/nameservers for that. 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 scope: read:dns

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

Context

Path Parameters

id string required Example: zone_01hxa3b4c5d6e7f8g9h0j1k2m3

Public DNS zone ID. Get it from GET /api/v2/dns-zones `data[].id`. Do not invent this value; use the exact ID returned by the referenced API response.

Query Parameters

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 DNS zone details.
zone object required
zone.id string required · Example: zone_01hxa3b4c5d6e7f8g9h0j1k2m3
zone.name string required · Example: example.com
zone.status string · enum required · Example: active
active
disabled
pending
error
unknown
zone.recordCount integer required · Example: 3

Number of DNS records returned in `records[]` after query filters are applied.

zone.totalRecordCount integer · Example: 306

Total customer-relevant DNS records in the zone before type/name filters.

zone.liveRecordLimit integer · Example: 200

Maximum number of customer-relevant DNS records that can be published live at once.

zone.exceedsLiveRecordLimit boolean · Example: true

True when `totalRecordCount` is greater than `liveRecordLimit`; clients should show a warning before the user adds or troubleshoots records.

zone.warnings array<object>

Zone-level warnings. Present when `exceedsLiveRecordLimit` is true.

zone.warnings[].code string · enum required
dns_live_record_limit_exceeded
zone.warnings[].severity string · enum required
warning
zone.warnings[].message string required · Example: This zone has 306 DNS records. Only the first 200 records can be published live; record...
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
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/dns-zones/{id}
For AI assistants
View as Markdown
cURL
curl -X GET "https://cloud.hostup.se/api/v2/dns-zones/zone_01hxa3b4c5d6e7f8g9h0j1k2m3" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"
Response
{
  "zone": {
    "id": "zone_01hxa3b4c5d6e7f8g9h0j1k2m3",
    "name": "example.com",
    "status": "active",
    "recordCount": 4,
    "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_01hxa3b4c5d6e7f8g9h0j1k2m3",
      "type": "A",
      "name": "example.com",
      "value": "192.0.2.10",
      "ttl": 3600,
      "proxied": false,
      "actions": {
        "canChangeProxy": {
          "allowed": true,
          "reason": null
        }
      }
    },
    {
      "id": "drr_01hxa3b4c5d6e7f8g9h0j1k2m4",
      "type": "MX",
      "name": "example.com",
      "value": "mail.example.com",
      "ttl": 3600,
      "priority": 10
    },
    {
      "id": "drr_01hxa3b4c5d6e7f8g9h0j1k2m5",
      "type": "TXT",
      "name": "_dmarc.example.com",
      "value": "v=DMARC1; p=none; rua=mailto:dmarc@example.com",
      "ttl": 3600
    },
    {
      "id": "drr_01hxa3b4c5d6e7f8g9h0j1k2m6",
      "type": "SRV",
      "name": "_sip._tcp.example.com",
      "value": "sip.example.com",
      "ttl": 3600,
      "priority": 10,
      "weight": 5,
      "port": 5060
    }
  ]
}