API Reference

Complete endpoint documentation for the Keymaster API.

Base URL

https://keymaster.cloud-monitor.com

Authentication

Endpoints use one of three auth methods:

Method Header Used by
User JWT Authorization: Bearer {access_token} User-facing endpoints (device registration, account)
Service JWT Authorization: Bearer {client_credentials_jwt} Server-to-server (push, future APIs)
Admin JWT Authorization: Bearer {console_jwt} Admin/management endpoints

Endpoint Groups

Common Response Patterns

Success

{ "status": "ok" }

Error

{ "detail": "Human-readable error message" }

Structured Error (for client-side handling)

{
  "detail": {
    "error": "error_code",
    "message": "Human-readable explanation",
    "setup_url": "/account"
  }
}

Rate Limited

HTTP 429 Too Many Requests
Retry-After: 583

{ "error": "rate_limited", "retry_after": 583 }