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

Update DNS records

Update DNS records for the selected domain.

Update DNS records

put

Update DNS records for the selected domain.

Using overwrite = true will replace existing records with the provided ones. Otherwise existing records will be updated and new records will be added.

Use this endpoint to modify domain DNS configuration.

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
put/api/dns/v1/zones/{domain}
PUT /api/dns/v1/zones/{domain} 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?