List Lessons
Retrieve a list of published lessons from your organization.
Endpoint
GET /api/public/lessonsAuthentication
This endpoint requires authentication using a Bearer token. See Authentication for complete details on API token format, usage, and error handling.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
status | string | No | Filter lessons by publication status. Currently only "published" is supported. |
limit | integer | No | Maximum 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
| Field | Type | Description |
|---|---|---|
id | string (UUID) | Unique lesson identifier |
title | string | Lesson title |
status | string | Publication status (currently always "published") |
createdAt | string (ISO 8601) | Timestamp when the lesson was created |
updatedAt | string (ISO 8601) | Timestamp when the lesson was last updated |
tags | array of strings | Tags 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:
limitparameter 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
updatedAtin 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