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.
| Field | Type | Description |
|---|---|---|
title | string | Module title |
description | string | Module description |
type | string | Lesson/module type |
isPublic | boolean | Whether the public share-token endpoint can render the module |
videoUrl | string | null | Optional attached video URL |
pdfKey | string | null | Optional S3 key for attached PDF material |
content | string | null | Classroom-compatible structured lesson content |
lectureKey | string | null | S3 key for lecture HTML. Usually set by the backend when lecture is supplied |
lecture | string | null | Full lecture HTML. The server uploads it to S3 and bumps lectureVersion |
lectureImagePrompt | string | null | Prompt used for the module's lecture image |
status | string | null | Module processing status, such as processing, completed, or failed |
slug | string | URL-friendly module slug |
metadata | object | null | Free-form metadata. Replaces existing metadata when supplied |
quizzes | array | null | Classroom-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 }