Create a lesson in a course
POST
/apps/{appId}/courses/{courseId}/lessons
const url = 'https://api.passion.io/v1/apps/example/courses/example/lessons';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"sectionId":"example","name":"example","summary":"example","coverFileId":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.passion.io/v1/apps/example/courses/example/lessons \ --header 'Content-Type: application/json' \ --data '{ "sectionId": "example", "name": "example", "summary": "example", "coverFileId": "example" }'Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”appId
required
The id of the App, as Studio shows it.
string
courseId
required
The id of a course, as list_courses lists it.
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
sectionId
The section of the course. Leave it out for a course with no sections.
string
name
required
The name of the lesson, as members see it in the course.
string
summary
One or two sentences under the name.
string
coverFileId
An uploaded image that is the cover of the lesson.
string
Examplegenerated
{ "sectionId": "example", "name": "example", "summary": "example", "coverFileId": "example"}Responses
Section titled “Responses”OK