API Reference
The LearnHouse API
A REST API for driving LearnHouse programmatically — 317 documented endpoints across courses, learners, assignments, payments and more. This reference is generated directly from the live OpenAPI specification, so it is always in sync with the API.
Base URL
All endpoints live under /api/v1. Self-hosted instances substitute their own domain.
https://api.learnhouse.io/api/v1
Authentication
Programmatic access uses organization API tokens, prefixed lh_. Create them in your dashboard under Developers → API Access (Pro plan) — the full token is shown once, at creation, and can be scoped to least-privilege rights. Send it as a bearer token on every request:
Authorization: Bearer lh_…
User-context flows can instead use the JWT returned by the login endpoint (form-encoded, not JSON) as the bearer token. See the authentication guide for details.
Errors
Errors return conventional HTTP status codes with a JSON body of the form { "detail": "…" }. Validation failures return 422 with the structure below.
401Missing or invalid credentials.403Authenticated, but not allowed to perform this action.404The requested resource does not exist.409The request conflicts with existing state (e.g. duplicate resource).422Request validation failed — see the error format below.429Rate limit exceeded — retry later.422 validation error format
detailValidationError[]Show child attributes
locstring | integer[]requiredmsgstringrequiredtypestringrequiredinputanyctxContextPagination
List endpoints paginate with page and limit parameters — as query parameters or path segments (e.g. /courses/org_slug/{org_slug}/page/1/limit/20), depending on the endpoint. Page numbering starts at 1.
Your API token
Stored only in your browser — it is substituted into every example and used by the playground. Prefer a least-privilege token.
Browse the API
Login, token refresh, logout, OAuth and email verification. Login is form-encoded and returns a JWT for user-context flows.
Create and manage lh_ organization API tokens with scoped rights. The full token value is only returned once, at creation. Session-only: a token cannot mint other tokens.
Organization CRUD, members, invites, configuration, branding and SEO settings.
User accounts, profiles, session info and password management.
Group learners together for cohort management and access control.
Course CRUD, cloning, export/import and contributor management. Create and update endpoints accept multipart form data.
Chapter CRUD and ordering within courses.
Individual content units within chapters: dynamic pages, videos, documents, assignments and SCORM packages.
Content blocks within dynamic page activities.
Assignment authoring, tasks, submissions and grading — fully drivable headlessly with an API token. Learner-side "/me" and submission endpoints remain session-only.
Content folders used to organize and group courses (collections).
Upload and manage media assets.
Certificate generation and management for course completion.
Products, prices, checkout and enrollment via the open payments API, including bring-your-own provider.
Full-text search across courses and content. Tokens need the search read right.
Course analytics and usage metrics.
Register HTTP endpoints that receive event notifications from LearnHouse.
Server-to-server endpoints for headless integrations: provision users, enroll learners and manage content programmatically. These endpoints require an lh_ API token.