Reference

API overview

The control plane exposes a versioned HTTP API under /api/v1. Interactive docs (OpenAPI/Swagger) are at /docs on a running API (local: http://localhost:8000/docs).

Auth for operators: Authorization: Bearer <jwt> from POST /api/v1/auth/login.
Auth for devices: Authorization: Bearer <device_token> (dev_…) or enrollment API key where noted.

Internal MQTT callbacks (/internal/mqtt/*) are not operator APIs; they require X-MQTT-Internal-Token.

Health

MethodPath
GET/health
GET/api/v1/health

Auth (operators)

MethodPathNotes
POST/api/v1/auth/registerCreate account
POST/api/v1/auth/loginReturns JWT
GET/api/v1/auth/meCurrent user

Examples: Identity and organizations.

Organizations

Prefix: /api/v1/organizations

MethodPath
GET / POST/
GET / PATCH / DELETE/{organization_id}
GET / POST/{organization_id}/members
PATCH / DELETE/{organization_id}/members/{membership_id}
POST/{organization_id}/leave
GET / POST/{organization_id}/teams
…team members under .../teams/{team_id}/members

Authorization

MethodPath
GET/api/v1/authz/catalog
GET/api/v1/me/access
GET / POSTmembership access under org authz routes

See RBAC.

Fleet (organization-scoped)

Prefix: /api/v1/organizations/{organization_id}

ResourcePaths (typical)
Device types/device-types, /device-types/{type_id}
Device groups/device-groups, /device-groups/{group_id}
Registration tokens/registration-tokens (+ revoke)
Enrollment keys/enrollment-keys (+ revoke)
Enrollment requestslist / approve / reject under enrollment request routes
Devices/devices, /devices/{device_id}, enable/disable, MQTT revoke
MQTT test/mqtt/events (SSE), /mqtt/publish
Audit/audit-events
Artifacts/artifacts (separate router; upload, download, download-link)

Fleet guides: docs/fleet/.

Agent (device-facing)

Prefix: /api/v1/agent

MethodPathAuth
POST/registerRegistration token in body
POST/heartbeatDevice token
GET/POST/enroll/checkEnrollment API key
POST/enroll/requestEnrollment API key
POST/enroll/pollClaim secret

Guides: Device registration, Device-initiated enrollment, Heartbeat.

Example: login and list devices

TOKEN=$(curl -s http://localhost:8000/api/v1/auth/login \
  -H 'Content-Type: application/json' \
  -d '{"email":"owner@example.com","password":"dev-password-123"}' \
  | jq -r .access_token)

curl -s http://localhost:8000/api/v1/organizations \
  -H "Authorization: Bearer $TOKEN"

curl -s "http://localhost:8000/api/v1/organizations/$ORG_ID/devices" \
  -H "Authorization: Bearer $TOKEN"

For request/response bodies, use OpenAPI or the linked fleet guides — this page is the map, not a full schema dump.

API overview · MeteorCloud