Get your free beta license ↗
API operation · dns group
DELETE

/dns/distribution/zones/{name}

First published 12 Nov 20260.2.28Unchanged since publication

Delete a distributed zone and its records

Who may call it
Anyone (no token needed)
Token
none
Answers200 OK

Authenticate with the DNS distribution client key in the Authorization: Bearer KEY header. Send the client's registered IPv4 address in X-Urbestack-Address. The request must originate from that IPv4 address. On success, the response includes zone, deleted set to true, and dns.

A missing or invalid IPv4 address in X-Urbestack-Address returns 400. A mismatch between the request's source IP address and either the header or the client's registered IPv4 address returns 403. A node whose license prevents changes returns 402.

A missing, malformed, or unrecognized key returns 401. For seven days after a client is removed, its key returns 403 with removal details in removed. For seven days after the receiving server leaves or is removed from the network, it returns 410 to clients with recognized keys. The left field in that response includes departure details and the remaining nodes.

Only the client that supplied the zone can delete it. Returns 404 if the zone is absent, held for another client, or owned by the server. UrbeStack attempts to record license, IP address, and deletion refusals in the Clients tab, retaining up to 300 characters of the reason.

As a command

Run as root on the server

Example

See the API overview for how to set $API and $TOKEN.
Request
curl -sS -X DELETE "$API/dns/distribution/zones/{name}"
Response · 200 OK
{
  "deleted": true,
  "dns": {},
  "zone": "text"
}

Errors

12 errors, each a status and a sentence
400--address is required
400Domain name required
400Domain name too long
400Invalid IPv4 address
400Invalid domain name
400X-Urbestack-Address must carry the client's own IPv4 address
401Unknown key
402This node refuses changes: <why>
403The call came from <remote> but the server says its address is <said>. A server behind NAT cannot be a client
403This key belongs to the client at <c.address>, and the call came from <remote>
403This server was removed from the distribution network on
410This server is no longer a node of the distribution network: it
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.28 on 12 Nov 2026.
urbestack.com/docs/api/delete-dns-distribution-zones-name/