Create a draft course with its outline
POST
/apps/{appId}/courses
const url = 'https://api.passion.io/v1/apps/example/courses';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"name":"example","summary":"example","coverFileId":"example","sections":[]}'};
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 \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "summary": "example", "coverFileId": "example", "sections": [] }'Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”appId
required
The id of the App, as Studio shows it.
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
name
required
The name of the course, as members see it.
string
summary
required
One or two sentences that tell members what the course is about.
string
coverFileId
An uploaded image that is the cover of the course.
string
sections
The outline: the sections of the course in order, each with its lessons. Leave it out for an empty course.
Array<object>
object
name
required
The name of the section, as members see it in the course.
string
lessons
required
The lessons of the section, in the order members see them.
Array<object>
object
name
required
The name of the lesson, as members see it in the course.
string
summary
One or two sentences under the name.
string
Responses
Section titled “Responses”OK
Media typeapplication/json
object
courseId
required
string
name
required
string
sections
required
Array<object>
object
sectionId
required
string
name
required
string
lessons
required
Array<object>
object
lessonId
required
string
name
required
string
Examplegenerated
{ "courseId": "example", "name": "example", "sections": [ { "sectionId": "example", "name": "example", "lessons": [ { "lessonId": "example", "name": "example" } ] } ]}