# POST /dns/distribution/join

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

UrbeStack release 0.2.35 API operation in the dns group.

Join a DNS distribution network as a node

- Who may call it: administrator
- Token scope, any of: dns, all
- Answers: 200 OK

Call as an administrator with a token that has the dns scope. This server needs a configured web interface hostname and a licensed IPv4 address on record. Use a joining key issued for that IPv4 address by an existing node. The key contains the nodes' IPv4 addresses, ports, and hostnames. It starts with usk_ followed by 20 to 2048 ASCII letters, digits, underscores, or hyphens. Leading and trailing whitespace is allowed. A missing or malformed key returns 400. Run urbestack-license-check if this server's licensed IPv4 address is missing.

Set check=true for a read-only preview. UrbeStack checks the nodes listed in the key and any other nodes they report. At least one node must respond. A responding node can refuse the join if it does not recognize the key or both servers claim the same zone as their own. A client can join only the network it already sends zones to. To join a different network, disconnect first. An existing node must leave its network or stop it if it is the only node. Frozen zones from a network this server left also prevent it from joining. The check has a 120-second time limit. On success it returns 200 with joined set to false, was_client, the proposed nameserver, the network's nameservers and nodes, not_reached, and overlaps.

With check omitted or false, this server becomes a node as soon as one node accepts it. It receives the network's client list, switches its zones to the network's nameservers, and saves its previous nameserver settings for when it leaves. An existing client's zones retain this server as their origin. The join has a 240-second time limit before UrbeStack queues the dns-push job to publish this server's zones to the other nodes. The operation returns 202 with joined set to true, was_client, nameserver, nameservers, nodes, the number of clients in clients, and the job in job.

Unreachable nodes are reported in nodes, and UrbeStack retries them and completes their joins when they respond. The other nodes send their zones to this server. Clients learn about the new node within an hour and send their zones to it. The new node serves every zone on the network and can add and remove clients.

## As commands

- [urbestack-dns-node-join](https://urbestack.com/docs/commands/urbestack-dns-node-join.md): Joins this server to a DNS distribution network as a node.
- [urbestack-dns-push](https://urbestack.com/docs/commands/urbestack-dns-push.md): Sends pending zone updates and deletions to this server's DNS distribution nodes.

## Request body

JSON.

- `key` (string, required)
- `check` (boolean)

## 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 POST "$API/dns/distribution/join" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "check": true,
    "key": "panel.port"
  }'
```

Response, 200 OK:

```
{
  "joined": true,
  "nameserver": "text",
  "nameservers": [
    "text"
  ],
  "nodes": [
    {
      "address": "info@example.com",
      "hostname": "server.example.com",
      "nameservers": [
        "text"
      ]
    }
  ],
  "not_reached": "text",
  "overlaps": [
    {
      "name": "alice",
      "relation": "same",
      "server": "text",
      "zone": "text"
    }
  ],
  "was_client": true
}
```

## Errors

- 400: --key or --key-stdin is required
- 400: A new job is queued or running
- 400: Domain name required
- 400: Domain name too long
- 400: Invalid <what>: 
- 400: Invalid domain name
- 400: Invalid username: 2 to 32 lowercase letters, digits or underscores, starting with a letter
- 400: Job parameters must be an object
- 400: This is not a joining key. A key starts with usk_ and comes from Add a node, on the Distribution nodes tab of one of the network's nodes
- 400: This is not a joining key. It does not carry the address, port and hostname of each node
- 400: This key names this server's own address, <me>, as a node of the network. Use it on the server it was generated for
- 400: Unknown job type
- 400: Username '<value>' is reserved
- 401: Authentication required
- 402: This server has no licensed address on record yet: run urbestack-license-check first
- 404: User '<user>' not found
- 409: This server is already a distribution node. To join another network, it must first leave its current network or, if it is the only node, stop that network
- 409: This server sends its zones to 
