Documentation

Talk to the home bridge.

Endpoint reference for the v0.2.17 release. Full request and response shapes are in docs/REQUEST_EXAMPLES_V0216.json and docs/REQUEST_EXAMPLES_V0217.json in the repo.

Getting started

  1. Install pk-client from npm: npm install -g @planekey/client
  2. Create a free account at planekey.dev
  3. Run pk login to pair your install to the account
  4. Run pk update-check to see what's available on your tier

Public endpoints

GET /health

Liveness probe. Returns 200 OK with a small JSON status payload. No authentication.

GET /api/plan-counts

Aggregate counts per subscription tier. No PII, no account identifiers — only counts. Cached 60 seconds in-process. Used by the pricing page counter.

GET /package/builds/public/{build_id}

Hash-only mirror for free clients. Exposes build_hash, total_size_bytes, chunk_count, and recipe identifiers. Use this to verify your npm-downloaded bytes match what the home bridge knows about.

Authenticated endpoints

Repo ingest

POST /repo/ingest — HMAC-signed payload from pk-repo-db-builder. Idempotent on (repo_id, branch_id, tree_hash). A duplicate replay returns idempotent: true with the same identifiers and zero rows inserted.

Package delivery

Install pairing

Reports

Webhooks

Request shape

All POST endpoints accept JSON. Signed endpoints include a signature field with the HMAC-SHA256 hex over a deterministic concatenation of the other fields. The exact concatenation order is in the request example files.

Errors return JSON like {"error": "..."} with an appropriate HTTP status. 401 for signature failures. 403 for entitlement failures. 404 when a referenced resource doesn't exist. 409 when a chunk request is out of order — the response includes expected_next so the client can rewind.

Client tools

Going deeper

Full architectural docs live in the repo under docs/. Highlights: