Deutsch DE
API-Referenz
API-Referenz

Kurse

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}.

Ändert sofort MCP-Werkzeug create_lesson

Autorisierung

  • Authorization string Header erforderlich

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

Pfad-Parameter

  • course_id integer erforderlich

    The id from list_courses or create_course.

    min. 1 Beispiel: 202

Body application/json

  • module_id integer erforderlich

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

    min. 1

  • title string erforderlich

    Title that buyers see.

    min. Länge 1 max. Länge 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 kann null sein

    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).

    5 Felder anzeigen Felder ausblenden
    • type string erforderlich

      Mögliche Werte: days_after_purchasehours_after_purchasedateafter_lesson

    • days integer

      min. 1 max. 9999

    • hours integer

      min. 1 max. 9999

    • date string

      Like 2026-12-01.

      Muster ^[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. Einträge 100

    8 Felder anzeigen Felder ausblenden
    • type string erforderlich

      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.

      Mögliche Werte: 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. Länge 65535

    • url string

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

      max. Länge 2048

    • label string

      button: the button text.

      max. Länge 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. Länge 1 max. Länge 250

    • description string

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

      max. Länge 65535

    • folder string kann null sein

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

      max. Länge 250

Antwort

Felder der Antwort mit Status 200. Fehler haben immer dasselbe Format, siehe Fehler.

  • id integer

    The ID.

  • course_id integer

    The course of the lesson.

  • course_name string

    The course name.

  • module_id integer kann null sein

    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 kann null sein

    When buyers get the item. null = at once.

    Eine dieser Varianten:

    type: days_after_purchase · 2 Felder
    • type string

      The rule type.

      Mögliche Werte: days_after_purchase

    • days integer

      Days after the purchase.

    type: hours_after_purchase · 2 Felder
    • type string

      The rule type.

      Mögliche Werte: hours_after_purchase

    • hours integer

      Hours after the purchase.

    type: date · 2 Felder
    • type string

      The rule type.

      Mögliche Werte: date

    • date string<date>

      Like 2026-01-31.

    type: after_lesson · 4 Felder
    • type string

      The rule type.

      Mögliche Werte: after_lesson

    • lesson_id integer

      The lesson that the buyer must finish first.

    • lesson_title string kann null sein

      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.

    Eine dieser Varianten:

    type: text · 2 Felder

    Formatted text.

    • type string

      The block type.

      Mögliche Werte: text

    • html string

      The text as HTML.

    type: image, video · 5 Felder

    An uploaded image or video.

    • type string

      The block type.

      Mögliche Werte: imagevideo

    • file_id integer

      The file ID (from upload_file).

    • name string

      The name.

    • file_type string

      File extension, like pdf.

    • size_bytes integer kann null sein

      File size in bytes.

    type: audio, file · 6 Felder

    An audio player or a download.

    • type string

      The block type.

      Mögliche Werte: 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 kann null sein

      File size in bytes.

    type: video_embed · 2 Felder
    • type string

      The block type.

      Mögliche Werte: video_embed

    • url string

      YouTube, Vimeo or Loom link.

    type: button · 3 Felder

    A link button.

    • type string

      The block type.

      Mögliche Werte: button

    • label string

      The text that buyers see.

    • url string

      The link.

  • admin_url string<uri>

    The page in the Tentary app.

Tippe, um zu suchen.