Introduction
Levelcast is a glucose monitoring platform designed for healthcare professionals and patients. This documentation covers the public REST API.
Base URL
https://api.levelcast.org# Local devhttp://localhost:3000Authentication
All API endpoints require authentication. See the Authentication guide for details (session cookies via Better Auth or X-API-KEY: lc_...).
Plans & Billing
Free 4 patients / 5 rules / 2 screens / 1 API key / 0 orgs created (join ∞) — Pro 20 patients / 50 rules — Clinic/Founder 50 rules, rest ∞. Each rule supports up to 3 actions. See Billing & Plans for limits, Stripe checkout (POST /api/v1/billing/checkout), portal and 402 LIMIT_REACHED handling.
Response format
All endpoints return JSON with the following envelope:
{ "success": true, "data": { ... }}Errors return:
{ "success": false, "message": "Description of what went wrong", "code": "LIMIT_REACHED", "limit": 4, "used": 4, "plan": "free"}Rate limits and billing limits are distinct: rate limits are per-minute, billing limits are per-account quotas.
Concepts
- Patients — core entity with treatments
- Treatments — time-bound medication blocks
- Glucose Readings — ingestion and trends
- Stats & Insights — TIR, patterns, daily breakdowns, events
- Rules & Automations — IF/THEN triggers and actions
- Connections — LibreLinkUp/Nightscout data sources
- Foods — nutrition search for meal logging
- Organizations — clinics and family groups
- Frames — GridStack kiosk displays
- Shared Links — public
/s/:tokenand/ss/:token - API Keys —
X-API-KEYscoping - Webhooks — now via Rules
- Exports — CSV/JSON/XML/XLSX + PDF