Edit
Any language

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.

REST APIBearer lh_…GET/api/v1/courses/{course_uuid}/metaGET/api/v1/activities/{activity_uuid}POST/api/v1/trail/add_activity/{uuid}PUT/api/v1/users/{user_id}Your serverPOST /webhook

The LearnHouse API is a JSON REST API. Every path starts with /api/v1/.

Where LearnHouse runsBase URL
LearnHouse Cloudhttps://api.learnhouse.io/api/v1/
Self-hostedhttps://your-domain.com/api/v1/
Local developmenthttp://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:

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).