Kurse
Create lesson
/ 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}.
Autorisierung
-
Authorizationstring Header erforderlichBearer tnt_…· A personal API key (tnt_...). Create it in the Tentary app on the page AI & API. Einführung
Pfad-Parameter
-
course_idinteger erforderlichThe id from list_courses or create_course.
min.
1Beispiel:202
Body application/json
-
module_idinteger erforderlichThe module of the lesson (from create_module or get_course_outline).
min.
1 -
titlestring erforderlichTitle that buyers see.
min. Länge
1max. Länge255 -
positionintegerPlace among the items of the same module: 1 = first. Default: last.
min.
1 -
draftbooleantrue = buyers do not see it. New items are drafts unless draft is false. draft true removes the release rule.
-
releaseobject kann null seinWhen 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
-
typestring erforderlichMögliche Werte:
days_after_purchasehours_after_purchasedateafter_lesson -
daysintegermin.
1max.9999 -
hoursintegermin.
1max.9999 -
datestringLike 2026-12-01.
Muster
^[0-9]{4}-[0-9]{2}-[0-9]{2}$ -
lesson_idintegerafter_lesson: a lesson of the same course.
min.
1
-
-
free_previewbooleanEveryone can watch this lesson as a free preview, also without purchase.
-
contentarray of objectWhat 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
1008 Felder anzeigen Felder ausblenden
-
typestring erforderlichtext: 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 -
htmlstringtext: 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 -
urlstringvideo_embed: YouTube, Vimeo or Loom link. button: the link target.
max. Länge
2048 -
labelstringbutton: the button text.
max. Länge
250 -
file_idintegerimage, video, audio, file: a file from upload_file, or a file_id from get_product or get_lesson content.
min.
1 -
namestringimage, video, audio, file: the name of the file (file: shown above the download).
min. Länge
1max. Länge250 -
descriptionstringfile: plain text under the download. audio: the title above the player.
max. Länge
65535 -
folderstring kann null seinOptional 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.
-
idintegerThe ID.
-
course_idintegerThe course of the lesson.
-
course_namestringThe course name.
-
module_idinteger kann null seinThe module of the lesson.
-
titlestringThe title.
-
positionintegerPlace in its module, 1 = first.
-
draftbooleantrue = buyers do not see it.
-
free_previewbooleantrue = everyone can watch it as a free preview.
-
releaseobject kann null seinWhen buyers get the item. null = at once.
Eine dieser Varianten:
type: days_after_purchase· 2 Felder-
typestringThe rule type.
Mögliche Werte:
days_after_purchase -
daysintegerDays after the purchase.
type: hours_after_purchase· 2 Felder-
typestringThe rule type.
Mögliche Werte:
hours_after_purchase -
hoursintegerHours after the purchase.
type: date· 2 Felder-
typestringThe rule type.
Mögliche Werte:
date -
datestring<date>Like 2026-01-31.
type: after_lesson· 4 Felder-
typestringThe rule type.
Mögliche Werte:
after_lesson -
lesson_idintegerThe lesson that the buyer must finish first.
-
lesson_titlestring kann null seinThe title of that lesson.
-
enforcedbooleanfalse = the course does not track progress, so the rule has no effect.
-
-
contentarray of objectContent blocks, in order.
Eine dieser Varianten:
type: text· 2 FelderFormatted text.
-
typestringThe block type.
Mögliche Werte:
text -
htmlstringThe text as HTML.
type: image, video· 5 FelderAn uploaded image or video.
-
typestringThe block type.
Mögliche Werte:
imagevideo -
file_idintegerThe file ID (from upload_file).
-
namestringThe name.
-
file_typestringFile extension, like pdf.
-
size_bytesinteger kann null seinFile size in bytes.
type: audio, file· 6 FelderAn audio player or a download.
-
typestringThe block type.
Mögliche Werte:
audiofile -
file_idintegerThe file ID (from upload_file).
-
namestringThe name.
-
descriptionstringfile: text under the download. audio: title above the player.
-
file_typestringFile extension, like pdf.
-
size_bytesinteger kann null seinFile size in bytes.
type: video_embed· 2 Felder-
typestringThe block type.
Mögliche Werte:
video_embed -
urlstringYouTube, Vimeo or Loom link.
type: button· 3 FelderA link button.
-
typestringThe block type.
Mögliche Werte:
button -
labelstringThe text that buyers see.
-
urlstringThe link.
-
-
admin_urlstring<uri>The page in the Tentary app.