English EN
API Reference
API Reference

Courses

Create lesson

POST / v1 / courses / {course_id} / lessons

Adds a lesson with its content blocks to a module of a course. The lesson is a draft unless draft is false.

The answer is the lesson, as in GET /v1/lessons/{lesson_id}.

Changes at once MCP tool create_lesson

Authorization

  • Authorization string header required

    Bearer tnt_… · A personal API key (tnt_...). Create it in the Tentary app on the page AI & API. Introduction

Path parameters

  • course_id integer required

    The id from list_courses or create_course.

    min 1 Example: 202

Body application/json

  • module_id integer required

    The module of the lesson (from create_module or get_course_outline).

    min 1

  • title string required

    Title that buyers see.

    min length 1 max length 255

  • position integer

    Place among the items of the same module: 1 = first. Default: last.

    min 1

  • draft boolean

    true = buyers do not see it. New items are drafts unless draft is false. draft true removes the release rule.

  • release object can be null

    When buyers get the item. null = at once (also left out on create; left out on update = no change). One rule: days or hours after purchase, a date, or after another lesson is done (only if the course tracks progress). Days and dates unlock at drip_release_hour of get_course_outline. Needs draft false. The answers add lesson_title and enforced to after_lesson (read only; enforced false = the course does not track progress, so the rule has no effect).

    Show 5 fields Hide fields
    • type string required

      Allowed values: days_after_purchasehours_after_purchasedateafter_lesson

    • days integer

      min 1 max 9999

    • hours integer

      min 1 max 9999

    • date string

      Like 2026-12-01.

      pattern ^[0-9]{4}-[0-9]{2}-[0-9]{2}$

    • lesson_id integer

      after_lesson: a lesson of the same course.

      min 1

  • free_preview boolean

    Everyone can watch this lesson as a free preview, also without purchase.

  • content array of object

    What buyers see in the lesson, in order: the content blocks of products, without folders. Images, videos, audio and files come from upload_file. Replaces all content.

    max items 100

    Show 8 fields Hide fields
    • type string required

      text: formatted text. image: shows the image. video: an uploaded video in the player (streamed, converted some minutes after its first use). audio: an audio player. file: a download. video_embed: a YouTube, Vimeo or Loom video. button: a link button. image, video, audio and file need file_id. Type, name and description are stored with the file: one file shows the same way in every product and lesson.

      Allowed values: textimagevideoaudiofilevideo_embedbutton

    • html string

      text: the text as HTML (p, h1-h4, strong, em, ul, ol, li, a, img, blockquote). Placeholders for the buyer: %FIRST_NAME%, %FULL_NAME%, %EMAIL%, %PRODUCT_TITLE%, %VARIANT_TITLE%, %ORDER_ID%, %ACCESS_LINK[Text]%, %ACCESS_LINK_BUTTON[Text]%, %SELLER_NAME%, %SELLER_SUPPORT_EMAIL%; bookings also %ORDER_BOOKING_FROM%, %ORDER_BOOKING_TO%, %ORDER_BOOKING_ZOOM_LINK%.

      max length 65535

    • url string

      video_embed: YouTube, Vimeo or Loom link. button: the link target.

      max length 2048

    • label string

      button: the button text.

      max length 250

    • file_id integer

      image, video, audio, file: a file from upload_file, or a file_id from get_product or get_lesson content.

      min 1

    • name string

      image, video, audio, file: the name of the file (file: shown above the download).

      min length 1 max length 250

    • description string

      file: plain text under the download. audio: the title above the player.

      max length 65535

    • folder string can be null

      Optional folder name. Blocks with the same folder show together. Not in lessons.

      max length 250

Response

Fields of the answer with status 200. Errors always have the same format, see Errors.

  • id integer

    The ID.

  • course_id integer

    The course of the lesson.

  • course_name string

    The course name.

  • module_id integer can be null

    The module of the lesson.

  • title string

    The title.

  • position integer

    Place in its module, 1 = first.

  • draft boolean

    true = buyers do not see it.

  • free_preview boolean

    true = everyone can watch it as a free preview.

  • release object can be null

    When buyers get the item. null = at once.

    One of these variants:

    type: days_after_purchase · 2 fields
    • type string

      The rule type.

      Allowed values: days_after_purchase

    • days integer

      Days after the purchase.

    type: hours_after_purchase · 2 fields
    • type string

      The rule type.

      Allowed values: hours_after_purchase

    • hours integer

      Hours after the purchase.

    type: date · 2 fields
    • type string

      The rule type.

      Allowed values: date

    • date string<date>

      Like 2026-01-31.

    type: after_lesson · 4 fields
    • type string

      The rule type.

      Allowed values: after_lesson

    • lesson_id integer

      The lesson that the buyer must finish first.

    • lesson_title string can be null

      The title of that lesson.

    • enforced boolean

      false = the course does not track progress, so the rule has no effect.

  • content array of object

    Content blocks, in order.

    One of these variants:

    type: text · 2 fields

    Formatted text.

    • type string

      The block type.

      Allowed values: text

    • html string

      The text as HTML.

    type: image, video · 5 fields

    An uploaded image or video.

    • type string

      The block type.

      Allowed values: imagevideo

    • file_id integer

      The file ID (from upload_file).

    • name string

      The name.

    • file_type string

      File extension, like pdf.

    • size_bytes integer can be null

      File size in bytes.

    type: audio, file · 6 fields

    An audio player or a download.

    • type string

      The block type.

      Allowed values: audiofile

    • file_id integer

      The file ID (from upload_file).

    • name string

      The name.

    • description string

      file: text under the download. audio: title above the player.

    • file_type string

      File extension, like pdf.

    • size_bytes integer can be null

      File size in bytes.

    type: video_embed · 2 fields
    • type string

      The block type.

      Allowed values: video_embed

    • url string

      YouTube, Vimeo or Loom link.

    type: button · 3 fields

    A link button.

    • type string

      The block type.

      Allowed values: button

    • label string

      The text that buyers see.

    • url string

      The link.

  • admin_url string<uri>

    The page in the Tentary app.

Start typing to search.