---
title: "Update course lesson"
method: PATCH
path: "/course_lessons/{id}"
tags: ["Course lessons"]
---

# Update course lesson

`PATCH /course_lessons/{id}`

Update a lesson's content, type, visibility, assessment questions, or media attachments.

Required permissions:
 - `courses:update`

## Path parameters

- `id` string, required

## Request body

- object — Parameters for UpdateLesson
  - `assessment_completion_requirement` object, nullable — The passing criteria for quiz or knowledge check lessons, such as minimum grade or correct answers.
    - `minimum_grade_percent` number, nullable — The minimum grade percentage required to pass (0-100). Cannot be set together with minimum_questions_correct.
    - `minimum_questions_correct` integer, nullable — The minimum number of questions that must be answered correctly. Cannot be set together with minimum_grade_percent.
  - `assessment_questions` object[], nullable — The full list of assessment questions for quiz or knowledge check lessons. Replaces all existing questions.
    - `correct_answer` string, required — The correct answer for the question. Used for short answer questions
    - `id` string, nullable — The ID of an existing question. If provided, the question will be updated. If not provided, a new question will be created.
    - `image` object, nullable — Optional image attachment for the question
      - `id` string, required — The ID of an existing file object.
    - `options` object[], nullable — The answer options for multiple choice/select questions
      - `id` string, nullable — The ID of an existing option. If provided, the option will be updated. If not provided, a new option will be created.
      - `is_correct` boolean, required — Whether this option is a correct answer
      - `option_text` string, required — The text of the answer option
    - `question_text` string, required — The text of the question
    - `question_type` 'short_answer' | 'true_false' | 'multiple_choice' | 'multiple_select', required — The available types for an assessment question
  - `attachments` object[], nullable — File attachments for the lesson such as PDFs or documents. Replaces all existing attachments.
    - `id` string, required — The ID of an existing file object.
  - `content` string, nullable — The Markdown content body of the lesson.
  - `days_from_course_start_until_unlock` integer, nullable — The number of days after a student starts the course before this lesson becomes accessible.
  - `embed_id` string, nullable — The external video identifier for embedded content (e.g., a YouTube video ID or Loom share ID).
  - `embed_type` 'youtube' | 'loom' — The type of embed for a lesson
  - `lesson_type` 'text' | 'video' | 'pdf' | 'multi' | 'quiz' | 'knowledge_check' — The available types for a lesson
  - `main_pdf` object, nullable — The primary PDF document attached to this lesson for student reference.
    - `id` string, required — The ID of an existing file object.
  - `max_attempts` integer, nullable — The maximum number of attempts a student is allowed for assessment lessons.
  - `mux_asset_id` string, nullable — The identifier of a Mux video asset to attach to this lesson (e.g., "mux_XXXXX").
  - `thumbnail` object, nullable — The thumbnail image for the lesson in PNG, JPEG, or GIF format.
    - `id` string, required — The ID of an existing file object.
  - `title` string, nullable — The display title of the lesson (e.g., "Getting Started with APIs").
  - `visibility` 'visible' | 'hidden' — The available visibilities for a lesson. Determines how / whether a lesson is visible to users.

## Response `200`

A successful response

