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.

376Endpoints
18Groups
1.4.3API version
RESTJSON over HTTP

Base URLs

Every path in this reference starts with /api/v1. Put the origin of your deployment in front of it.

LearnHouse Cloud
https://api.learnhouse.io/api/v1

Hosted LearnHouse. API tokens need the Pro plan or higher.

Self-hosted
https://your-domain.com/api/v1

The API is served under /api/v1 on the domain of your instance.

Local development
http://localhost:1338/api/v1

The default port of the API when you run LearnHouse locally.

Your first request

Three steps, about two minutes.

  1. 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 token

    Stays in this browser (localStorage). It replaces the placeholder in every example and signs playground requests. Use a least-privilege token.

  2. 2

    List your courses

    Send the token as a bearer token. Replace your-school with your organization slug. With @learnhouse/sdk the same call is typed from the path.

    Self-hosting? Swap https://api.learnhouse.io for your own origin.

    GET courses
    curl "https://api.learnhouse.io/api/v1/courses/org_slug/your-school/page/1/limit/10" \
      -H "Authorization: Bearer lh_YOUR_API_TOKEN"
  3. 3

    Read the response

    Successful calls return JSON. Failures return an HTTP status with a detail field explaining why; see Errors. From here, browse the Courses endpoints or try any endpoint live with the Try it panel.

    Response200 · 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.

Endpoints

376 endpoints in 18 groups. Each group lists who can call it.

Authentication20

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

Public / credentials
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.

Session only
Organizations59

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

Session only
Users22

User accounts, profiles, session info and password management.

Session only
User Groups12

Group learners together for cohort management and access control.

API token or session
Courses30

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

API token or session
Chapters10

Chapter CRUD and ordering within courses.

API token or session
Activities27

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

API token or session
Blocks8

Content blocks within dynamic page activities.

Session only
Assignments33

Assignment 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 session
Folders15

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

API token or session
Media8

Upload and manage media assets.

API token or session
Certifications8

Certificate generation and management for course completion.

API token or session
Payments58

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

API token or session
Search1

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

API token or session
Analytics13

Course analytics and usage metrics.

Session only
Webhooks9

Register HTTP endpoints that receive event notifications from LearnHouse.

Session only
Headless37

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

API token only

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