Get your free beta license ↗
API operation · dns group
POST

/dns/distribution/connect

First published 12 Nov 20260.2.28Unchanged since publication

Connect this server to a DNS distribution network

Who may call it
AdministratorResellerCustomer
Token scope, any of
dnsall
Answers200 OK

Generate a key for this server's licensed IPv4 address in the Clients tab of the DNS zones section on any node. If this server has no licensed IPv4 address on record, run urbestack-license-check first. The key lists each node's IPv4 address, port, and hostname. It starts with usk_ followed by 20 to 2048 ASCII letters, digits, underscores, or hyphens. Surrounding whitespace is allowed.

A malformed key returns 400. UrbeStack refuses keys that list this server as a node. An existing node must leave its network or stop the network if it is the only node before connecting as a client. UrbeStack contacts every node in the key and needs at least one to accept it. If every node is unreachable, the operation returns 502. If no node accepts the key and a node refuses it, the operation returns the node's 401, 402, or 403.

Set check to true to preview the connection without saving the key or sending zones. The first node to accept the key reports local zones whose names match, are subdomains of, or are parents of zones the network holds for another server. Overlaps are allowed. The preview returns 200 with connected set to false, nodes, and overlaps.

A connection saves the key and returns 202 with connected set to true and job for tracking the initial dns-push job. The job sends every local zone to each node, one request per zone and node. UrbeStack then sends changes as they occur. The timer retries unreachable nodes, nodes that refused the key, and failed deliveries. Replies from the network can identify nodes added later.

As commands

Run as root on the server

Request body

JSON ·DnsDistributionConnect· 2 fields
keystringRequired
Key from the DNS server's Clients tab, with the usk_ prefix followed by a base64url-encoded value.
checkboolean
Whether to query the nodes named in the key for a preview without saving any changes.

Example

See the API overview for how to set $API and $TOKEN.
Request
curl -sS -X POST "$API/dns/distribution/connect" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "check": true,
    "key": "panel.port"
  }'
Response · 200 OK
{
  "connected": true,
  "nodes": [
    {
      "address": "info@example.com",
      "host": "text",
      "port": 8443
    }
  ],
  "overlaps": [
    {
      "name": "alice",
      "relation": "same",
      "server": "text",
      "zone": "text"
    }
  ]
}

Errors

21 errors, each a status and a sentence
400--key or --key-stdin is required
400A new job is queued or running
400Domain name required
400Domain name too long
400Invalid <what>:
400Invalid IPv4 address
400Invalid IPv6 address
400Invalid domain name
400Invalid port
400Invalid setting key
400Invalid username: 2 to 32 lowercase letters, digits or underscores, starting with a letter
400Job parameters must be an object
400This is not a key from an UrbeStack distribution network. A key starts with usk_ and comes from the Clients tab of one of the network's nodes
400This is not a key from an UrbeStack distribution network. It does not carry the address, port and hostname of each node
400This key names this server's own address, <me>, as a node of the network. Use it on the server it was generated for
400Unknown job type
400Username '<value>' is reserved
401Authentication required
402This server has no licensed address on record yet: run urbestack-license-check first
404Setting '<key>' not found
404User '<user>' not found
Generated from release 0.2.35 (current) · the API’s own descriptionThis entry has been unchanged since it was first published in release 0.2.28 on 12 Nov 2026.
urbestack.com/docs/api/post-dns-distribution-connect/