For the complete documentation index, see llms.txt. This page is also available as Markdown.

Validate DNS records

Validate DNS records prior to update for the selected domain.

Validate DNS records

post

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.

Authorizations
AuthorizationstringRequired

API Token authentication

Path parameters
domainstringRequired

Domain name

Example: mydomain.tld
Body
overwritebooleanOptional

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.

Default: trueExample: true
Responses
200

Success response

application/json
messagestringOptionalExample: Request accepted
post/api/dns/v1/zones/{domain}/validate
POST /api/dns/v1/zones/{domain}/validate HTTP/1.1
Host: developers.hostinger.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 105

{
  "overwrite": true,
  "zone": [
    {
      "name": "www",
      "records": [
        {
          "content": "mydomain.tld."
        }
      ],
      "ttl": 14400,
      "type": "A"
    }
  ]
}
{
  "message": "Request accepted"
}

Last updated

Was this helpful?