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

Frequently asked questions

Does LearnHouse have a public API?

Yes. LearnHouse is API-first: everything the app does goes through a JSON REST API under /api/v1/, on LearnHouse Cloud (https://api.learnhouse.io/api/v1/) and on self-hosted instances.

Is there an OpenAPI specification?

Yes. The OpenAPI document is published at /reference/openapi.json, and the API Reference is generated from it.

How do I authenticate API requests?

Create an API token (it starts with lh_) in Dashboard → Developers → API Access and send it as a Bearer token from your server. See API tokens.

Which languages can call the API?

Any language that speaks HTTP. JavaScript and TypeScript projects can use the typed SDK, and the API Reference includes cURL, JavaScript and Python examples.

Can I get notified when something happens?

Yes. Webhooks send a signed request to your server on events such as enrollments, completions and payments.