# DELETE /dns/distribution/zones/{name}

First published 12 Nov 2026 (release 0.2.28) · Unchanged since publication

UrbeStack release 0.2.35 API operation in the dns group.

Delete a distributed zone and its records

- Who may call it: anyone (no token needed)
- Answers: 200 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

- [urbestack-dns-client-note](https://urbestack.com/docs/commands/urbestack-dns-client-note.md): Records when a DNS client last called the API using its key.

## Example

Set $API to the base URL and $TOKEN to the token, as the [API overview](https://urbestack.com/docs/api.md) shows.

```
curl -sS -X DELETE "$API/dns/distribution/zones/{name}"
```

Response, 200 OK:

```
{
  "deleted": true,
  "dns": {},
  "zone": "text"
}
```

## Errors

- 400: --address is required
- 400: Domain name required
- 400: Domain name too long
- 400: Invalid IPv4 address
- 400: Invalid domain name
- 400: X-Urbestack-Address must carry the client's own IPv4 address
- 401: Unknown key
- 402: This node refuses changes: <why>
- 403: The call came from <remote> but the server says its address is <said>. A server behind NAT cannot be a client
- 403: This key belongs to the client at <c.address>, and the call came from <remote>
- 403: This server was removed from the distribution network on 
- 410: This server is no longer a node of the distribution network: it 
