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

Create or replace a DNS distribution client or node entry

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

When a network node adds or changes a client or node, it sends the complete entry to the other nodes. Use the licensed IPv4 address of the client or node as {address}. The receiving node replaces the entry while retaining its locally recorded last call time and refusal reason. The response includes client and created. Creation returns 201 with created set to true. Replacement returns 200 with created set to false.

Send the calling node's DNS distribution key as the bearer credential in the Authorization header. Both X-Urbestack-Address and the request's source IPv4 address must match the calling node's licensed IPv4 address registered for the key. A client key or an IPv4 address mismatch returns 403. A missing or invalid X-Urbestack-Address or use of the receiving node's own IPv4 address as {address} returns 400. A missing or unrecognized key returns 401. A license refusal on the receiving node returns 402. A key already assigned to another entry or an attempt to add a fourth node returns 409.

For seven days after a key is removed, the receiving node returns 403 for that key with details in removed. For seven days after the receiving server leaves or is removed from the network, it returns 410 for keys it still recognizes, with departure details and the remaining nodes in left.

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

## Request body

JSON, the type [DnsClientRow](https://urbestack.com/docs/api/types/DnsClientRow.md).

- `key_hash` (string, matching ^[0-9a-f]{64}$, required): SHA-256 hash of the key's secret, encoded as 64 lowercase hexadecimal characters.
- `also_nameservers` (array of string): Nameserver names of departed nodes that this node serves alongside its own because it was the first node to remain in the network.
- `created_by` (string or null): Administrator who created the entry on the sending node.
- `disconnected_at` (string or null): Time the client disconnected and left its zones on the network, in UTC using YYYY-MM-DDTHH:MM:SSZ. This field is omitted or null for a connected client.
- `hostname` (string or null)
- `invite_hash` (string, matching ^[0-9a-f]{64}$ or null): SHA-256 hash of the joining key's secret, encoded as 64 lowercase hexadecimal characters. Applies to a client invited to join as a node while the invitation is pending.
- `invite_nameserver` (string or null): Nameserver name the invited client will serve once it joins as a node.
- `ipv4` (string or null)
- `ipv6` (string or null)
- `joined_at` (string or null): Time the node joined the network, in UTC using YYYY-MM-DDTHH:MM:SSZ.
- `label` (string): Label assigned by the administrator. For a node, the label defaults to its nameserver name if omitted.
- `nameserver` (string or null): Nameserver name served by the node. Required for a node.
- `node` (boolean): Whether the entry represents a network node. A value of false indicates a client.
- `port` (integer or null): Port on which the node's UrbeStack instance responds.

## 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 PUT "$API/dns/distribution/clients/{address}" \
  -H "Content-Type: application/json" \
  -d '{
    "also_nameservers": [
      "text"
    ],
    "created_by": "text",
    "disconnected_at": "text",
    "hostname": "server.example.com",
    "invite_hash": "text",
    "invite_nameserver": "text",
    "ipv4": "text",
    "ipv6": "text",
    "joined_at": "text",
    "key_hash": "text",
    "label": "my laptop",
    "nameserver": "text",
    "node": true,
    "port": 8443
  }'
```

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
  },
  "created": true
}
```

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