API documentation

Everything the key can call

REST over HTTPS, JSON in and out. Every request needs your API key in the Authorization header. Sign in with your GitHub developer ID to get a key.

Authentication
Endpoints
Example request
Errors
Guides & further reading

Authenticating requests

Pass your API key as a Bearer token on every call. Keys don't expire and aren't tied to a request volume — they're tied to the one-time purchase and your GitHub developer ID.

# every request needs this header
Authorization: Bearer pk_live_51ab...
Content-Type: application/json

Available endpoints

MethodPathDescription
POST/v1/pwa/manifestGenerate a web app manifest from your app config
POST/v1/pwa/service-workerGenerate a service worker with a chosen caching strategy
POST/v1/pwa/push/subscribeRegister a device for push notifications
GET/v1/pwa/status/{app_id}Check build status and current cache version
POST/v1/infra/load-balancerProvision an ALB or NLB against your AWS account
GET/v1/infra/load-balancer/{id}/healthGet current target group health
GET/v1/account/meReturn the GitHub developer ID tied to this key

Generate a service worker

Send your routes and a caching strategy; get back a ready-to-deploy service worker file.

curl -X POST https://api.milt.dev/v1/pwa/service-worker \
  -H "Authorization: Bearer pk_live_51ab..." \
  -H "Content-Type: application/json" \
  -d '{
    "app_id": "fieldwork",
    "strategy": "cache-first",
    "routes": ["/", "/dashboard", "/assets/*"]
  }'

Response

{
  "status": "ready",
  "service_worker_url": "https://cdn.milt.dev/sw/fieldwork.js",
  "cache_version": "2026.08.14-1"
}

Error responses

Errors return a non-2xx status with a JSON body describing what to fix.

{
  "error": "invalid_key",
  "message": "This key is not linked to a GitHub developer ID. Sign in again."
}
StatusMeaning
401Missing or invalid API key
404App or load balancer ID not found
422Malformed manifest or route list
503AWS provisioning temporarily unavailable

Background reading

The endpoints above generate manifests, service workers and push wiring for you — these are the underlying platform references if you want to understand or hand-tune what gets generated.