# POST /dns/nodes

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

UrbeStack release 0.2.35 API operation in the dns group.

Invite a server to join the DNS distribution network as a node

- Who may call it: administrator
- Token scope, any of: dns, all
- Answers: 201 Created

Call as an administrator with a token that has the dns scope, on a node with a valid license and a configured web interface hostname. Supply the new node's licensed IPv4 address in address. UrbeStack notifies the other nodes and returns 201 with client, told, and the joining key in key. The joining key contains this node's licensed IPv4 address and is shown only once. Use it on the joining server with POST /dns/distribution/join, urbestack-dns-node-join, or Join as a node on the Distribution nodes tab of the DNS zones section.

Use nameserver to select the name the new node will answer for. If omitted, UrbeStack reserves the first available name for this server if needed and assigns the next available name to the new node, typically ns2 for the second node. If a third node needs a name and none is available, UrbeStack uses the next number when the names are numbered on the same domain, such as ns3 after ns1 and ns2. Supply nameserver if UrbeStack cannot select a default. For a new server, label defaults to its nameserver name.

A new server receives zones once it joins. An existing client keeps its label, client key, and zones while waiting and remains the origin of its zones after joining. Inviting that client again revokes its previous joining key and keeps its reserved nameserver unless you supply nameserver. To replace a key for a new server that is already waiting to join, use Generate new key in the pending node's details.

The operation returns 409 if the IPv4 address belongs to a joined node or a new server already waiting to join, if another node uses or has reserved the requested nameserver, if assigning the name would take this server's last nameserver, or if adding the node would exceed the limit of three nodes, including those waiting to join. Once the server joins, clients learn about it, and the new node receives and serves every zone on the network and can add and remove clients. Every zone lists the new nameserver, and this server updates the nameserver's IP address records to point to the new node. Update the host record at the registrar to match.

## As a command

- [urbestack-dns-node-add](https://urbestack.com/docs/commands/urbestack-dns-node-add.md): Registers another UrbeStack server as a node of this server's DNS distribution network and issues a joining key.

## Request body

JSON.

- `address` (string, required)
- `label` (string or null)
- `nameserver` (string or null)

## 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/nodes" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "address": "info@example.com",
    "label": "my laptop",
    "nameserver": "text"
  }'
```

Response, 201 Created:

```
{
  "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
  },
  "key": "panel.port",
  "told": [
    {
      "done": true,
      "error": "Domain 'example.com' already exists",
      "host": "text",
      "kind": "profile",
      "node": "text",
      "subject": "text"
    }
  ]
}
```

## Errors

- 400: --address is required
- 400: <address> is this server's own address
- 400: A node needs the nameserver name it will answer for
- 400: Domain name required
- 400: Domain name too long
- 400: Invalid IPv4 address
- 400: Invalid IPv6 address
- 400: Invalid domain name
- 400: Invalid label: 1 to 64 printable ASCII characters
- 400: Invalid port
- 400: Invalid setting key
- 401: Authentication required
- 404: Setting '<key>' not found
- 409: <address> has already been added as a node but has not joined yet. To replace its key, open the pending node's details and choose Generate new key
- 409: <address> is already a node of this network and answers for 
- 409: <c.address> joined the network already: it is a node, not one that waits
- 409: <ns> is the only nameserver name this server answers for. The new node needs a name of its own
- 409: A client already exists for <address> (label: <was.label>; 
- 409: No joining key waits for <c.address>
