Skip to content

DNS

DELETE /v1/dns/zones/{zone}/records/{name}/{type} · scope dns:write · destructive — cannot be undone · idempotent

Deletes every value for that name and type.

Terminal window
curl https://api.truo.cloud/v1/dns/zones/example.com/records/www/A \
-X DELETE \
-H "Authorization: Bearer $TRUO_TOKEN"

operationId: dns.records.delete

GET /v1/dns/zones/{zone}/records/{name}/{type} · scope dns:read

Terminal window
curl https://api.truo.cloud/v1/dns/zones/example.com/records/www/A \
-H "Authorization: Bearer $TRUO_TOKEN"

operationId: dns.records.get

GET /v1/dns/zones/{zone}/records · scope dns:read

Grouped into RRsets: an A record with two IPs is one record with two values. The response carries an ETag; pass it as If-Match when writing and no concurrent change gets lost.

Terminal window
curl https://api.truo.cloud/v1/dns/zones/example.com/records \
-H "Authorization: Bearer $TRUO_TOKEN"

operationId: dns.records.list

PATCH /v1/dns/zones/{zone}/records · scope dns:write · destructive — cannot be undone · idempotent

Each element replaces its RRset; values: [] deletes it. It is how you apply a coherent change —moving a site and its mail together— without it landing halfway between two calls. It is not atomic in the backend: if one change fails, the earlier ones were already applied and the response says which one stopped.

Terminal window
curl https://api.truo.cloud/v1/dns/zones/example.com/records \
-X PATCH \
-H "Authorization: Bearer $TRUO_TOKEN" \
-H "Content-Type: application/json" \
-d '{"records":[]}'

operationId: dns.records.patch

PUT /v1/dns/zones/{zone}/records/{name}/{type} · scope dns:write · reversible · idempotent

Replaces the entire RRset: values missing from values are deleted. That is DNS semantics and the backend’s — there is no “add an IP” without rewriting the set. Read the RRset, add the value to the list, and send the full list with the ETag in If-Match.

Terminal window
curl https://api.truo.cloud/v1/dns/zones/example.com/records/www/A \
-X PUT \
-H "Authorization: Bearer $TRUO_TOKEN" \
-H "Content-Type: application/json" \
-d '{"values":[]}'

operationId: dns.records.put

GET /v1/dns/zones/{zone}/export · scope dns:read

The zone file exactly as the backend emits it. Useful for backup or migration.

Terminal window
curl https://api.truo.cloud/v1/dns/zones/example.com/export \
-H "Authorization: Bearer $TRUO_TOKEN"

operationId: dns.zones.export

GET /v1/dns/zones/{zone} · scope dns:read

Terminal window
curl https://api.truo.cloud/v1/dns/zones/example.com \
-H "Authorization: Bearer $TRUO_TOKEN"

operationId: dns.zones.get

GET /v1/dns/zones · scope dns:read

Served from the database, without querying the DNS backend: record_count and serial come back null. Fetching them would cost one call per zone, and some accounts have dozens.

Terminal window
curl https://api.truo.cloud/v1/dns/zones \
-H "Authorization: Bearer $TRUO_TOKEN"

operationId: dns.zones.list