---
title: "Pair a node the control plane can reach: returns the command to run on it. The control plane then dials the node until it answers or the pairing expires (30 minutes)."
method: POST
path: "/nodes/pairings"
tags: ["Nodes"]
---

# Pair a node the control plane can reach: returns the command to run on it. The control plane then dials the node until it answers or the pairing expires (30 minutes).

`POST /nodes/pairings`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/nodes/pairings`
- Auth: HTTP bearer

## Request body

- CreateNodePairingRequest: Start pairing a node.
  - `address` string, required: The node's public address, `ip` or `ip:port`. The control plane dials it on the mesh UDP port (or the port given).
  - `name` string, nullable: Name the node registers under. Defaults to `worker-<random>`.

## Response `201`

Pairing created

- CreateNodePairingResponse: A new pairing and the one command to run on the node. The command holds a secret and is returned only here.
  - `join_command` string, required: Run this on the node (a Linux machine; it uses sudo where it needs root). It installs Temps pinned to the release this server runs, pipes the pairing code into `temps join --pair -` (so the code stays out of the process list, sudo's log and the shell history), then installs the agent service.
  - `pairing` NodePairingResponse, required: A pairing as the Worker Nodes page shows it.
    - `created_at` string, required
    - `expires_at` string, required
    - `id` integer, required
    - `last_attempt_at` string, nullable
    - `last_error` string, nullable: Why the last attempt to reach the node failed.
    - `last_rejection` string, nullable: Why the control plane last refused the node's key (e.g. it belongs to another node). Kept until a key is accepted, so it outlives the "no answer" attempts after the refused node stopped.
    - `mesh_address` string, required: Mesh address reserved for the node.
    - `name` string, required
    - `node_endpoint` string, nullable: `ip:port` the control plane dials; `null` for a worker that joined outbound only (ADR 055): it dials the control plane instead.
    - `node_id` integer, nullable: The node that registered with this pairing.
    - `status` string, required: `waiting` (dialing the node), `key_received` (the node answered; it is registering over the mesh), `completed`, `expired` or `cancelled`.

## Other responses

- `400`: Invalid address or name
- `401`: Unauthorized
- `403`: Insufficient permissions
- `409`: The mesh is off or its control-plane end is not up
- `428`: Re-authentication required
- `500`: Internal server error

## Changes

- **2026-10-23** `7d41b820a372`: 2 breaking
  - the response property `pairing/node_endpoint` became nullable for the status `201`
  - the response property `pairing/node_endpoint` became optional for the status `201`
- **2026-10-23** `24af93ff5379`: 1 info
  - the response property `pairing/node_endpoint` became required for the status `201`
- **2026-10-22** `4c5618818e6d`: 2 breaking
  - the response property `pairing/node_endpoint` became nullable for the status `201`
  - the response property `pairing/node_endpoint` became optional for the status `201`
- **2026-10-22** `add7f7b41ae2`: 1 info
  - the response property `pairing/node_endpoint` became required for the status `201`
- **2026-10-22** `eb81785fa098`: 2 breaking
  - the response property `pairing/node_endpoint` became nullable for the status `201`
  - the response property `pairing/node_endpoint` became optional for the status `201`

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/nodes/pairings/post.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
