---
title: "Get all DNS records for a zone"
method: GET
path: "/v1/hosting/zone/{zone_id}/records"
tags: ["Zone"]
---

# Get all DNS records for a zone

`GET /v1/hosting/zone/{zone_id}/records`

## Request

- Base URL: `https://api.10web.io`
- URL: `https://api.10web.io/v1/hosting/zone/{zone_id}/records`
- Auth: none declared. Required headers: `x-api-key`
- TypeScript: <https://skmtc.dev/10web/apis/10web-api-v1/docs/v1/hosting/zone/:zone_id/records/get.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `zone_id` integer, required

## Headers

- `x-api-key` string, required

## Response `200`

List of DNS records for the zone

- object
  - `status` 'ok' | 'error'
  - `data` Record[]
    - `id` integer: The ID of the record
    - `name` string: The name of the record (FQDN)
    - `value` string: The value of the record
    - `type` 'SOA' | 'A' | 'TXT' | 'NS' | 'CNAME' | 'MX' | 'NAPTR' | 'PTR' | 'SRV' | 'SPF' | 'AAAA' | 'CAA': The type of the record (A, AAAA, CNAME, MX, etc.)
    - `ttl` integer: Time-to-live in seconds
    - `priority` integer, nullable: Priority field (used for MX and SRV records)
    - `port` integer, nullable: Port field (used for SRV records)
    - `weight` integer, nullable: Weight field (used for SRV records)

## Other responses

- `403`: Unauthorized access
- `429`: Too many requests
- `500`: Something went wrong

---

[API](https://skmtc.dev/10web/apis/10web-api-v1.md) - [All operations](https://skmtc.dev/10web/apis/10web-api-v1/llms.txt) - [OpenAPI document](https://skmtc.dev/10web/apis/10web-api-v1/revisions/01afc9651dfc?raw)
