# DNS

Host zones on Pantech DNS and manage their records: one at a time, in batches of up to 1,000, or as BIND zone files.

Source: https://docs.pantechdynamics.com/api/dns

Create a zone, set its four `name_servers` at your domain's registrar, and add records. A zone is `awaiting_delegation` until the registry points at those name servers, then `active`. Writes answer `202` with the record `pending`; it is `active` at every location within about a minute. Reads are served at once. See [Pantech DNS](https://docs.pantechdynamics.com/dns/overview) and [records](https://docs.pantechdynamics.com/dns/records).

Endpoints:

- `GET /public/v1/dns/zones`: List DNS zones
- `GET /public/v1/dns/zones/quote`: Price DNS zones
- `POST /public/v1/dns/zones`: Create a DNS zone
- `GET /public/v1/dns/zones/{zone_id}`: Get a DNS zone
- `PATCH /public/v1/dns/zones/{zone_id}`: Change a DNS zone
- `DELETE /public/v1/dns/zones/{zone_id}`: Delete a DNS zone
- `POST /public/v1/dns/zones/{zone_id}/verify`: Check a zone's delegation now
- `GET /public/v1/dns/zones/{zone_id}/records`: List a zone's records
- `POST /public/v1/dns/zones/{zone_id}/records`: Create a record set
- `GET /public/v1/dns/zones/{zone_id}/records/{record_id}`: Get a record set
- `PATCH /public/v1/dns/zones/{zone_id}/records/{record_id}`: Change a record set
- `DELETE /public/v1/dns/zones/{zone_id}/records/{record_id}`: Delete a record set
- `POST /public/v1/dns/zones/{zone_id}/records/batch`: Change many record sets at once
- `GET /public/v1/dns/zones/{zone_id}/export`: Export a zone file
- `POST /public/v1/dns/zones/{zone_id}/import`: Import a zone file

## The DNS zone object

A zone hosted on Pantech DNS.

- `id` (string, required): e.g. `dnsz_...`.
- `name` (string, required): The zone's name, lower-case; an internationalised name in punycode.
- `description` (string, required): Your note about it; may be empty.
- `status` (string, required): `pending` (being created), `awaiting_delegation` (set `name_servers` at your registrar), `active` (delegated to Pantech), `suspended` (by an operator), `deleting`, `deleted`, or `failed` (see `failure_code`). One of `pending`, `awaiting_delegation`, `active`, `suspended`, `deleting`, `deleted`, `failed`.
- `failure_code` (string or null, required): Why it failed: `delegation_timeout` (not delegated within 14 days, so it was removed), `provider_rejected` or `provider_limit`. Null unless `failed`. One of `delegation_timeout`, `provider_rejected`, `provider_limit`, `null`.
- `name_servers` (array of string, required): The zone's own two Pantech DNS name servers, to delegate to at your registrar: set exactly these, no more and no fewer. Every zone gets its own pair, never the one the domain is delegated to when the zone is created, so a stale delegation can never serve someone else's zone. Empty while `pending`.
- `domain_id` (string or null, required): The Pantech domain (`dom_…`) delegated to this zone; null when none is.
- `record_count` (integer, required): Record sets in the zone, including the managed SOA and NS.
- `last_checked_at` (string or null, required): When its delegation was last checked (RFC 3339, UTC); null before the first check.
- `delegation_deadline_at` (string or null, required): While the zone awaits delegation, when it is removed if the registrar still does not delegate to its name servers (14 days after it started waiting); null otherwise.
- `activated_at` (string or null, required): When it last became `active` (RFC 3339, UTC); null if it never has.
- `suspended_reason` (string or null, required): Why an operator suspended it; null unless `suspended`.
- `created_at` (string, required): When it was created (RFC 3339, UTC).
- `updated_at` (string, required): When it last changed (RFC 3339, UTC).
- `version` (integer, required): Increases with every change.
## The DNS record object

One record set: a name and type, its TTL and every value.

- `id` (string, required): e.g. `dnsr_...`.
- `zone_id` (string, required): The zone (`dnsz_…`).
- `name` (string, required): Relative to the zone: `@` for the apex, `www`, `*.dev`, `_dmarc`.
- `fqdn` (string, required): The absolute name, without a trailing dot.
- `type` (string, required): `SOA` only for the managed apex record. One of `A`, `AAAA`, `CNAME`, `MX`, `TXT`, `SRV`, `CAA`, `NS`, `PTR`, `SOA`.
- `ttl` (integer, required): Seconds resolvers may cache it, 60 to 86400.
- `values` (array of string, required): Its values, canonical and sorted: host names with a trailing dot, TXT as quoted 255-byte strings.
- `allow_private` (boolean, required): Whether private and carrier-grade NAT addresses are allowed in `values`.
- `comment` (string, required): Your note about it; may be empty. Never published in DNS.
- `managed` (boolean, required): True for the apex `SOA` and `NS`, which Pantech manages: read-only.
- `status` (string, required): `pending` until its latest change is live, `active`, `deleting`, or `failed` (see `failure_code`; the last values that applied keep answering). One of `pending`, `active`, `deleting`, `failed`.
- `failure_code` (string or null, required): Why its latest change failed, e.g. `invalid_change`. Null unless `failed`.
- `version` (integer, required): Increases with every change; send it as `If-Match` to change only what you read.
- `created_at` (string, required): When it was created (RFC 3339, UTC).
- `updated_at` (string, required): When it last changed (RFC 3339, UTC).
## List DNS zones

```http
GET /public/v1/dns/zones
```

Your organization's hosted zones, newest first. Served from Pantech's own records: listing never waits on the DNS network.

Scope: `read`.

Query parameters:

- `q` (string): Only zones whose name contains this text (case-insensitive), at most 255 characters. An internationalised name is matched in its punycode form. At most 255 characters.
- `status` (string): Only zones in this status. One of `pending`, `awaiting_delegation`, `active`, `suspended`, `deleting`, `deleted`, `failed`.
- `limit` (integer): Items per page, 1 to 100. Defaults to 50. From 1 to 100. Defaults to `50`.
- `cursor` (string): The previous page's `next_cursor`, to get the next page. Leave out for the first page; keep the other parameters the same.

Example:

```sh
curl "https://api.pantechdynamics.com/public/v1/dns/zones" \
  -H "Authorization: Bearer $PANTECH_API_KEY"
```

Response `200`:

```json
{
  "data": [
    {
      "id": "dnsz_06gk3x9tq7m2v8r4y1c5d0zp8w",
      "name": "example.com",
      "description": "Marketing site",
      "status": "active",
      "failure_code": "delegation_timeout",
      "name_servers": [
        "ana-ns.pantechdynamics.com",
        "ayo-ns.pantechdynamics.com"
      ],
      "domain_id": "dom_06gk3x9tq7m2v8r4y1c5d0zp8w",
      "record_count": 1,
      "last_checked_at": "2026-10-03T09:30:00Z",
      "delegation_deadline_at": "2026-10-03T09:30:00Z",
      "activated_at": "2026-10-03T09:30:00Z",
      "suspended_reason": null,
      "created_at": "2026-10-03T09:30:00Z",
      "updated_at": "2026-10-03T09:30:00Z",
      "version": 1
    }
  ],
  "next_cursor": "eyJhdCI6IjIwMjYtMTAtMDNUMDk6MzA6MDBaIiwiaWQiOiJ2bV8wNmdrIn0"
}
```

Errors:

