Mint a pairing code
Creates a single-use code, claimable for five minutes, and the offer URL the dashboard renders as a QR code. The secret travels in the URL fragment so it never reaches a server log. Requires a signed-in session: a paired device may not mint another code, which is what stops a stolen phone from cloning itself. Requires the **viewer** role. An optional client UUID lets the caller check or cancel the exact code after a lost response. Reusing an existing UUID never reissues its secret.
In: cookie
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/api/pair/codes" \ -H "Content-Type: application/json" \ -d '{}'{ "id": "string", "secret": "string", "expiresAt": "2019-08-24T14:15:22Z", "offerUrl": "string"}Claim a pairing code POST
Exchanges a pairing secret for a long-lived device token. Unauthenticated by necessity and rate limited hard. Wrong, expired, and already-claimed codes all answer identically, so a caller with no credential learns nothing from the difference.
Cancel a pairing code DELETE
Stops a code being claimable. Requires the **viewer** role.