Replace the content of a lesson block
const url = 'https://api.passion.io/v1/apps/example/lessons/example/blocks/example';const options = { method: 'PUT', headers: {'Content-Type': 'application/json'}, body: '{"block":{"kind":"text","markdown":"example"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.passion.io/v1/apps/example/lessons/example/blocks/example \ --header 'Content-Type: application/json' \ --data '{ "block": { "kind": "text", "markdown": "example" } }'Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The id of the App, as Studio shows it.
The id of a lesson, as get_course or create_lesson answers it.
The id of a block of the lesson, as get_course answers it.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Text that the member reads.
object
The text in Markdown: headings, lists, bold, italic and links.
One uploaded image.
object
The id of a file that create_upload answered, after the file is uploaded.
One uploaded video. Give fileId or url, not both.
object
The id of a file that create_upload answered, after the file is uploaded.
One video from YouTube or Vimeo. Give fileId or url, not both.
object
A YouTube or Vimeo link.
One uploaded audio track.
object
The id of a file that create_upload answered, after the file is uploaded.
Questions and answers. Members open a question to read its answer.
object
Each item has a question and its answer, in the order members see them.
object
A button that opens a web page.
object
The label of the button.
The page the button opens.
Responses
Section titled “Responses”OK
object
Example
{ "kind": "text"}