Skip to Content

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[]required
msgstringrequired
typestringrequired
inputany
ctxContext

Pagination

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.

Your first request

Browse the API

Authentication6

Login, token refresh, logout, OAuth and email verification. Login is form-encoded and returns a JWT for user-context flows.

API Tokens6

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.

Organizations51

Organization CRUD, members, invites, configuration, branding and SEO settings.

Users22

User accounts, profiles, session info and password management.

User Groups12

Group learners together for cohort management and access control.

Courses25

Course CRUD, cloning, export/import and contributor management. Create and update endpoints accept multipart form data.

Chapters10

Chapter CRUD and ordering within courses.

Activities21

Individual content units within chapters: dynamic pages, videos, documents, assignments and SCORM packages.

Blocks8

Content blocks within dynamic page activities.

Assignments30

Assignment authoring, tasks, submissions and grading — fully drivable headlessly with an API token. Learner-side "/me" and submission endpoints remain session-only.

Folders15

Content folders used to organize and group courses (collections).

Media8

Upload and manage media assets.

Certifications8

Certificate generation and management for course completion.

Payments39

Products, prices, checkout and enrollment via the open payments API, including bring-your-own provider.

Search1

Full-text search across courses and content. Tokens need the search read right.

Analytics9

Course analytics and usage metrics.

Webhooks9

Register HTTP endpoints that receive event notifications from LearnHouse.

Headless37

Server-to-server endpoints for headless integrations: provision users, enroll learners and manage content programmatically. These endpoints require an lh_ API token.