Update Module

Update platform module fields using the classroom standalone lesson payload shape.

PATCH /v1/platform/modules/:id

Updates one module. The editable payload mirrors classroom standalone lessons: title, description, type, publish flag, content, lecture, lecture key, status, image prompt, metadata, slug, and quizzes. Ownership/auth fields are platform managed and cannot be changed.

Body

All fields are optional. Omitted fields are left unchanged.

FieldTypeDescription
titlestringModule title
descriptionstringModule description
typestringLesson/module type
isPublicbooleanWhether the public share-token endpoint can render the module
videoUrlstring | nullOptional attached video URL
pdfKeystring | nullOptional S3 key for attached PDF material
contentstring | nullClassroom-compatible structured lesson content
lectureKeystring | nullS3 key for lecture HTML. Usually set by the backend when lecture is supplied
lecturestring | nullFull lecture HTML. The server uploads it to S3 and bumps lectureVersion
lectureImagePromptstring | nullPrompt used for the module's lecture image
statusstring | nullModule processing status, such as processing, completed, or failed
slugstringURL-friendly module slug
metadataobject | nullFree-form metadata. Replaces existing metadata when supplied
quizzesarray | nullClassroom-compatible quiz item list

Example Request

curl -X PATCH https://api.tutorflow.io/v1/platform/modules/4d3b7f2a-7b8f-497c-a1d9-58b7f2e0c111 \
  -H "Authorization: Bearer tf_platform_..." \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Python Variables: Updated",
    "isPublic": true,
    "lecture": "<h1>Python Variables</h1><p>Updated lesson body.</p>",
    "quizzes": [
      {
        "title": "Variable Check",
        "question": "Which symbol assigns a value in Python?",
        "type": "SELECT",
        "options": ["=", "==", ":"],
        "correctAnswers": ["="],
        "sequence": 1
      }
    ]
  }'

Response

Returns the updated ModuleResDto.

DELETE /v1/platform/modules/:id

Soft-deletes the module and its quiz links.

curl -X DELETE https://api.tutorflow.io/v1/platform/modules/4d3b7f2a-7b8f-497c-a1d9-58b7f2e0c111 \
  -H "Authorization: Bearer tf_platform_..."
{ "success": true }