Skip to content
handupbeta
Download

pair_exchange

View as Markdown
POST
/v1/pair/exchange

Remote listener only. Trades a one-time pairing code for a device token. Rate-limited per peer IP; every attempt counts.

Media typeapplication/json
object
code
required
string
name
string | null
cookie

Browser flow: set HttpOnly session cookies instead of returning the token.

boolean
Media typeapplication/json
object
device
required

A paired remote device. The bearer token itself is never stored; only its SHA-256 digest is (see remote::hash_token).

object
id
required
string
name
required
string
scope
required

view (read-only) or decide (adds decision, cancel and test requests).

string
enabled
required
boolean
push
required
boolean
created_at
required
integer format: int64
last_seen
integer | null format: int64
token

Long-lived device token (hu_ + 64 hex). Omitted in the cookie flow.

string | null
host

This computer’s name (its hostname), so a device paired with several computers can tell them apart. Absent when unknown.

string | null

Invalid, used, or expired code

Rate limited