- CourseLesson — An individual learning unit within a chapter, which can contain text, video, PDF, or assessment content.
  - `assessment_questions` object[], required — The list of questions for quiz or knowledge check lessons. Empty for non-assessment lesson types.
    - `correct_answer` string, nullable, required — The correct answer for the question. Used for short answer questions. Only visible to admins (users with courses:update permission)
    - `created_at` string, date-time, required — The datetime the assessment question was created.
    - `id` string, required — The unique identifier for the assessment question.
    - `image` object, nullable, required — Optional image attachment for the question
      - `content_type` string, nullable, required — Uploaded file MIME type, such as image/jpeg, video/mp4, or audio/mpeg.
      - `filename` string, nullable, required — The original filename of the uploaded attachment, including its file extension.
      - `id` string, required — Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) input value will be accepted as an ID.
      - `url` string, nullable, required — A pre-optimized URL for rendering this attachment on the client. This should be used for displaying attachments in apps.
    - `options` object[], required — The answer options for multiple choice/select questions
      - `id` string, required — The unique identifier for the assessment question option.
      - `is_correct` boolean, nullable, required — Whether this option is a correct answer. Only visible to admins (users with courses:update permission)
      - `option_text` string, required — The text of the answer option
      - `order` integer, required — The order of this option within the question
    - `order` integer, required — The order of the question within its lesson
    - `question_text` string, required — The text of the question
    - `question_type` 'short_answer' | 'true_false' | 'multiple_choice' | 'multiple_select', required — The available types for an assessment question
  - `attachments` object[], required — All supplementary files attached to this lesson returned as a flat array rather than a paginated connection.
    - `content_type` string, nullable, required — Uploaded file MIME type, such as image/jpeg, video/mp4, or audio/mpeg.
    - `filename` string, nullable, required — The original filename of the uploaded attachment, including its file extension.
    - `id` string, required — Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) input value will be accepted as an ID.
    - `url` string, nullable, required — A pre-optimized URL for rendering this attachment on the client. This should be used for displaying attachments in apps.
  - `content` string, nullable, required — The Markdown content body of the lesson. Null if the lesson has no text content.
  - `created_at` string, date-time, required — The datetime the lesson was created.
  - `days_from_course_start_until_unlock` integer, nullable, required — The number of days after a student starts the course before this lesson becomes accessible. Null if the lesson is available immediately.
  - `embed_id` string, nullable, required — The external video identifier for embedded video lessons, such as a YouTube video ID or Loom share ID. Null if the lesson has no embed.
  - `embed_type` 'youtube' | 'loom', required — The type of embed for a lesson
  - `id` string, required — The unique identifier for the lesson.
  - `lesson_type` 'text' | 'video' | 'pdf' | 'multi' | 'quiz' | 'knowledge_check', required — The available types for a lesson
  - `main_pdf` object, nullable, required — The primary PDF document for PDF-type lessons. Null if this lesson is not a PDF lesson or no PDF has been uploaded.
    - `content_type` string, nullable, required — Uploaded file MIME type, such as image/jpeg, video/mp4, or audio/mpeg.
    - `filename` string, nullable, required — The original filename of the uploaded attachment, including its file extension.
    - `id` string, required — Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) input value will be accepted as an ID.
    - `url` string, nullable, required — A pre-optimized URL for rendering this attachment on the client. This should be used for displaying attachments in apps.
  - `order` integer, required — The sort position of this lesson within its parent chapter, starting from zero.
  - `thumbnail` object, nullable, required — The thumbnail image displayed on lesson cards and previews. Null if no thumbnail has been uploaded.
    - `url` string, nullable, required — A pre-optimized URL for rendering this attachment on the client. This should be used for displaying attachments in apps.
  - `title` string, required — The display name of the lesson shown to students. Maximum 120 characters.
  - `video_asset` object, nullable, required — The Mux video asset for video-type lessons, used for streaming playback. Null if this lesson has no hosted video.
    - `asset_id` string, nullable, required — The Mux-provided ID of the asset
    - `audio_only` boolean, required — Whether this asset contains only audio
    - `created_at` string, date-time, required — The datetime the mux asset was created.
    - `duration_seconds` integer, nullable, required — The duration of the video in seconds
    - `finished_uploading_at` string, date-time, nullable, required — The time at which the video finished uploading
    - `id` string, required — The unique identifier for the mux asset.
    - `playback_id` string, nullable, required — The public playback ID of the Mux asset
    - `signed_playback_id` string, nullable, required — The signed playback ID of the Mux asset
    - `signed_storyboard_playback_token` string, nullable, required — The signed storyboard playback token of the Mux asset
    - `signed_thumbnail_playback_token` string, nullable, required — The signed thumbnail playback token of the Mux asset
    - `signed_video_playback_token` string, nullable, required — The signed video playback token of the Mux asset
    - `status` 'uploading' | 'created' | 'ready', required — Mux asset statuses
    - `updated_at` string, date-time, required — The datetime the mux asset was last updated.
  - `visibility` 'visible' | 'hidden', required — The available visibilities for a lesson. Determines how / whether a lesson is visible to users.

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not found
- `422` — Verification required
- `429` — Too many requests
- `500` — Internal server error

---

[API](https://skmtc.net/whop/apis/whop-api.md) · [All operations](https://skmtc.net/whop/apis/whop-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/whop/whop-api/versions/db0883548bc5/schema)
