---
title: "Validate DNS records"
method: POST
path: "/api/dns/v1/zones/{domain}/validate"
tags: ["DNS: Zone"]
---

# Validate DNS records

`POST /api/dns/v1/zones/{domain}/validate`

Validate DNS records prior to update for the selected domain.

If the validation is successful, the response will contain `200 Success` code.
If there is validation error, the response will fail with `422 Validation error` code.

Use this endpoint to verify DNS record validity before applying changes.

## Path parameters

- `domain` string, required

## Request body

- DNSV1ZoneUpdateRequest
  - `overwrite` boolean — If `true`, resource records (RRs) matching name and type will be deleted and new RRs will be created, otherwise resource records' ttl's are updated and new records are appended. If no matching RRs are found, they are created.
  - `zone` object[], required
    - `name` string, required — Name of the record (use `@` for wildcard name)
    - `records` object[], required — Records assigned to the name
      - `content` string, required — Content of the name record
    - `ttl` integer — TTL (Time-To-Live) of the record
    - `type` 'A' | 'AAAA' | 'CNAME' | 'ALIAS' | 'MX' | 'TXT' | 'NS' | 'SOA' | 'SRV' | 'CAA', required — Type of the record

## Response `200`

Success response

- CommonSuccessEmptyResource
  - `message` string

## Other responses

- `401` — Unauthenticated response
- `422` — Validation error response
- `500` — Error response

---

[API](https://skmtc.net/hostinger/apis/hostinger-api.md) · [All operations](https://skmtc.net/hostinger/apis/hostinger-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/hostinger/hostinger-api/versions/796bd5194565/schema)
