API reference
App pairing API
How `npx @clipmux/node init` gets an app's credentials without anyone copying a secret.
None of these routes needs a key.
Start an app pairing (npx @clipmux/node init)
POST /v1/app-pairings
Starts a pairing: show the code and open verify_url, where the owner checks the code and approves. The code works for 10 minutes. 429 too_many_pairings while 10 wait for the owner.
Authentication: None.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | no | |
hostname | string | no | |
client | string | no |
{
"name": "Course site",
"hostname": "laptop.local",
"client": "@clipmux/node 0.1.0"
}Response 201
Show code; open verify_url; poll
{
"code": "KXFT-9M2Q",
"poll_token": "K4M2QX7R3VZ6W5TYBJ2C3DNF7G",
"verify_url": "https://video.example.com/connect?code=KXFT-9M2Q",
"expires_at": "2026-11-18T09:40:00Z",
"interval_seconds": 2
}Errors
| Status | Code |
|---|---|
| 400 | invalid_request |
| 429 | rate_limited |
| 429 | too_many_pairings |
Poll an app pairing
POST /v1/app-pairings/poll
Poll every interval_seconds. The first poll after approval carries credentials, and is the only one that ever does: they are deleted as they are returned, so a later poll is 404 pairing_not_found.
Authentication: None.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
poll_token | string | yes |
{
"poll_token": "K4M2QX7R3VZ6W5TYBJ2C3DNF7G"
}Response 200
The first poll after approval carries credentials, once
{
"status": "pending"
}Errors
| Status | Code |
|---|---|
| 400 | invalid_request |
| 404 | pairing_not_found |
| 429 | rate_limited |