Update DNS records
Update DNS records for the selected domain.
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
domainstringRequiredExample:
Domain name
mydomain.tldBody
overwritebooleanOptionalDefault:
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.
trueExample: trueResponses
200
Success response
application/json
messagestringOptionalExample:
Request accepted401
Unauthenticated response
application/json
422
Validation error response
application/json
500
Error response
application/json
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?