# POST /dns/clients

First published 21 Oct 2026 (release 0.2.13) · Unchanged since publication

UrbeStack release 0.2.35 API operation in the dns group.

Register an UrbeStack server as a DNS distribution client

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

Supply the client's licensed IPv4 address and a label of 1 to 64 printable ASCII characters. Requests authenticated with the key must originate from that IPv4 address. Once connected, the client sends its zones to this server, whose nameservers serve them.

The response returns the registered client, the key and the propagation results in told. The key is shown only in this response. It lists every node in the network and includes this server's licensed IPv4 address, web interface port and hostname, and a secret. The client uses the hostname to verify this server's certificate. UrbeStack stores the secret as a hash. Paste the key into the Distribution nodes tab in the client's DNS zones section, or supply it to the client's installer. To replace an existing key and retain the client's zones, use Generate new key in the client's details or run urbestack-dns-client-key.

This server must be a distribution node. A server that sends its own zones to a distribution node returns 409. A missing licensed IPv4 address or a license refusal returns 402, and a missing web interface hostname returns 400. UrbeStack rejects this server's own IPv4 address and returns 409 for an IPv4 address already registered to a client or node.

## As a command

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

## Request body

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

- `address` (string, required): Licensed IPv4 address of the client. Every call made with the client's key must originate from this IP address.
- `label` (string, required)

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

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 and --label are 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: <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>; 
