LearnHouse API
A REST API over everything LearnHouse does: courses and their content, learners and groups, assignments, certificates, payments and search. Use it to build a headless learning site, sync another system or automate admin work. This reference is generated from the API's OpenAPI document, so it matches what the server accepts.
Base URLs
Every path in this reference starts with /api/v1. Put the origin of your deployment in front of it.
https://api.learnhouse.io/api/v1Hosted LearnHouse. API tokens need the Pro plan or higher.
https://your-domain.com/api/v1The API is served under /api/v1 on the domain of your instance.
http://localhost:1338/api/v1The default port of the API when you run LearnHouse locally.
Your first request
Three steps, about two minutes.
- 1
Create an API token
In your LearnHouse dashboard open Developers → API Access and click Create Token. Give it the Read right on Courses. The full token (it starts with
lh_) is shown once. On LearnHouse Cloud this needs the Pro plan.Paste it here and every example on this site uses it.
API tokenStays in this browser (localStorage). It replaces the placeholder in every example and signs playground requests. Use a least-privilege token.
- 2
List your courses
Send the token as a bearer token. Replace
your-schoolwith your organization slug. With @learnhouse/sdk the same call is typed from the path.Self-hosting? Swap
https://api.learnhouse.iofor your own origin.GET coursescurl "https://api.learnhouse.io/api/v1/courses/org_slug/your-school/page/1/limit/10" \ -H "Authorization: Bearer lh_YOUR_API_TOKEN"import { createClient } from "@learnhouse/sdk"; const lh = createClient({ baseUrl: "https://api.learnhouse.io", token: "lh_YOUR_API_TOKEN" }); const data = await lh.GET("/api/v1/courses/org_slug/{org_slug}/page/{page}/limit/{limit}", { params: { path: { org_slug: "your-school", page: 1, limit: 10 }, }, }); console.log(data);const res = await fetch("https://api.learnhouse.io/api/v1/courses/org_slug/your-school/page/1/limit/10", { method: "GET", headers: { Authorization: "Bearer lh_YOUR_API_TOKEN", }, }); const data = await res.json(); console.log(data);import requests res = requests.get( "https://api.learnhouse.io/api/v1/courses/org_slug/your-school/page/1/limit/10", headers={"Authorization": "Bearer lh_YOUR_API_TOKEN"}, ) print(res.json()) - 3Response200 · JSON
[ { "name": "Example name", "description": "An example description", "about": "string", "learnings": "string", "tags": "string", "thumbnail_type": "image", "thumbnail_image": "string", "thumbnail_video": "string", "public": false, "published": false, "open_to_contributors": false, "id": 1, "org_id": 1, "authors": [ { "user": { "id": 1, "user_uuid": "string", "username": "string", "first_name": "Example name", "last_name": "Example name", "avatar_image": "string" }, "authorship": "CREATOR", "authorship_status": "ACTIVE", "creation_date": "string", "update_date": "string" } ], "course_uuid": "string", "creation_date": "string", "update_date": "string", "seo": {}, "extra_metadata": {}, "drip_settings": {} } ]
Guides
What applies to every endpoint.
API tokens and user sessions, token rights, and which endpoints refuse tokens.
ErrorsStatus codes, the FastAPI detail shape and the 422 validation format.
Rate limits & paginationPer-endpoint limits enforced by the API, 429 handling and paginated lists.
SDKHow every endpoint here maps to a typed @learnhouse/sdk call.
Endpoints
376 endpoints in 18 groups. Each group lists who can call it.
Login, token refresh, logout, OAuth and email verification. Login is form-encoded and returns a JWT for user-context flows.
Public / credentialsCreate 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.
Session onlyOrganization CRUD, members, invites, configuration, branding and SEO settings.
Session onlyUser accounts, profiles, session info and password management.
Session onlyGroup learners together for cohort management and access control.
API token or sessionCourse CRUD, cloning, export/import and contributor management. Create and update endpoints accept multipart form data.
API token or sessionChapter CRUD and ordering within courses.
API token or sessionIndividual content units within chapters: dynamic pages, videos, documents, assignments and SCORM packages.
API token or sessionContent blocks within dynamic page activities.
Session onlyAssignment authoring, tasks, submissions and grading, all fully drivable headlessly with an API token. Learner-side "/me" and submission endpoints remain session-only.
API token or sessionContent folders used to organize and group courses (collections).
API token or sessionUpload and manage media assets.
API token or sessionCertificate generation and management for course completion.
API token or sessionProducts, prices, checkout and enrollment via the open payments API, including bring-your-own provider.
API token or sessionFull-text search across courses and content. Tokens need the search read right.
API token or sessionCourse analytics and usage metrics.
Session onlyRegister HTTP endpoints that receive event notifications from LearnHouse.
Session onlyServer-to-server endpoints for headless integrations: provision users, enroll learners and manage content programmatically. These endpoints require an lh_ API token.
API token onlyFor tools and AI assistants
The whole operation list is available as Markdown and JSON, with one Markdown file per group that includes parameters, bodies and responses.