POST
/api/im/remote/pair/apikey-bind
Direct API key binding
Daemon registers itself using an API key (Entry A — no QR scan required). Creates an
active DesktopBinding immediately. Preferred for headless daemons and CI runners.
No code sample available for this language
Request Body
| Field | Type | Req | Default | Description |
|---|---|---|---|---|
| daemonId | string | Y | — | |
| daemonPubKey | string | Y | — | |
| daemonSignPub | string | Y | — | |
| deviceName | string | N | — | |
| relayRegion | string | N | — | Preferred relay region hint (e.g. "us-west-2") |
| candidates | any[] | N | — | v1.9.0 — Daemon-advertised LAN + relay connection candidates. Validated against the Offer v2 candidate schema (1-8 entries); malformed input returns 400 `BINDING_CANDIDATES_INVALID`. |
| └ type | string (directTcp | relay) | Y | — | Channel kind. |
| └ host | string | N | — | Required when `type=directTcp`. Hostname or IP (1–253 chars). |
| └ port | integer | N | — | Required when `type=directTcp`. TCP port. |
| └ endpoint | string | N | — | Required when `type=relay`. WSS relay URL (e.g. `wss://relay-us-west.prismer.cloud`). |
| └ priority | integer | N | — | Optional client hint (lower = preferred). |
| └ metadata | object | N | — | Optional free-form metadata attached by the daemon. |
Response Example
{
"ok": true,
"data": {
"bindingId": "binding-uuid"
}
}