Skip to Content
📧 Join the Teacharium waitlist to get access. 
API DocumentationList Lessons

List Lessons

Retrieve a list of published lessons from your organization.

Endpoint

GET /api/public/lessons

Authentication

This endpoint requires authentication using a Bearer token. See Authentication for complete details on API token format, usage, and error handling.

Query Parameters

ParameterTypeRequiredDescription
statusstringNoFilter lessons by publication status. Currently only "published" is supported.
limitintegerNoMaximum number of lessons to return. Must be between 1 and 100. Defaults to 50.

Response

Success Response (200 OK)

Returns a JSON object with a data array containing lesson objects.

{ "data": [ { "id": "550e8400-e29b-41d4-a716-446655440000", "title": "Introduction to Biology", "status": "published", "createdAt": "2025-01-15T10:30:00Z", "updatedAt": "2025-01-20T14:45:00Z", "tags": ["science", "biology", "intro"] }, { "id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8", "title": "Advanced Mathematics", "status": "published", "createdAt": "2025-01-10T08:00:00Z", "updatedAt": "2025-01-18T16:20:00Z", "tags": ["math", "advanced"] } ] }

Lesson Object Fields

FieldTypeDescription
idstring (UUID)Unique lesson identifier
titlestringLesson title
statusstringPublication status (currently always "published")
createdAtstring (ISO 8601)Timestamp when the lesson was created
updatedAtstring (ISO 8601)Timestamp when the lesson was last updated
tagsarray of stringsTags associated with the lesson

Error Responses

401 Unauthorized

Authentication failed. See Authentication Errors for detailed information on authentication issues.

422 Unprocessable Entity

The query parameters are invalid.

{ "error": "limit must be between 1 and 100" }

Possible causes:

  • limit parameter is not a number or is out of range (1-100)
  • Invalid parameter format

500 Internal Server Error

An unexpected error occurred on the server.

{ "error": "Failed to load lessons" }

Example Requests

Basic Request

Retrieve up to 50 published lessons (default behavior):

curl -X GET 'https://your-domain.com/api/public/lessons' \ -H 'Authorization: Bearer tapub_xxxxx.tasec_xxxxx'

With Limit

Retrieve only 10 lessons:

curl -X GET 'https://your-domain.com/api/public/lessons?limit=10' \ -H 'Authorization: Bearer tapub_xxxxx.tasec_xxxxx'

With Status Filter

Explicitly filter for published lessons:

curl -X GET 'https://your-domain.com/api/public/lessons?status=published&limit=25' \ -H 'Authorization: Bearer tapub_xxxxx.tasec_xxxxx'

Notes

  • Only published lessons are returned through the public API
  • Lessons are ordered by updatedAt in descending order (most recently updated first)
  • Only lessons belonging to your organization are returned
  • Deleted lessons are automatically excluded from results
  • The API uses pagination with a maximum limit of 100 lessons per request
Last updated on