Skip to content

Add a block to a lesson

POST
/apps/{appId}/lessons/{lessonId}/blocks
curl --request POST \
--url https://api.passion.io/v1/apps/example/lessons/example/blocks \
--header 'Content-Type: application/json' \
--data '{ "block": { "kind": "text", "markdown": "example" }, "position": 1 }'
appId
required

The id of the App, as Studio shows it.

string
/^[1-9][0-9]*$/
lessonId
required

The id of a lesson, as get_course or create_lesson answers it.

string
/^[0-9A-Za-z-]+$/
Media typeapplication/json
object
block
required
Any of:

Text that the member reads.

object
kind
required
Allowed value: text
markdown
required

The text in Markdown: headings, lists, bold, italic and links.

string
>= 1 characters
position

Where the block goes: 0 puts it first. Leave it out to put the block last.

integer
<= 9007199254740991

OK

Media typeapplication/json
object
blockId
required
string
lessonId
required
string
kind
required
string
Allowed values: text image video audio files faq button
Example
{
"kind": "text"
}