# DELETE /dns/distribution/clients/{address}

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

UrbeStack release 0.2.35 API operation in the dns group.

Remove a DNS distribution client or node, or disconnect as a client

- Who may call it: anyone (no token needed)
- Answers: 200 OK

Send the caller's DNS distribution key as a Bearer credential in the Authorization header. X-Urbestack-Address must contain the caller's registered IPv4 address, which must match the request's source IPv4 address. An unknown key returns 401, a license refusal returns 402, a missing or invalid X-Urbestack-Address returns 400, and an IPv4 address mismatch returns 403.

A client can disconnect itself by using its own key and IPv4 address. The default, zones=keep, retains its zones under its client entry and records when it disconnected. Use zones=delete to remove the entry and its zones. Either choice revokes the client's key, and this node sends the disconnection to the other nodes. Other requests made with a client's key return 403.

A node in this server's network can remove a client or another node. The default, zones=delete, deletes its zones, zones=hand transfers them to the client specified by to before removal, and zones=keep retains a removed node's zones. A node attempting to remove itself receives 400 and must use the network leave operation. An unsupported zones value returns 400. The response identifies the affected client or node and zones, gives the number of zones deleted and reports the DNS update result. It includes handed_to for node-authenticated removals and disconnected for a client's own disconnect.

For seven days after a key is revoked through removal, it can receive 403 with the removal details. For seven days after this server leaves or is removed from the network, recognized keys receive 410 with the departure time, what happened to the zones and the remaining nodes.

## 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.

## Parameters

- `zones` (query, string, one of delete, hand, keep)
- `to` (query, string): IPv4 address of the registered client that receives the zones. Required when zones=hand.

## 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/clients/{address}?zones=delete&to=text"
```

Response, 200 OK:

```
{
  "client": {
    "address": "info@example.com",
    "also_nameservers": [
      "text"
    ],
    "created_at": "2026-09-09T10:15:00Z",
    "created_by": "text",
    "created_on": "text",
    "disconnected_at": "text",
    "hostname": "server.example.com",
    "ipv4": "text",
    "ipv6": "text",
    "joined_at": "text",
    "joining_as": "text",
    "label": "my laptop",
    "last_error": "text",
    "last_seen_at": "text",
    "nameserver": "text",
    "node": true,
    "port": 8443,
    "zones": 1
  },
  "deleted": 1,
  "disconnected": true,
  "dns": {},
  "handed_to": "text",
  "zones": [
    "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
- 400: zones is delete, hand or keep
- 400: zones is keep or delete
- 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 
