CourseLit logoCourseLit Docs
Api reference

Update a product lesson

Updates editable lesson fields. Lesson type and section cannot be changed after creation. Use the same content/media shapes documented on create. SCORM lesson updates are rejected with `not_supported`.

PATCH
/api/products/{productId}/lessons/{lessonId}

Updates editable lesson fields. Lesson type and section cannot be changed after creation. Use the same content/media shapes documented on create. SCORM lesson updates are rejected with not_supported.

Authorization

ApiKeyAuth
x-api-key<token>

API key created in CourseLit dashboard settings. The legacy apikey request-body field is still accepted but deprecated.

In: header

Path Parameters

productId*string
lessonId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X PATCH "https://school.courselit.app/api/products/string/lessons/string" \  -H "Content-Type: application/json" \  -d '{    "title": "Updated Introduction to AI",    "published": true  }'
{
  "lessonId": "string",
  "title": "string",
  "type": "text",
  "content": {
    "type": "doc",
    "content": [
      {}
    ]
  },
  "media": {
    "mediaId": "string",
    "originalFileName": "string",
    "mimeType": "string",
    "size": 0,
    "access": "public",
    "file": "string",
    "thumbnail": "string",
    "caption": "string"
  },
  "downloadable": true,
  "courseId": "string",
  "groupId": "string",
  "requiresEnrollment": true,
  "published": true
}
{
  "error": {
    "code": "string",
    "message": "string"
  }
}