Headless LMS

API reference

How the API, OpenAPI spec, and typed SDK relate, and where to find the interactive reference.

Every route validates its request and response against shared Zod schemas. Those schemas produce an OpenAPI spec, and the typed SDK is generated from that spec — so the API, docs, and client never drift.

Interactive reference

A running API serves an interactive OpenAPI reference at /docs. Point it at your installation to explore and try every endpoint against live data.

Common endpoints

MethodPathDescription
POST/orgs/:orgId/coursesCreate a course
GET/orgs/:orgId/coursesList courses
POST/entitlementsGrant student access
DELETE/entitlements/:idRevoke access
GET/students/:id/progressRead progress
POST/mcpMCP endpoint (OAuth)

Using the SDK

The generated SDK mirrors these routes with full type safety, including request payloads and response shapes.

usage.ts
import { createClient } from "@headless-lms/sdk"

const lms = createClient({ baseUrl, token })

const { data, error } = await lms.students.progress({
  studentId,
})

On this page