Skip to main content
The devices API manages the Ed25519-based device identity system and the pairing code flow for authorizing new devices without a username/password.

Device Identity

Each profClaw instance generates a unique Ed25519 key pair on first run (src/auth/device-identity.ts). The public key serves as the device’s identity for attestations and pairing.

GET /api/devices/identity

Get the current device’s public identity.
Response 200

POST /api/devices/attest

Create a signed attestation for the current device.
Response 200

POST /api/devices/verify

Verify an attestation from another device.

Pairing Codes

Pairing codes let a new device (phone, second computer) connect to profClaw without password entry.

POST /api/devices/pairing/request

Request a pairing code from the new device side.
Response 200
Codes expire after 10 minutes.

POST /api/devices/pairing/approve

Approve a pending pairing request (from the already-trusted device).

POST /api/devices/pairing/reject

Reject a pairing request.

GET /api/devices/pairing/status/:requestId

Check if a pairing request has been approved.
Response 200

GET /api/devices/pairing/pending

List all pending pairing requests (admin only).

QR Pairing

For mobile/desktop onboarding without typing codes:

GET /api/devices/pairing/qr

Generate a QR code for the pairing flow.
Response 200
Display the SVG to the user and poll GET /api/devices/pairing/status/:requestId until approved.

Cleanup

Remove expired pairing requests. Run periodically or call after your own cleanup schedule.