The REST API
Everything LearnHouse does goes through this API: courses, learners, progress, assignments, payments. Call it from any language, and get webhooks when things happen.
The LearnHouse API is a JSON REST API. Every path starts with /api/v1/.
| Where LearnHouse runs | Base URL |
|---|---|
| LearnHouse Cloud | https://api.learnhouse.io/api/v1/ |
| Self-hosted | https://your-domain.com/api/v1/ |
| Local development | http://localhost:1338/api/v1/ |
Writing JavaScript or TypeScript? The SDK wraps this API with full types, retries and errors, and works in browsers, Node, edge workers and React Native.
API Reference
The API Reference documents every endpoint with its request and response schemas, the token right it needs, cURL, SDK, JavaScript and Python examples, and a live playground. It is generated from the API's OpenAPI document, so it matches what the server accepts. Start with its guides:
- Authentication: API tokens, user sessions, token rights, and which endpoint groups refuse tokens.
- Errors: status codes and the shape of
detail. - Rate limits & pagination: per-endpoint limits and paginated lists.
More in this section
- API tokens: create, scope, regenerate and revoke tokens in the dashboard.
- Headless Assignments: author assignments, submit for learners and grade them with an API token.
- Webhooks: get a signed request on your server when something happens in LearnHouse.
The OpenAPI document the reference is built from is published at /reference/openapi.json.
On a self-hosted instance, the raw OpenAPI document (/openapi.json) and Swagger UI (/docs) are only served in
development mode (LEARNHOUSE_DEVELOPMENT_MODE=true).