Skip to main content
POST
Create a Lesson

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

Send fields directly or inside attributes. JSON numbers and booleans must use their native types. Form requests accept number and boolean values, including nested fields such as attributes[is_published]. Use JSON for null values. Empty strings and the text null are not treated as null.

section_id
string
required

ID of the section for this lesson. Required and cannot be null.

Required string length: 1 - 255
name
string
required

Required lesson title, up to 255 characters. Cannot be blank or null.

Required string length: 1 - 255
description
string | null

Lesson description, up to 200000 characters. Defaults to an empty string when omitted or null. Use content_format=markdown to convert Markdown to HTML.

Maximum string length: 200000
body
string | null

Lesson content in HTML, or Markdown with content_format=markdown. Maximum 200000 characters. Omitted or null gives an empty body. Responses return HTML. Scripts, iframes, object and embed tags, and attachment markup are not accepted. Use the video or embed fields for embedded media. Use HTML blockquote tags for quotes because Markdown blockquotes display as ordinary text.

Maximum string length: 200000
content_format
enum<string> | null

Format of the body and description sent in this request. Use html (default when omitted or null) or markdown. Responses return HTML. This does not change content omitted from the request.

Available options:
html,
markdown,
null
Maximum string length: 200000
position
integer | null

Position in the section, starting at 1. Omitted, null or 0 places the lesson last. Inserting at an occupied position moves later lessons down.

Required range: x >= 0
is_progression_locked
boolean | null

Lock the rest of the program until members complete all steps in this lesson. If a drip delay also applies, both conditions must be met. Defaults to false when omitted or null.

is_published
boolean | null

Publish this lesson. Defaults to true when omitted or null, including in unpublished programs. Send false to create a draft. Program publication and member access still apply.

settings_embed_wistia
string | null

Wistia video ID or supported HTTP(S) share, watch or embed URL for lesson_type=video. URLs are saved as IDs. Omitted or null leaves it empty. A changed nonblank value clears the other video providers and settings_embed_code, while keeping embed_code. Supply one video source. For multiple changed sources, priority is Wistia, YouTube, Vimeo, Loom, then settings_embed_code.

Maximum string length: 200000
settings_embed_vimeo
string | null

Vimeo video ID or supported HTTP(S) share, watch or embed URL for lesson_type=video. URLs are saved as IDs. Omitted or null leaves it empty. A changed nonblank value clears the other video providers and settings_embed_code, while keeping embed_code. Supply one video source. For multiple changed sources, priority is Wistia, YouTube, Vimeo, Loom, then settings_embed_code.

Maximum string length: 200000
settings_embed_youtube
string | null

YouTube video ID or supported HTTP(S) share, watch or embed URL for lesson_type=video. URLs are saved as IDs. Omitted or null leaves it empty. A changed nonblank value clears the other video providers and settings_embed_code, while keeping embed_code. Supply one video source. For multiple changed sources, priority is Wistia, YouTube, Vimeo, Loom, then settings_embed_code.

Maximum string length: 200000
settings_embed_loom
string | null

Loom video ID or supported HTTP(S) share, watch or embed URL for lesson_type=video. URLs are saved as IDs. Omitted or null leaves it empty. A changed nonblank value clears the other video providers and settings_embed_code, while keeping embed_code. Supply one video source. For multiple changed sources, priority is Wistia, YouTube, Vimeo, Loom, then settings_embed_code.

Maximum string length: 200000
settings_embed_code
string | null

Custom video embed HTML for lesson_type=video. Defaults to empty when omitted or null. A nonblank value clears video provider fields unless a changed provider takes precedence. The separate embed_code field is kept. Supply one video source per request.

Maximum string length: 200000
embed_code
string | null

Custom HTML for lesson_type=embed. Defaults to empty when omitted or null. This is separate from settings_embed_code and keeps any video provider settings.

Maximum string length: 200000
lesson_type
enum<string> | null

Lesson type. Defaults to video when omitted or null.

Available options:
video,
text,
pdf,
embed,
audio,
null
Maximum string length: 200000
drip_delay
integer | null

Additional delay in days, from 0 to 32767. Defaults to 0 when omitted or null. Adds to the section unlock time, including the member drip boost. If program access has a drip start date, uses the earliest start date plus section and lesson delays, without the boost. Progression locks and access restrictions still apply.

Required range: 0 <= x <= 32767

Response

Successful request.

id
string
required
section_id
string
required
name
string
required
position
integer | null
required
lesson_type
enum<string>
required
Available options:
video,
text,
pdf,
embed,
audio
drip_delay
integer
required
is_published
boolean
required
is_progression_locked
boolean | null
required
settings_embed_wistia
string | null
settings_embed_vimeo
string | null
settings_embed_youtube
string | null
settings_embed_loom
string | null
settings_embed_code
string | null
embed_code
string | null
description
string
body
string

Rendered HTML.

transcripts
object[]
media
object