Skip to content

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 dev
http://localhost:3000

Authentication

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