- `400`: `INVALID_FILTER`: a query parameter is not one of its allowed values. `detail` names it and what it takes.
`INVALID_CURSOR`: the cursor is not valid for this list and these filters. Start again without a cursor.
- `401`: `UNAUTHENTICATED`: the request has no API key, or the key is mistyped, revoked or expired, or its creator has left the organization. Send `Authorization: Bearer PAN_…` with a valid key; create one in the console under Organization › API keys.
- `403`: `INSUFFICIENT_SCOPE`: the API key lacks the scope this endpoint needs (`read` for GET, `write` for changes; an AI app's key also needs `delete` for a destructive call). Use a key with that scope, or reconnect the AI app with "Manage and delete" access.
`FORBIDDEN`: the member who created the key may not do this in the organization. Use a key created by an owner or admin.
`AI_APPS_DISABLED`: the organization has turned AI app access off, and this request was made with an AI app's key or sent by Pantech's MCP server (`Pantech-Client: mcp/…`). An owner can turn it on in the console under Organization › AI apps.
- `429`: `RATE_LIMITED`: this API key, verified user or organization used its request budget for the current window, or this address exceeded an IP/failed-auth limit. Wait `Retry-After` seconds, then retry. For authenticated quota denials, `RateLimit-Scope` identifies the denying quota and `RateLimit-Reset` reports its remaining window in seconds.
- `503`: `DNS_UNAVAILABLE`: Pantech DNS is not available on this deployment yet. Try again later.
`SERVICE_UNAVAILABLE`: request quota storage is unavailable. Wait a few seconds, then retry.
## Price DNS zones

```http
GET /public/v1/dns/zones/quote
```

What hosted zones cost your organization. The first `free_zones` (5) live zones are free; each further zone costs `monthly_per_zone_minor` a month in your organization's currency, billed by the hour on your monthly invoice ("DNS zones beyond 5 free"). A zone is live from when Pantech DNS creates it (`awaiting_delegation`) until it is deleted; a `pending`, `failed` or `deleted` zone is not counted. `monthly_estimate_minor` is what your zones beyond the free ones cost over a 730-hour month at today's price.

Scope: `read`.

Example:

```sh
curl "https://api.pantechdynamics.com/public/v1/dns/zones/quote" \
  -H "Authorization: Bearer $PANTECH_API_KEY"
```

Response `200`:

```json
{
  "free_zones": 1,
  "live_zones": 1,
  "billable_zones": 1,
  "currency": "NGN",
  "monthly_per_zone_minor": 1,
  "monthly_estimate_minor": 3760000,
  "nominal_month_hours": 730
}
```

Errors:

- `401`: `UNAUTHENTICATED`: the request has no API key, or the key is mistyped, revoked or expired, or its creator has left the organization. Send `Authorization: Bearer PAN_…` with a valid key; create one in the console under Organization › API keys.
- `403`: `INSUFFICIENT_SCOPE`: the API key lacks the scope this endpoint needs (`read` for GET, `write` for changes; an AI app's key also needs `delete` for a destructive call). Use a key with that scope, or reconnect the AI app with "Manage and delete" access.
`FORBIDDEN`: the member who created the key may not do this in the organization. Use a key created by an owner or admin.
`AI_APPS_DISABLED`: the organization has turned AI app access off, and this request was made with an AI app's key or sent by Pantech's MCP server (`Pantech-Client: mcp/…`). An owner can turn it on in the console under Organization › AI apps.
- `404`: `NOT_FOUND`: cost quotes are not available on this platform yet.
- `409`: `INVALID_RESOURCE_STATE`: DNS zones have no price in your currency yet. Show the free allowance without a price.
- `429`: `RATE_LIMITED`: this API key, verified user or organization used its request budget for the current window, or this address exceeded an IP/failed-auth limit. Wait `Retry-After` seconds, then retry. For authenticated quota denials, `RateLimit-Scope` identifies the denying quota and `RateLimit-Reset` reports its remaining window in seconds.
- `503`: `DNS_UNAVAILABLE`: Pantech DNS is not available on this deployment yet. Try again later.
`SERVICE_UNAVAILABLE`: request quota storage is unavailable. Wait a few seconds, then retry.
## Create a DNS zone

```http
POST /public/v1/dns/zones
```

Hosts a zone for a domain you own (or a subdomain of one) on Pantech DNS, Pantech's own name servers. The zone starts `pending`, gets its own pair of name servers within seconds and moves to `awaiting_delegation`: set exactly those two `name_servers` at your domain's registrar. Records you add meanwhile stay `pending` and are served once the zone is `active`. Pantech checks the delegation from the parent zone's own servers; the zone becomes `active` when it matches, and is removed (`failed`, `delegation_timeout`) if it never does within 14 days. A zone for a domain registered through Pantech is delegated for you.

Names are lower-cased and an internationalised name is stored in punycode (`café.example` becomes `xn--caf-dma.example`). At most 25 zones per organization, and 10 creates in 24 hours. The first 5 live zones are free; each further zone is billed by the hour on your monthly invoice (see `GET /dns/zones/quote` for the price in your currency). Owners and admins only.

**Idempotency:** a retry with the same `Idempotency-Key` returns the zone the first request made. The same key with a different request returns `409 IDEMPOTENCY_CONFLICT`.

Scope: `write`. Send an `Idempotency-Key` header.

Body:

- `name` (string, required): A domain you own or a subdomain of one, at most 253 characters. Internationalised names are accepted.
- `description` (string): A note for yourself, at most 255 characters.

Example:

```sh
curl -X POST "https://api.pantechdynamics.com/public/v1/dns/zones" \
  -H "Authorization: Bearer $PANTECH_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "example.com"
  }'
```

Response `201`:

```json
{
  "id": "dnsz_06gk3x9tq7m2v8r4y1c5d0zp8w",
  "name": "example.com",
  "description": "Marketing site",
  "status": "active",
  "failure_code": "delegation_timeout",
  "name_servers": [
    "ana-ns.pantechdynamics.com",
    "ayo-ns.pantechdynamics.com"
  ],
  "domain_id": "dom_06gk3x9tq7m2v8r4y1c5d0zp8w",
  "record_count": 1,
  "last_checked_at": "2026-10-03T09:30:00Z",
  "delegation_deadline_at": "2026-10-03T09:30:00Z",
  "activated_at": "2026-10-03T09:30:00Z",
  "suspended_reason": null,
  "created_at": "2026-10-03T09:30:00Z",
  "updated_at": "2026-10-03T09:30:00Z",
  "version": 1
}
```

Errors:

- `400`: `IDEMPOTENCY_KEY_REQUIRED`: the `Idempotency-Key` header is missing. Send a new unique value, such as a UUID, with every write.
`INVALID_IDEMPOTENCY_KEY`: the `Idempotency-Key` header is longer than 255 characters. Use a shorter value.
`INVALID_REQUEST_BODY`: the body is not a single valid JSON object. Send one JSON object with the fields documented for this endpoint.
- `401`: `UNAUTHENTICATED`: the request has no API key, or the key is mistyped, revoked or expired, or its creator has left the organization. Send `Authorization: Bearer PAN_…` with a valid key; create one in the console under Organization › API keys.
- `403`: `INSUFFICIENT_SCOPE`: the API key lacks the `write` scope. Use a key with that scope.
`FORBIDDEN`: the member who created the key is not an owner or admin. Use a key created by one.
`AI_APPS_DISABLED`: the organization has turned AI app access off, and this request was made with an AI app's key or sent by Pantech's MCP server. An owner can turn it on in the console under Organization › AI apps.
`DNS_ZONE_LIMIT_REACHED`: your organization already has 25 zones. Delete one first.
`DNS_ZONE_CREATE_LIMIT_REACHED`: your organization created 10 zones in the last 24 hours. Try again tomorrow.
- `409`: `IDEMPOTENCY_CONFLICT`: this `Idempotency-Key` was already used for a different request. Use a new key.
`DNS_ZONE_NAME_TAKEN`: your organization already has a zone with this name. Use it.
`DNS_ZONE_ACTIVE_ELSEWHERE`: another organization serves this name on Pantech. If the domain is yours, contact support.
`ACCOUNT_SUSPENDED`: the account is suspended or has an overdue invoice, so nothing new can be added. Pay the invoice under Billing in the console, then try again.
- `413`: `REQUEST_TOO_LARGE`: the body is larger than 64 KiB. Send a smaller request.
- `422`: `VALIDATION_FAILED`: a field is invalid. Each entry of `errors` names the `field` and its `code`:
`name` `REQUIRED`, `INVALID_NAME` or `INVALID_ZONE_NAME`: send a domain you own such as `example.com` or `shop.example.com`: at least two labels, at most 253 characters, not a public suffix such as `com` or `co.uk`.
`name` `RESERVED_ZONE_NAME`: the name is reserved by Pantech. Choose another.
`description` `INVALID_DESCRIPTION`: send at most 255 characters.
`UNKNOWN_FIELD`: the body has a field this endpoint does not take (named in `field`). Remove it or fix its spelling.
- `429`: `RATE_LIMITED`: this API key, verified user or organization used its request budget for the current window, or this address exceeded an IP/failed-auth limit. Wait `Retry-After` seconds, then retry. For authenticated quota denials, `RateLimit-Scope` identifies the denying quota and `RateLimit-Reset` reports its remaining window in seconds.
- `503`: `DNS_UNAVAILABLE`: Pantech DNS is not available on this deployment yet. Try again later.
`SERVICE_UNAVAILABLE`: request quota storage is unavailable. Wait a few seconds, then retry.
## Get a DNS zone

```http
GET /public/v1/dns/zones/{zone_id}
```

One zone: its status, the name servers to delegate to, and when its delegation was last checked.

Scope: `read`.

Path parameters:

- `zone_id`: The zone's id (`dnsz_…`).

Example:

```sh
curl "https://api.pantechdynamics.com/public/v1/dns/zones/dnsz_06gk3x9tq7m2v8r4y1c5d0zp8w" \
  -H "Authorization: Bearer $PANTECH_API_KEY"
```

Response `200`:

```json
{
  "id": "dnsz_06gk3x9tq7m2v8r4y1c5d0zp8w",
  "name": "example.com",
  "description": "Marketing site",
  "status": "active",
  "failure_code": "delegation_timeout",
  "name_servers": [
    "ana-ns.pantechdynamics.com",
    "ayo-ns.pantechdynamics.com"
  ],
  "domain_id": "dom_06gk3x9tq7m2v8r4y1c5d0zp8w",
  "record_count": 1,
  "last_checked_at": "2026-10-03T09:30:00Z",
  "delegation_deadline_at": "2026-10-03T09:30:00Z",
  "activated_at": "2026-10-03T09:30:00Z",
  "suspended_reason": null,
  "created_at": "2026-10-03T09:30:00Z",
  "updated_at": "2026-10-03T09:30:00Z",
  "version": 1
}
```

Errors:

- `401`: `UNAUTHENTICATED`: the request has no API key, or the key is mistyped, revoked or expired, or its creator has left the organization. Send `Authorization: Bearer PAN_…` with a valid key; create one in the console under Organization › API keys.
- `403`: `INSUFFICIENT_SCOPE`: the API key lacks the scope this endpoint needs (`read` for GET, `write` for changes; an AI app's key also needs `delete` for a destructive call). Use a key with that scope, or reconnect the AI app with "Manage and delete" access.
`FORBIDDEN`: the member who created the key may not do this in the organization. Use a key created by an owner or admin.
`AI_APPS_DISABLED`: the organization has turned AI app access off, and this request was made with an AI app's key or sent by Pantech's MCP server (`Pantech-Client: mcp/…`). An owner can turn it on in the console under Organization › AI apps.
- `404`: `DNS_ZONE_NOT_FOUND`: no DNS zone with this id in your organization. List your zones to find it.
`RESOURCE_NOT_FOUND`: the id is not a DNS zone id (`dnsz_…`). Check the id.
- `429`: `RATE_LIMITED`: this API key, verified user or organization used its request budget for the current window, or this address exceeded an IP/failed-auth limit. Wait `Retry-After` seconds, then retry. For authenticated quota denials, `RateLimit-Scope` identifies the denying quota and `RateLimit-Reset` reports its remaining window in seconds.
- `503`: `DNS_UNAVAILABLE`: Pantech DNS is not available on this deployment yet. Try again later.
`SERVICE_UNAVAILABLE`: request quota storage is unavailable. Wait a few seconds, then retry.
## Change a DNS zone

```http
PATCH /public/v1/dns/zones/{zone_id}
```

Changes the zone's description. A zone's name never changes: create another zone instead. Owners and admins only.

**Idempotency:** the same request applied twice leaves the zone the same.

Scope: `write`. Send an `Idempotency-Key` header.

Path parameters:

- `zone_id`: The zone's id (`dnsz_…`).

Body:

- `description` (string): A new note, at most 255 characters.

Example:

```sh
curl -X PATCH "https://api.pantechdynamics.com/public/v1/dns/zones/dnsz_06gk3x9tq7m2v8r4y1c5d0zp8w" \
  -H "Authorization: Bearer $PANTECH_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

Response `200`:

```json
{
  "id": "dnsz_06gk3x9tq7m2v8r4y1c5d0zp8w",
  "name": "example.com",
  "description": "Marketing site",
  "status": "active",
  "failure_code": "delegation_timeout",
  "name_servers": [
    "ana-ns.pantechdynamics.com",
    "ayo-ns.pantechdynamics.com"
  ],
  "domain_id": "dom_06gk3x9tq7m2v8r4y1c5d0zp8w",
  "record_count": 1,
  "last_checked_at": "2026-10-03T09:30:00Z",
  "delegation_deadline_at": "2026-10-03T09:30:00Z",
  "activated_at": "2026-10-03T09:30:00Z",
  "suspended_reason": null,
  "created_at": "2026-10-03T09:30:00Z",
  "updated_at": "2026-10-03T09:30:00Z",
  "version": 1
}
```

Errors:

- `400`: `IDEMPOTENCY_KEY_REQUIRED`: the `Idempotency-Key` header is missing. Send a new unique value, such as a UUID, with every write.
`INVALID_IDEMPOTENCY_KEY`: the `Idempotency-Key` header is longer than 255 characters. Use a shorter value.
`INVALID_REQUEST_BODY`: the body is not a single valid JSON object. Send one JSON object with the fields documented for this endpoint.
- `401`: `UNAUTHENTICATED`: the request has no API key, or the key is mistyped, revoked or expired, or its creator has left the organization. Send `Authorization: Bearer PAN_…` with a valid key; create one in the console under Organization › API keys.
- `403`: `INSUFFICIENT_SCOPE`: the API key lacks the scope this endpoint needs (`read` for GET, `write` for changes; an AI app's key also needs `delete` for a destructive call). Use a key with that scope, or reconnect the AI app with "Manage and delete" access.
`FORBIDDEN`: the member who created the key may not do this in the organization. Use a key created by an owner or admin.
`AI_APPS_DISABLED`: the organization has turned AI app access off, and this request was made with an AI app's key or sent by Pantech's MCP server (`Pantech-Client: mcp/…`). An owner can turn it on in the console under Organization › AI apps.
- `404`: `DNS_ZONE_NOT_FOUND`: no DNS zone with this id in your organization. List your zones to find it.
`RESOURCE_NOT_FOUND`: the id is not a DNS zone id (`dnsz_…`). Check the id.
- `409`: `DNS_ZONE_NOT_WRITABLE`: the zone is being deleted or has failed.
`CONFLICT`: the zone was changed at the same time. Get it again and retry.
- `413`: `REQUEST_TOO_LARGE`: the body is larger than 64 KiB. Send a smaller request.
- `422`: `VALIDATION_FAILED`: a field is invalid. Each entry of `errors` names the `field` and its `code`:
`description` `INVALID_DESCRIPTION`: send at most 255 characters.
`UNKNOWN_FIELD`: the body has a field this endpoint does not take (named in `field`). Remove it or fix its spelling.
- `429`: `RATE_LIMITED`: this API key, verified user or organization used its request budget for the current window, or this address exceeded an IP/failed-auth limit. Wait `Retry-After` seconds, then retry. For authenticated quota denials, `RateLimit-Scope` identifies the denying quota and `RateLimit-Reset` reports its remaining window in seconds.
- `503`: `DNS_UNAVAILABLE`: Pantech DNS is not available on this deployment yet. Try again later.
`SERVICE_UNAVAILABLE`: request quota storage is unavailable. Wait a few seconds, then retry.
## Delete a DNS zone

```http
DELETE /public/v1/dns/zones/{zone_id}
```

Deletes the zone and every record in it from the DNS network straight away: its names stop answering within about a minute. The zone answers `deleting`, then `deleted`. A zone a Pantech domain delegates to cannot be deleted until the domain points elsewhere. Owners and admins only.

**Idempotency:** deleting a zone that is already being deleted returns it again.

**Scope:** `write`. Destructive: an AI app's key also needs `delete`.

Scope: `write`. Send an `Idempotency-Key` header.

Path parameters:

- `zone_id`: The zone's id (`dnsz_…`).

Example:

```sh
curl -X DELETE "https://api.pantechdynamics.com/public/v1/dns/zones/dnsz_06gk3x9tq7m2v8r4y1c5d0zp8w" \
  -H "Authorization: Bearer $PANTECH_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
```

Response `202`:

```json
{
  "id": "dnsz_06gk3x9tq7m2v8r4y1c5d0zp8w",
  "name": "example.com",
  "description": "Marketing site",
  "status": "active",
  "failure_code": "delegation_timeout",
  "name_servers": [
    "ana-ns.pantechdynamics.com",
    "ayo-ns.pantechdynamics.com"
  ],
  "domain_id": "dom_06gk3x9tq7m2v8r4y1c5d0zp8w",
  "record_count": 1,
  "last_checked_at": "2026-10-03T09:30:00Z",
  "delegation_deadline_at": "2026-10-03T09:30:00Z",
  "activated_at": "2026-10-03T09:30:00Z",
  "suspended_reason": null,
  "created_at": "2026-10-03T09:30:00Z",
  "updated_at": "2026-10-03T09:30:00Z",
  "version": 1
}
```

Errors:

- `400`: `IDEMPOTENCY_KEY_REQUIRED`: the `Idempotency-Key` header is missing. Send a new unique value, such as a UUID, with every write.
`INVALID_IDEMPOTENCY_KEY`: the `Idempotency-Key` header is longer than 255 characters. Use a shorter value.
- `401`: `UNAUTHENTICATED`: the request has no API key, or the key is mistyped, revoked or expired, or its creator has left the organization. Send `Authorization: Bearer PAN_…` with a valid key; create one in the console under Organization › API keys.
- `403`: `INSUFFICIENT_SCOPE`: the API key lacks the `write` scope, or it is an AI app's key without `delete`. Use a key with that scope, or reconnect the AI app with "Manage and delete" access.
`FORBIDDEN`: the member who created the key is not an owner or admin. Use a key created by one.
`AI_APPS_DISABLED`: the organization has turned AI app access off, and this request was made with an AI app's key or sent by Pantech's MCP server. An owner can turn it on in the console under Organization › AI apps.
- `404`: `DNS_ZONE_NOT_FOUND`: no DNS zone with this id in your organization. List your zones to find it.
`RESOURCE_NOT_FOUND`: the id is not a DNS zone id (`dnsz_…`). Check the id.
- `409`: `DNS_ZONE_IN_USE_BY_DOMAIN`: a Pantech domain delegates to this zone. Point the domain at other name servers first.
`DNS_ZONE_SUSPENDED`: an operator suspended the zone. Contact support.
- `429`: `RATE_LIMITED`: this API key, verified user or organization used its request budget for the current window, or this address exceeded an IP/failed-auth limit. Wait `Retry-After` seconds, then retry. For authenticated quota denials, `RateLimit-Scope` identifies the denying quota and `RateLimit-Reset` reports its remaining window in seconds.
- `503`: `DNS_UNAVAILABLE`: Pantech DNS is not available on this deployment yet. Try again later.
`SERVICE_UNAVAILABLE`: request quota storage is unavailable. Wait a few seconds, then retry.
## Check a zone's delegation now

```http
POST /public/v1/dns/zones/{zone_id}/verify
```

Asks Pantech to check the zone's delegation within seconds instead of on its schedule: call it after changing the name servers at your registrar, then get the zone to see whether it became `active`. Has no effect on a zone that is not `awaiting_delegation` or `active`. Owners and admins only.

**Idempotency:** asking twice checks once.

Scope: `write`. Send an `Idempotency-Key` header.

Path parameters:

- `zone_id`: The zone's id (`dnsz_…`).

Example:

```sh
curl -X POST "https://api.pantechdynamics.com/public/v1/dns/zones/dnsz_06gk3x9tq7m2v8r4y1c5d0zp8w/verify" \
  -H "Authorization: Bearer $PANTECH_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
```

Response `202`:

```json
{
  "id": "dnsz_06gk3x9tq7m2v8r4y1c5d0zp8w",
  "name": "example.com",
  "description": "Marketing site",
  "status": "active",
  "failure_code": "delegation_timeout",
  "name_servers": [
    "ana-ns.pantechdynamics.com",
    "ayo-ns.pantechdynamics.com"
  ],
  "domain_id": "dom_06gk3x9tq7m2v8r4y1c5d0zp8w",
  "record_count": 1,
  "last_checked_at": "2026-10-03T09:30:00Z",
  "delegation_deadline_at": "2026-10-03T09:30:00Z",
  "activated_at": "2026-10-03T09:30:00Z",
  "suspended_reason": null,
  "created_at": "2026-10-03T09:30:00Z",
  "updated_at": "2026-10-03T09:30:00Z",
  "version": 1
}
```

Errors:

- `400`: `IDEMPOTENCY_KEY_REQUIRED`: the `Idempotency-Key` header is missing. Send a new unique value, such as a UUID, with every write.
`INVALID_IDEMPOTENCY_KEY`: the `Idempotency-Key` header is longer than 255 characters. Use a shorter value.
- `401`: `UNAUTHENTICATED`: the request has no API key, or the key is mistyped, revoked or expired, or its creator has left the organization. Send `Authorization: Bearer PAN_…` with a valid key; create one in the console under Organization › API keys.
- `403`: `INSUFFICIENT_SCOPE`: the API key lacks the scope this endpoint needs (`read` for GET, `write` for changes; an AI app's key also needs `delete` for a destructive call). Use a key with that scope, or reconnect the AI app with "Manage and delete" access.
`FORBIDDEN`: the member who created the key may not do this in the organization. Use a key created by an owner or admin.
`AI_APPS_DISABLED`: the organization has turned AI app access off, and this request was made with an AI app's key or sent by Pantech's MCP server (`Pantech-Client: mcp/…`). An owner can turn it on in the console under Organization › AI apps.
- `404`: `DNS_ZONE_NOT_FOUND`: no DNS zone with this id in your organization. List your zones to find it.
`RESOURCE_NOT_FOUND`: the id is not a DNS zone id (`dnsz_…`). Check the id.
- `429`: `RATE_LIMITED`: this API key, verified user or organization used its request budget for the current window, or this address exceeded an IP/failed-auth limit. Wait `Retry-After` seconds, then retry. For authenticated quota denials, `RateLimit-Scope` identifies the denying quota and `RateLimit-Reset` reports its remaining window in seconds.
- `503`: `DNS_UNAVAILABLE`: Pantech DNS is not available on this deployment yet. Try again later.
`SERVICE_UNAVAILABLE`: request quota storage is unavailable. Wait a few seconds, then retry.
## List a zone's records

```http
GET /public/v1/dns/zones/{zone_id}/records
```

The zone's record sets, by name then type, including the apex `SOA` and `NS` that Pantech manages (`managed: true`, read-only). A record set is one name and type with its TTL and every value.

Scope: `read`.

Path parameters:

- `zone_id`: The zone's id (`dnsz_…`).

Query parameters:

- `name` (string): Only the record sets at this name, relative to the zone (`@`, `www`, `*.dev`). At most 255 characters.
- `q` (string): Only record sets whose name contains this text (case-insensitive), at most 255 characters. At most 255 characters.
- `type` (string): Only record sets of this type (case-insensitive). One of `A`, `AAAA`, `CNAME`, `MX`, `TXT`, `SRV`, `CAA`, `NS`, `PTR`, `SOA`.
- `limit` (integer): Items per page, 1 to 100. Defaults to 50. From 1 to 100. Defaults to `50`.
- `cursor` (string): The previous page's `next_cursor`, to get the next page. Leave out for the first page; keep the other parameters the same.

Example:

```sh
curl "https://api.pantechdynamics.com/public/v1/dns/zones/dnsz_06gk3x9tq7m2v8r4y1c5d0zp8w/records" \
  -H "Authorization: Bearer $PANTECH_API_KEY"
```

Response `200`:

```json
{
  "data": [
    {
      "id": "dnsr_06gk3x9tq7m2v8r4y1c5d0zp8w",
      "zone_id": "dnsz_06gk3x9tq7m2v8r4y1c5d0zp8w",
      "name": "www",
      "fqdn": "www.example.com",
      "type": "A",
      "ttl": 300,
      "values": [
        "<server-public-ip>",
        "<second-server-public-ip>"
      ],
      "allow_private": true,
      "comment": "comment",
      "managed": true,
      "status": "active",
      "failure_code": null,
      "version": 1,
      "created_at": "2026-10-03T09:30:00Z",
      "updated_at": "2026-10-03T09:30:00Z"
    }
  ],
  "next_cursor": "eyJhdCI6IjIwMjYtMTAtMDNUMDk6MzA6MDBaIiwiaWQiOiJ2bV8wNmdrIn0"
}
```

Errors:

- `400`: `INVALID_FILTER`: a query parameter is not one of its allowed values. `detail` names it and what it takes.
`INVALID_CURSOR`: the cursor is not valid for this list and these filters. Start again without a cursor.
- `401`: `UNAUTHENTICATED`: the request has no API key, or the key is mistyped, revoked or expired, or its creator has left the organization. Send `Authorization: Bearer PAN_…` with a valid key; create one in the console under Organization › API keys.
- `403`: `INSUFFICIENT_SCOPE`: the API key lacks the scope this endpoint needs (`read` for GET, `write` for changes; an AI app's key also needs `delete` for a destructive call). Use a key with that scope, or reconnect the AI app with "Manage and delete" access.
`FORBIDDEN`: the member who created the key may not do this in the organization. Use a key created by an owner or admin.
`AI_APPS_DISABLED`: the organization has turned AI app access off, and this request was made with an AI app's key or sent by Pantech's MCP server (`Pantech-Client: mcp/…`). An owner can turn it on in the console under Organization › AI apps.
- `404`: `DNS_ZONE_NOT_FOUND`: no DNS zone with this id in your organization. List your zones to find it.
`RESOURCE_NOT_FOUND`: the id is not a DNS zone id (`dnsz_…`). Check the id.
- `429`: `RATE_LIMITED`: this API key, verified user or organization used its request budget for the current window, or this address exceeded an IP/failed-auth limit. Wait `Retry-After` seconds, then retry. For authenticated quota denials, `RateLimit-Scope` identifies the denying quota and `RateLimit-Reset` reports its remaining window in seconds.
- `503`: `DNS_UNAVAILABLE`: Pantech DNS is not available on this deployment yet. Try again later.
`SERVICE_UNAVAILABLE`: request quota storage is unavailable. Wait a few seconds, then retry.
## Create a record set

```http
POST /public/v1/dns/zones/{zone_id}/records
```

Adds a record set: one name and type, a TTL, and 1 to 100 values. It answers `pending` and is live on the DNS network, `active`, typically within a minute.

Values by type: `A` an IPv4 address; `AAAA` an IPv6 address; `CNAME`, `NS` and `PTR` a host name; `MX` `10 mail.example.com`; `SRV` `10 5 5060 sip.example.com`; `CAA` `0 issue "ca.example.net"`; `TXT` any printable text up to 4,000 bytes, split into 255-byte strings for you (quoted strings are accepted too). Host names are returned with a trailing dot. Private and carrier-grade NAT addresses are refused unless `allow_private` is true. A `CNAME` stands alone at its name and is never at the apex; `NS` delegates a subdomain only. At most 10,000 record sets per zone. Owners and admins only.

**Idempotency:** a retry with the same `Idempotency-Key` returns the record set the first request made, as it is now. The same key with a different request returns `409 IDEMPOTENCY_CONFLICT`. A key is remembered for 24 hours.

Scope: `write`. Send an `Idempotency-Key` header.

Path parameters:

- `zone_id`: The zone's id (`dnsz_…`).

Body:

- `name` (string, required): Relative to the zone (`@`, `www`, `*.dev`, `_dmarc`), or fully qualified ending in the zone.
- `type` (string, required): One of `A`, `AAAA`, `CNAME`, `MX`, `TXT`, `SRV`, `CAA`, `NS`, `PTR`.
- `ttl` (integer): Seconds, 60 to 86400. Defaults to 300. From 60 to 86400. Defaults to `300`.
- `values` (array of string, required): 1 to 100 values in the type's format.
- `allow_private` (boolean): Allow private and carrier-grade NAT addresses (for names that resolve inside a private network). Defaults to false.
- `comment` (string): A note for yourself, at most 255 characters.

Example:

```sh
curl -X POST "https://api.pantechdynamics.com/public/v1/dns/zones/dnsz_06gk3x9tq7m2v8r4y1c5d0zp8w/records" \
  -H "Authorization: Bearer $PANTECH_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "www",
    "type": "A",
    "values": [
      "<server-public-ip>"
    ]
  }'
```

Response `202`:

```json
{
  "id": "dnsr_06gk3x9tq7m2v8r4y1c5d0zp8w",
  "zone_id": "dnsz_06gk3x9tq7m2v8r4y1c5d0zp8w",
  "name": "www",
  "fqdn": "www.example.com",
  "type": "A",
  "ttl": 300,
  "values": [
    "<server-public-ip>",
    "<second-server-public-ip>"
  ],
  "allow_private": true,
  "comment": "comment",
  "managed": true,
  "status": "active",
  "failure_code": null,
  "version": 1,
  "created_at": "2026-10-03T09:30:00Z",
  "updated_at": "2026-10-03T09:30:00Z"
}
```

Errors:

- `400`: `IDEMPOTENCY_KEY_REQUIRED`: the `Idempotency-Key` header is missing. Send a new unique value, such as a UUID, with every write.
`INVALID_IDEMPOTENCY_KEY`: the `Idempotency-Key` header is longer than 255 characters. Use a shorter value.
`INVALID_REQUEST_BODY`: the body is not a single valid JSON object. Send one JSON object with the fields documented for this endpoint.
- `401`: `UNAUTHENTICATED`: the request has no API key, or the key is mistyped, revoked or expired, or its creator has left the organization. Send `Authorization: Bearer PAN_…` with a valid key; create one in the console under Organization › API keys.
- `403`: `INSUFFICIENT_SCOPE`: the API key lacks the `write` scope. Use a key with that scope.
`FORBIDDEN`: the member who created the key is not an owner or admin. Use a key created by one.
`AI_APPS_DISABLED`: the organization has turned AI app access off, and this request was made with an AI app's key or sent by Pantech's MCP server. An owner can turn it on in the console under Organization › AI apps.
`DNS_RECORD_LIMIT_REACHED`: the zone already holds 10,000 record sets.
- `404`: `DNS_ZONE_NOT_FOUND`: no DNS zone with this id in your organization. List your zones to find it.
`RESOURCE_NOT_FOUND`: the id is not a DNS zone id (`dnsz_…`). Check the id.
- `409`: `DNS_RECORD_EXISTS`: a record set with this name and type exists. Change it instead.
`IDEMPOTENCY_CONFLICT`: this `Idempotency-Key` was already used for a different request. Use a new key.
`DNS_CNAME_CONFLICT`: a CNAME must be the only record at its name.
`DNS_RECORD_READ_ONLY`: the apex `NS` (and `SOA`) are managed by Pantech.
`DNS_ZONE_SUSPENDED`: an operator suspended the zone. Contact support.
`DNS_ZONE_NOT_WRITABLE`: the zone is being deleted or has failed. Create the zone again to manage its records.
- `413`: `REQUEST_TOO_LARGE`: the body is larger than 64 KiB. Send a smaller request.
- `422`: `VALIDATION_FAILED`: a field is invalid. Each entry of `errors` names the `field` and its `code`:
`name` `INVALID_NAME` or `INVALID_RECORD_NAME`: send `@` for the apex, a name inside the zone such as `www` or `_dmarc`, a wildcard such as `*.dev`, or a fully-qualified name ending in the zone. Internationalised names are accepted and stored in punycode.
`name` `CNAME_AT_APEX`: a CNAME cannot be at the apex; use A or AAAA records there.
`type` `INVALID_RECORD_TYPE`: send one of `A`, `AAAA`, `CNAME`, `MX`, `TXT`, `SRV`, `CAA`, `NS`, `PTR`.
`ttl` `INVALID_TTL`: send 60 to 86400 seconds.
`values` `INVALID_VALUES`: send 1 to 100 distinct values.
`values[i]` `INVALID_VALUE`: that value is not valid for the type; `message` says why (for example a private address without `allow_private`).
`comment` `INVALID_COMMENT`: send at most 255 characters.
`UNKNOWN_FIELD`: the body has a field this endpoint does not take (named in `field`). Remove it or fix its spelling.
- `429`: `RATE_LIMITED`: this API key, verified user or organization used its request budget for the current window, or this address exceeded an IP/failed-auth limit. Wait `Retry-After` seconds, then retry. For authenticated quota denials, `RateLimit-Scope` identifies the denying quota and `RateLimit-Reset` reports its remaining window in seconds.
- `503`: `DNS_UNAVAILABLE`: Pantech DNS is not available on this deployment yet. Try again later.
`SERVICE_UNAVAILABLE`: request quota storage is unavailable. Wait a few seconds, then retry.
## Get a record set

```http
GET /public/v1/dns/zones/{zone_id}/records/{record_id}
```

One record set. `status` is `pending` until its latest change is live, then `active`; `failed` carries a `failure_code`, and the DNS network keeps answering the last values that applied.

Scope: `read`.

Path parameters:

- `zone_id`: The zone's id (`dnsz_…`).
- `record_id`: The record set's id (`dnsr_…`).

Example:

```sh
curl "https://api.pantechdynamics.com/public/v1/dns/zones/dnsz_06gk3x9tq7m2v8r4y1c5d0zp8w/records/dnsr_06gk3x9tq7m2v8r4y1c5d0zp8w" \
  -H "Authorization: Bearer $PANTECH_API_KEY"
```

Response `200`:

```json
{
  "id": "dnsr_06gk3x9tq7m2v8r4y1c5d0zp8w",
  "zone_id": "dnsz_06gk3x9tq7m2v8r4y1c5d0zp8w",
  "name": "www",
  "fqdn": "www.example.com",
  "type": "A",
  "ttl": 300,
  "values": [
    "<server-public-ip>",
    "<second-server-public-ip>"
  ],
  "allow_private": true,
  "comment": "comment",
  "managed": true,
  "status": "active",
  "failure_code": null,
  "version": 1,
  "created_at": "2026-10-03T09:30:00Z",
  "updated_at": "2026-10-03T09:30:00Z"
}
```

Errors:

- `401`: `UNAUTHENTICATED`: the request has no API key, or the key is mistyped, revoked or expired, or its creator has left the organization. Send `Authorization: Bearer PAN_…` with a valid key; create one in the console under Organization › API keys.
- `403`: `INSUFFICIENT_SCOPE`: the API key lacks the scope this endpoint needs (`read` for GET, `write` for changes; an AI app's key also needs `delete` for a destructive call). Use a key with that scope, or reconnect the AI app with "Manage and delete" access.
`FORBIDDEN`: the member who created the key may not do this in the organization. Use a key created by an owner or admin.
`AI_APPS_DISABLED`: the organization has turned AI app access off, and this request was made with an AI app's key or sent by Pantech's MCP server (`Pantech-Client: mcp/…`). An owner can turn it on in the console under Organization › AI apps.
- `404`: `DNS_ZONE_NOT_FOUND`: no DNS zone with this id in your organization. List your zones to find it.
`RESOURCE_NOT_FOUND`: the id is not a DNS zone id (`dnsz_…`). Check the id.
`DNS_RECORD_NOT_FOUND`: no record with this id in this zone. List the zone's records to find it.
`RESOURCE_NOT_FOUND`: the record id is not a record id (`dnsr_…`). Check the id.
- `429`: `RATE_LIMITED`: this API key, verified user or organization used its request budget for the current window, or this address exceeded an IP/failed-auth limit. Wait `Retry-After` seconds, then retry. For authenticated quota denials, `RateLimit-Scope` identifies the denying quota and `RateLimit-Reset` reports its remaining window in seconds.
- `503`: `DNS_UNAVAILABLE`: Pantech DNS is not available on this deployment yet. Try again later.
`SERVICE_UNAVAILABLE`: request quota storage is unavailable. Wait a few seconds, then retry.
## Change a record set

```http
PATCH /public/v1/dns/zones/{zone_id}/records/{record_id}
```

Changes the TTL, values, `allow_private` or comment; fields you leave out keep their value, and `values` replaces every value. A record set's name and type never change: delete it and create another. Send `If-Match: <version>` to refuse the change if someone else changed the record since you read it. Owners and admins only.

**Idempotency:** the same request applied twice leaves the record the same.

Scope: `write`. Send an `Idempotency-Key` header.

Path parameters:

- `zone_id`: The zone's id (`dnsz_…`).
- `record_id`: The record set's id (`dnsr_…`).

Body:

- `ttl` (integer): A new TTL in seconds. From 60 to 86400.
- `values` (array of string): The new values, replacing every old one.
- `allow_private` (boolean)
- `comment` (string): A new note, at most 255 characters.

Example:

```sh
curl -X PATCH "https://api.pantechdynamics.com/public/v1/dns/zones/dnsz_06gk3x9tq7m2v8r4y1c5d0zp8w/records/dnsr_06gk3x9tq7m2v8r4y1c5d0zp8w" \
  -H "Authorization: Bearer $PANTECH_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

Response `202`:

```json
{
  "id": "dnsr_06gk3x9tq7m2v8r4y1c5d0zp8w",
  "zone_id": "dnsz_06gk3x9tq7m2v8r4y1c5d0zp8w",
  "name": "www",
  "fqdn": "www.example.com",
  "type": "A",
  "ttl": 300,
  "values": [
    "<server-public-ip>",
    "<second-server-public-ip>"
  ],
  "allow_private": true,
  "comment": "comment",
  "managed": true,
  "status": "active",
  "failure_code": null,
  "version": 1,
  "created_at": "2026-10-03T09:30:00Z",
  "updated_at": "2026-10-03T09:30:00Z"
}
```

Errors:

- `400`: `IDEMPOTENCY_KEY_REQUIRED`: the `Idempotency-Key` header is missing. Send a new unique value, such as a UUID, with every write.
`INVALID_IDEMPOTENCY_KEY`: the `Idempotency-Key` header is longer than 255 characters. Use a shorter value.
`INVALID_REQUEST_BODY`: the body is not a single valid JSON object. Send one JSON object with the fields documented for this endpoint.
`VALIDATION_FAILED` with `If-Match` `INVALID_VERSION`: send the record's `version`, a positive integer.
- `401`: `UNAUTHENTICATED`: the request has no API key, or the key is mistyped, revoked or expired, or its creator has left the organization. Send `Authorization: Bearer PAN_…` with a valid key; create one in the console under Organization › API keys.
- `403`: `INSUFFICIENT_SCOPE`: the API key lacks the scope this endpoint needs (`read` for GET, `write` for changes; an AI app's key also needs `delete` for a destructive call). Use a key with that scope, or reconnect the AI app with "Manage and delete" access.
`FORBIDDEN`: the member who created the key may not do this in the organization. Use a key created by an owner or admin.
`AI_APPS_DISABLED`: the organization has turned AI app access off, and this request was made with an AI app's key or sent by Pantech's MCP server (`Pantech-Client: mcp/…`). An owner can turn it on in the console under Organization › AI apps.
- `404`: `DNS_ZONE_NOT_FOUND`: no DNS zone with this id in your organization. List your zones to find it.
`RESOURCE_NOT_FOUND`: the id is not a DNS zone id (`dnsz_…`). Check the id.
`DNS_RECORD_NOT_FOUND`: no record with this id in this zone. List the zone's records to find it.
`RESOURCE_NOT_FOUND`: the record id is not a record id (`dnsr_…`). Check the id.
- `409`: `DNS_CNAME_CONFLICT`: a CNAME must be the only record at its name.
`DNS_RECORD_READ_ONLY`: the apex `SOA` and `NS` are managed by Pantech.
`CONFLICT`: the record is being deleted.
`DNS_ZONE_SUSPENDED`: an operator suspended the zone. Contact support.
`DNS_ZONE_NOT_WRITABLE`: the zone is being deleted or has failed. Create the zone again to manage its records.
- `412`: `VERSION_CONFLICT`: `If-Match` is not the record's current version. Get it again and retry.
- `413`: `REQUEST_TOO_LARGE`: the body is larger than 64 KiB. Send a smaller request.
- `422`: `VALIDATION_FAILED`: a field is invalid. Each entry of `errors` names the `field` and its `code`:
`ttl` `INVALID_TTL`: send 60 to 86400 seconds.
`values` `INVALID_VALUES`: send 1 to 100 distinct values.
`values[i]` `INVALID_VALUE`: that value is not valid for the type; `message` says why (for example a private address without `allow_private`).
`comment` `INVALID_COMMENT`: send at most 255 characters.
`UNKNOWN_FIELD`: the body has a field this endpoint does not take (named in `field`). Remove it or fix its spelling.
- `429`: `RATE_LIMITED`: this API key, verified user or organization used its request budget for the current window, or this address exceeded an IP/failed-auth limit. Wait `Retry-After` seconds, then retry. For authenticated quota denials, `RateLimit-Scope` identifies the denying quota and `RateLimit-Reset` reports its remaining window in seconds.
- `503`: `DNS_UNAVAILABLE`: Pantech DNS is not available on this deployment yet. Try again later.
`SERVICE_UNAVAILABLE`: request quota storage is unavailable. Wait a few seconds, then retry.
## Delete a record set

```http
DELETE /public/v1/dns/zones/{zone_id}/records/{record_id}
```

Removes the record set from the DNS network. It answers `deleting` and disappears once the DNS network no longer holds it, typically within a minute. Send `If-Match: <version>` to refuse the delete if the record changed since you read it. Owners and admins only.

**Idempotency:** deleting a record set that is already being deleted returns it again.

**Scope:** `write`. Destructive: an AI app's key also needs `delete`.

Scope: `write`. Send an `Idempotency-Key` header.

Path parameters:

- `zone_id`: The zone's id (`dnsz_…`).
- `record_id`: The record set's id (`dnsr_…`).

Example:

```sh
curl -X DELETE "https://api.pantechdynamics.com/public/v1/dns/zones/dnsz_06gk3x9tq7m2v8r4y1c5d0zp8w/records/dnsr_06gk3x9tq7m2v8r4y1c5d0zp8w" \
  -H "Authorization: Bearer $PANTECH_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
```

Response `202`:

```json
{
  "id": "dnsr_06gk3x9tq7m2v8r4y1c5d0zp8w",
  "zone_id": "dnsz_06gk3x9tq7m2v8r4y1c5d0zp8w",
  "name": "www",
  "fqdn": "www.example.com",
  "type": "A",
  "ttl": 300,
  "values": [
    "<server-public-ip>",
    "<second-server-public-ip>"
  ],
  "allow_private": true,
  "comment": "comment",
  "managed": true,
  "status": "active",
  "failure_code": null,
  "version": 1,
  "created_at": "2026-10-03T09:30:00Z",
  "updated_at": "2026-10-03T09:30:00Z"
}
```

Errors:

- `400`: `IDEMPOTENCY_KEY_REQUIRED`: the `Idempotency-Key` header is missing. Send a new unique value, such as a UUID, with every write.
`INVALID_IDEMPOTENCY_KEY`: the `Idempotency-Key` header is longer than 255 characters. Use a shorter value.
`VALIDATION_FAILED` with `If-Match` `INVALID_VERSION`: send the record's `version`, a positive integer.
- `401`: `UNAUTHENTICATED`: the request has no API key, or the key is mistyped, revoked or expired, or its creator has left the organization. Send `Authorization: Bearer PAN_…` with a valid key; create one in the console under Organization › API keys.
- `403`: `INSUFFICIENT_SCOPE`: the API key lacks the `write` scope, or it is an AI app's key without `delete`. Use a key with that scope, or reconnect the AI app with "Manage and delete" access.
`FORBIDDEN`: the member who created the key is not an owner or admin. Use a key created by one.
`AI_APPS_DISABLED`: the organization has turned AI app access off, and this request was made with an AI app's key or sent by Pantech's MCP server. An owner can turn it on in the console under Organization › AI apps.
- `404`: `DNS_ZONE_NOT_FOUND`: no DNS zone with this id in your organization. List your zones to find it.
`RESOURCE_NOT_FOUND`: the id is not a DNS zone id (`dnsz_…`). Check the id.
`DNS_RECORD_NOT_FOUND`: no record with this id in this zone. List the zone's records to find it.
`RESOURCE_NOT_FOUND`: the record id is not a record id (`dnsr_…`). Check the id.
- `409`: `DNS_RECORD_READ_ONLY`: the apex `SOA` and `NS` are managed by Pantech.
`DNS_ZONE_SUSPENDED`: an operator suspended the zone. Contact support.
`DNS_ZONE_NOT_WRITABLE`: the zone is being deleted or has failed. Create the zone again to manage its records.
- `412`: `VERSION_CONFLICT`: `If-Match` is not the record's current version. Get it again and retry.
- `429`: `RATE_LIMITED`: this API key, verified user or organization used its request budget for the current window, or this address exceeded an IP/failed-auth limit. Wait `Retry-After` seconds, then retry. For authenticated quota denials, `RateLimit-Scope` identifies the denying quota and `RateLimit-Reset` reports its remaining window in seconds.
- `503`: `DNS_UNAVAILABLE`: Pantech DNS is not available on this deployment yet. Try again later.
`SERVICE_UNAVAILABLE`: request quota storage is unavailable. Wait a few seconds, then retry.
## Change many record sets at once

```http
POST /public/v1/dns/zones/{zone_id}/records/batch
```

Applies up to 1,000 creates, updates and deletes in one request, all or nothing: every change is checked against the zone as the earlier changes leave it, and if any is refused, nothing changes and the error names it (`changes[i]…`). They reach the DNS network together, as one change.

`create` takes `record`. `update` takes `record_id` and `record`, whose TTL, values, `allow_private` and comment replace the record set's (its name and type may be left out, and must match if sent). `delete` takes `record_id`. `version`, when sent, must be the record's current version. A batch with a delete needs, from an AI app's key, the `delete` scope too. Owners and admins only.

**Idempotency:** a retry with the same `Idempotency-Key` returns the record sets the first request changed, as they are now (a record set since deleted and removed is left out). The same key with a different request returns `409 IDEMPOTENCY_CONFLICT`. A key is remembered for 24 hours.

Scope: `write`. Send an `Idempotency-Key` header.

Path parameters:

- `zone_id`: The zone's id (`dnsz_…`).

Body:

- `changes` (array of DNSRecordChange, required): 1 to 1,000 changes, applied in order, all or nothing.
  - `action` (string, required): One of `create`, `update`, `delete`.
  - `record_id` (string): The record set an `update` or `delete` changes (`dnsr_…`).
  - `version` (integer): When sent, the record's current version: the change is refused with `412 VERSION_CONFLICT` otherwise. At least 1.
  - `record` (DNSRecordChangeRecord): The record set a `create` or `update` writes; a `delete` takes none. For `create`, `name`, `type` and `values` are required, as in *Create a record set*. For `update`, `name` and `type` may be left out (when sent they must be the record's own: a record set is never renamed or retyped), and the record set's TTL, values, `allow_private` and comment become exactly what is sent here: send `values`, and send `ttl` to keep a TTL other than the default 300.
    - `name` (string): Relative to the zone (`@`, `www`, `*.dev`, `_dmarc`), or fully qualified ending in the zone.
    - `type` (string): One of `A`, `AAAA`, `CNAME`, `MX`, `TXT`, `SRV`, `CAA`, `NS`, `PTR`.
    - `ttl` (integer): From 60 to 86400. Defaults to `300`.
    - `values` (array of string): 1 to 100 values in the type's format.
    - `allow_private` (boolean)
    - `comment` (string): At most 255 characters.

Example:

```sh
curl -X POST "https://api.pantechdynamics.com/public/v1/dns/zones/dnsz_06gk3x9tq7m2v8r4y1c5d0zp8w/records/batch" \
  -H "Authorization: Bearer $PANTECH_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "changes": [
      {
        "action": "create",
        "record_id": "dnsr_06gk3x9tq7m2v8r4y1c5d0zp8w",
        "version": 1,
        "record": {
          "name": "www",
          "type": "A",
          "ttl": 300,
          "values": [
            "values"
          ],
          "allow_private": true,
          "comment": "comment"
        }
      }
    ]
  }'
```

Response `202`:

```json
{
  "data": [
    {
      "id": "dnsr_06gk3x9tq7m2v8r4y1c5d0zp8w",
      "zone_id": "dnsz_06gk3x9tq7m2v8r4y1c5d0zp8w",
      "name": "www",
      "fqdn": "www.example.com",
      "type": "A",
      "ttl": 300,
      "values": [
        "<server-public-ip>",
        "<second-server-public-ip>"
      ],
      "allow_private": true,
      "comment": "comment",
      "managed": true,
      "status": "active",
      "failure_code": null,
      "version": 1,
      "created_at": "2026-10-03T09:30:00Z",
      "updated_at": "2026-10-03T09:30:00Z"
    }
  ]
}
```

Errors:

- `400`: `IDEMPOTENCY_KEY_REQUIRED`: the `Idempotency-Key` header is missing. Send a new unique value, such as a UUID, with every write.
`INVALID_IDEMPOTENCY_KEY`: the `Idempotency-Key` header is longer than 255 characters. Use a shorter value.
`INVALID_REQUEST_BODY`: the body is not a single valid JSON object. Send one JSON object with the fields documented for this endpoint.
- `401`: `UNAUTHENTICATED`: the request has no API key, or the key is mistyped, revoked or expired, or its creator has left the organization. Send `Authorization: Bearer PAN_…` with a valid key; create one in the console under Organization › API keys.
- `403`: `INSUFFICIENT_SCOPE`: the API key lacks the `write` scope. Use a key with that scope.
`FORBIDDEN`: the member who created the key is not an owner or admin. Use a key created by one.
`AI_APPS_DISABLED`: the organization has turned AI app access off, and this request was made with an AI app's key or sent by Pantech's MCP server. An owner can turn it on in the console under Organization › AI apps.
`INSUFFICIENT_SCOPE`: the batch deletes, and this AI app's key lacks `delete`.
`DNS_RECORD_LIMIT_REACHED`: the creates would take the zone past 10,000 record sets.
- `404`: `DNS_ZONE_NOT_FOUND`: no DNS zone with this id in your organization. List your zones to find it.
`RESOURCE_NOT_FOUND`: the id is not a DNS zone id (`dnsz_…`). Check the id.
`DNS_RECORD_NOT_FOUND`: a change's `record_id` names no record in this zone; `errors[0].field` is `changes[i].record_id`.
- `409`: `DNS_RECORD_EXISTS`, `DNS_CNAME_CONFLICT`, `DNS_RECORD_READ_ONLY` or `CONFLICT`: one change is refused, as for a single change; `errors[0].field` names it (`changes[i]`).
`IDEMPOTENCY_CONFLICT`: this `Idempotency-Key` was already used for a different request. Use a new key.
`DNS_ZONE_SUSPENDED`: an operator suspended the zone. Contact support.
`DNS_ZONE_NOT_WRITABLE`: the zone is being deleted or has failed. Create the zone again to manage its records.
- `412`: `VERSION_CONFLICT`: a change's `version` is not the record's current one; `errors[0].field` is `changes[i].version`.
- `413`: `REQUEST_TOO_LARGE`: the body is larger than 64 KiB. Send a smaller request.
- `422`: `TOO_MANY_CHANGES`: more than 1,000 changes. Split them into smaller batches.
`VALIDATION_FAILED`: a change is invalid. `field` names it inside the batch: `changes` `REQUIRED` (no changes), `changes[i].action` `INVALID_ACTION` (send `create`, `update` or `delete`), `changes[i].record_id` `REQUIRED`, `INVALID_RECORD_ID` or `DUPLICATE_RECORD` (a record may appear once per batch), `changes[i].record` `REQUIRED`, `changes[i].version` `INVALID_VERSION`, or `changes[i].record.<field>` with the codes of *Create a record set*.
`UNKNOWN_FIELD`: the body has a field this endpoint does not take (named in `field`). Remove it or fix its spelling.
- `429`: `RATE_LIMITED`: this API key, verified user or organization used its request budget for the current window, or this address exceeded an IP/failed-auth limit. Wait `Retry-After` seconds, then retry. For authenticated quota denials, `RateLimit-Scope` identifies the denying quota and `RateLimit-Reset` reports its remaining window in seconds.
- `503`: `DNS_UNAVAILABLE`: Pantech DNS is not available on this deployment yet. Try again later.
`SERVICE_UNAVAILABLE`: request quota storage is unavailable. Wait a few seconds, then retry.
## Export a zone file

```http
GET /public/v1/dns/zones/{zone_id}/export
```

The zone as a BIND zone file (RFC 1035 master file format), with absolute names, one line per value, sorted by name and type. Record sets being deleted are left out. Downloaded as `<zone>.zone`.

Scope: `read`.

Path parameters:

- `zone_id`: The zone's id (`dnsz_…`).

Example:

```sh
curl "https://api.pantechdynamics.com/public/v1/dns/zones/dnsz_06gk3x9tq7m2v8r4y1c5d0zp8w/export" \
  -H "Authorization: Bearer $PANTECH_API_KEY"
```

Response `200`: The zone file.

Errors:

- `401`: `UNAUTHENTICATED`: the request has no API key, or the key is mistyped, revoked or expired, or its creator has left the organization. Send `Authorization: Bearer PAN_…` with a valid key; create one in the console under Organization › API keys.
- `403`: `INSUFFICIENT_SCOPE`: the API key lacks the scope this endpoint needs (`read` for GET, `write` for changes; an AI app's key also needs `delete` for a destructive call). Use a key with that scope, or reconnect the AI app with "Manage and delete" access.
`FORBIDDEN`: the member who created the key may not do this in the organization. Use a key created by an owner or admin.
`AI_APPS_DISABLED`: the organization has turned AI app access off, and this request was made with an AI app's key or sent by Pantech's MCP server (`Pantech-Client: mcp/…`). An owner can turn it on in the console under Organization › AI apps.
- `404`: `DNS_ZONE_NOT_FOUND`: no DNS zone with this id in your organization. List your zones to find it.
`RESOURCE_NOT_FOUND`: the id is not a DNS zone id (`dnsz_…`). Check the id.
- `429`: `RATE_LIMITED`: this API key, verified user or organization used its request budget for the current window, or this address exceeded an IP/failed-auth limit. Wait `Retry-After` seconds, then retry. For authenticated quota denials, `RateLimit-Scope` identifies the denying quota and `RateLimit-Reset` reports its remaining window in seconds.
- `503`: `DNS_UNAVAILABLE`: Pantech DNS is not available on this deployment yet. Try again later.
`SERVICE_UNAVAILABLE`: request quota storage is unavailable. Wait a few seconds, then retry.
## Import a zone file

```http
POST /public/v1/dns/zones/{zone_id}/import
```

Reads a BIND zone file of up to 2 MiB and makes the zone match it: a name and type in the file that the zone has is updated when its TTL or values differ, one it does not have is created. `$ORIGIN`, `$TTL`, comments, relative names, `@`, omitted names and parenthesised records are understood; `$INCLUDE` and `$GENERATE` are not. The file's `SOA` and apex `NS` are ignored: Pantech manages them. With `replace: true`, record sets not in the file are deleted too, which needs, from an AI app's key, the `delete` scope.

At most 1,000 changes, applied all or nothing like a batch. Owners and admins only.

**Idempotency:** importing the same file again changes nothing and returns an empty list.

Scope: `write`. Send an `Idempotency-Key` header.

Path parameters:

- `zone_id`: The zone's id (`dnsz_…`).

Body:

- `zone_file` (string, required): A BIND zone file, at most 2 MiB.
- `replace` (boolean): Also delete record sets that are not in the file. Defaults to false.

Example:

```sh
curl -X POST "https://api.pantechdynamics.com/public/v1/dns/zones/dnsz_06gk3x9tq7m2v8r4y1c5d0zp8w/import" \
  -H "Authorization: Bearer $PANTECH_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "zone_file": "$ORIGIN example.com.\n$TTL 300\nwww IN A <server-public-ip>\n"
  }'
```

Response `202`:

```json
{
  "data": [
    {
      "id": "dnsr_06gk3x9tq7m2v8r4y1c5d0zp8w",
      "zone_id": "dnsz_06gk3x9tq7m2v8r4y1c5d0zp8w",
      "name": "www",
      "fqdn": "www.example.com",
      "type": "A",
      "ttl": 300,
      "values": [
        "<server-public-ip>",
        "<second-server-public-ip>"
      ],
      "allow_private": true,
      "comment": "comment",
      "managed": true,
      "status": "active",
      "failure_code": null,
      "version": 1,
      "created_at": "2026-10-03T09:30:00Z",
      "updated_at": "2026-10-03T09:30:00Z"
    }
  ]
}
```

Errors:

- `400`: `IDEMPOTENCY_KEY_REQUIRED`: the `Idempotency-Key` header is missing. Send a new unique value, such as a UUID, with every write.
`INVALID_IDEMPOTENCY_KEY`: the `Idempotency-Key` header is longer than 255 characters. Use a shorter value.
`INVALID_REQUEST_BODY`: the body is not a single valid JSON object. Send one JSON object with the fields documented for this endpoint.
- `401`: `UNAUTHENTICATED`: the request has no API key, or the key is mistyped, revoked or expired, or its creator has left the organization. Send `Authorization: Bearer PAN_…` with a valid key; create one in the console under Organization › API keys.
- `403`: `INSUFFICIENT_SCOPE`: the API key lacks the `write` scope. Use a key with that scope.
`FORBIDDEN`: the member who created the key is not an owner or admin. Use a key created by one.
`AI_APPS_DISABLED`: the organization has turned AI app access off, and this request was made with an AI app's key or sent by Pantech's MCP server. An owner can turn it on in the console under Organization › AI apps.
`INSUFFICIENT_SCOPE`: `replace` is true, and this AI app's key lacks `delete`.
`DNS_RECORD_LIMIT_REACHED`: the file would take the zone past 10,000 record sets.
- `404`: `DNS_ZONE_NOT_FOUND`: no DNS zone with this id in your organization. List your zones to find it.
`RESOURCE_NOT_FOUND`: the id is not a DNS zone id (`dnsz_…`). Check the id.
- `409`: `DNS_CNAME_CONFLICT`: the file puts a CNAME beside another record; `errors[0].field` names the change.
`DNS_ZONE_SUSPENDED`: an operator suspended the zone. Contact support.
`DNS_ZONE_NOT_WRITABLE`: the zone is being deleted or has failed. Create the zone again to manage its records.
- `413`: `REQUEST_TOO_LARGE`: the body is larger than 4 MiB. A zone file may be up to 2 MiB.
- `422`: `INVALID_ZONE_FILE`: the zone file does not parse, or a record in it is invalid. `errors[0]` (`field` `zone_file`) says which line or record and why.
`TOO_MANY_CHANGES`: the file would make more than 1,000 changes. Import it in parts.
`VALIDATION_FAILED`: `zone_file` `REQUIRED`.
`UNKNOWN_FIELD`: the body has a field this endpoint does not take (named in `field`). Remove it or fix its spelling.
- `429`: `RATE_LIMITED`: this API key, verified user or organization used its request budget for the current window, or this address exceeded an IP/failed-auth limit. Wait `Retry-After` seconds, then retry. For authenticated quota denials, `RateLimit-Scope` identifies the denying quota and `RateLimit-Reset` reports its remaining window in seconds.
- `503`: `DNS_UNAVAILABLE`: Pantech DNS is not available on this deployment yet. Try again later.
`SERVICE_UNAVAILABLE`: request quota storage is unavailable. Wait a few seconds, then retry.
