Authenticated Update Endpoints
These endpoints use the Platform API key and the course request id returned
by Create Course. Use them when your backend or agent needs
to edit a generated course without using the public editToken URL.
All paths are prefixed with /v1/platform/courses/:id.
| Method | Path | Purpose |
|---|---|---|
PATCH | / | Update course metadata |
PATCH | /canonical | Bulk-update course metadata, chapters, and lessons |
PATCH | /chapters/:chapterId | Update a single chapter |
PATCH | /lessons/:sequence | Update a lesson by sequence |
PATCH | /lessons/by-id/:lessonId/full | Update a full lesson by UUID |
Updates are available only after the course request has completed and has a
result row. If the request is still pending, poll Get Course
until isTerminal is true.
PATCH /
Updates course-level metadata.
curl -X PATCH https://api.tutorflow.io/v1/platform/courses/{id} \
-H "Authorization: Bearer tf_platform_..." \
-H "Content-Type: application/json" \
-d '{
"title": "Python Foundations",
"description": "A concise introduction to Python for first-time programmers."
}'Body
| Field | Type | Description |
|---|---|---|
title | string | Updated course title |
description | string | Updated course description |
Returns the updated CourseResDto.
PATCH /canonical
Bulk-updates the complete course shape. This is the preferred endpoint for curriculum editors and agents that need to update course, chapter, and lesson state in one save.
curl -X PATCH https://api.tutorflow.io/v1/platform/courses/{id}/canonical \
-H "Authorization: Bearer tf_platform_..." \
-H "Content-Type: application/json" \
-d '{
"title": "Python Foundations",
"description": "A practical Python course.",
"slug": "python-foundations",
"chapters": [
{
"id": "getting-started",
"title": "Getting Started",
"slug": "getting-started",
"sequence": 1
}
],
"lessons": [
{
"id": "2ca91d88-7b0c-4287-89f1-89a74d8a5b26",
"chapterId": "getting-started",
"title": "Variables and Types",
"description": "Learn how Python stores data.",
"slug": "variables-and-types",
"type": "ai-tutor",
"sequence": 1,
"lecture": "<p>Python variables are names for values...</p>",
"content": { "blocks": [] },
"quizzes": [],
"problems": [],
"metadata": { "duration": 12 }
}
]
}'Body
| Field | Type | Description |
|---|---|---|
title | string | Course title |
description | string | Course description |
slug | string | Course slug |
chapters | array | Chapter rename / slug updates |
lessons | array | Full lesson upsert list |
Chapter Fields
| Field | Type | Description |
|---|---|---|
id | string | Existing chapter id/slug from the canonical response |
title | string | New chapter title |
slug | string | New chapter slug |
sequence | number | Display order metadata |
Chapter data is denormalized onto lessons. Updating a chapter updates the
chapterTitle and/or chapterSlug of every lesson currently assigned to that
chapter.
Lesson Fields
| Field | Type | Description |
|---|---|---|
id | string | Existing PlatformLesson id. Omit to insert a new lesson. |
chapterId | string | Chapter id/slug to assign the lesson to |
title | string | Lesson title |
description | string | null | Lesson description |
slug | string | Lesson slug |
type | string | Lesson type, such as ai-tutor or markdown |
sequence | number | Lesson order |
lecture | string | null | HTML lecture body |
content | object | string | null | Structured lesson content |
quizzes | array | null | Quiz JSON |
problems | array | null | Practice problem JSON |
metadata | object | null | Free-form metadata |
When lessons is supplied, the list is treated as authoritative: existing
lessons that are not present in the incoming list are removed, matching ids are
patched, and entries without an id are inserted.
Returns the updated full course payload.
PATCH /chapters/:chapterId
Updates a single chapter by its canonical chapter id/slug.
curl -X PATCH https://api.tutorflow.io/v1/platform/courses/{id}/chapters/getting-started \
-H "Authorization: Bearer tf_platform_..." \
-H "Content-Type: application/json" \
-d '{ "title": "Python Basics", "slug": "python-basics", "sequence": 1 }'Returns the updated full course payload.
PATCH /lessons/:sequence
Updates a lesson by its numeric sequence.
curl -X PATCH https://api.tutorflow.io/v1/platform/courses/{id}/lessons/1 \
-H "Authorization: Bearer tf_platform_..." \
-H "Content-Type: application/json" \
-d '{
"title": "Variables and Types",
"description": "Updated lesson description.",
"lessonSlug": "variables-and-types",
"lecture": "<p>Updated lecture HTML...</p>"
}'Returns the updated PlatformLessonPublicDto.
PATCH /lessons/by-id/:lessonId/full
Updates all supported lesson fields by PlatformLesson UUID.
curl -X PATCH https://api.tutorflow.io/v1/platform/courses/{id}/lessons/by-id/{lessonId}/full \
-H "Authorization: Bearer tf_platform_..." \
-H "Content-Type: application/json" \
-d '{
"title": "Control Flow",
"type": "ai-tutor",
"chapterId": "python-basics",
"sequence": 2,
"lecture": "<p>Use if statements to branch...</p>",
"content": { "blocks": [] },
"quizzes": [],
"problems": [],
"metadata": { "duration": 15 }
}'Returns the updated canonical lesson shape.