API operation · dns group
POST
/dns/zones/{name}/ttl
First published 14 Oct 2026
0.2.0Unchanged since publicationSet TTLs for multiple records in a DNS zone
Who may call it
AdministratorResellerCustomer
Token scope, any of
dnsallAnswers200 OK
Set ttl to a number of seconds, or pass null to clear the per-record TTLs and use the zone's $TTL (dns.ttl). The operation changes only the TTL of individually editable records. The server's own records and any record IDs listed in skip are excluded. A missing ttl or a skip value other than an array or null returns 400.
If any TTL changes, UrbeStack assigns a new zone serial and reloads the DNS server. The 200 response includes the publication outcome.
As a command
Run as root on the serverParameters
namepath ·DomainNameRequiredttlinteger, 0 or more or nullRequiredTTL in seconds to set on every selected record, or null to use the zone's $TTL.
skiparray of integerIDs of records to leave unchanged, corresponding to the records deselected in the web interface.
Example
See the API overview for how to set $API and $TOKEN.Request
curl -sS -X POST "$API/dns/zones/example.com/ttl" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"skip": [
1
],
"ttl": 1
}'Response ·
200 OK{
"changes": [
{
"from": 1,
"id": 1,
"name": "alice",
"to": 1,
"type": "rebuild"
}
],
"published": true,
"records": 1,
"reload": "text",
"skipped": 1,
"ttl": 1,
"unchanged": 1,
"zone": "text"
}Errors
12 errors, each a status and a sentence400--ttl SECONDS or --default is required400--ttl and --default do not go together400--zone is required400<what> must be a number of seconds from 1 to 604800400Domain name required400Domain name too long400Invalid domain name400Invalid id400body is missing required field ttl (seconds, or null for the zone's <TTL>)400skip is a list of record ids401Authentication required404Zone '<name>' not foundNo error of this operation matches.
Generated from release 0.2.35 (current) · the API’s own descriptionThis entry has been unchanged since it was first published in release 0.2.0 on 14 Oct 2026.
urbestack.com/docs/api/post-dns-zones-name-ttl/