Skip to main content

Create a Course

This endpoint creates a course.

info

This operation requires authentication.

HTTP Request

POST /api/v2/course/

Parameters

NameInTypeRequiredDescription
bodybodyCoursetrueThe request body (course params)

Example Body Parameters

{
"name": "string",
"description": "string",
"type": "string",
"privacy": "string",
"image_original": "string",
"categories": [integer]
}

Example Request

const inputBody = '{
"name": "string",
"description": "string",
"type": "string",
"privacy": "string",
"image_original": "string",
"categories": [integer]
}';
const headers = {
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json',
'Authorization': 'Bearer {access_token}'
};

fetch('/api/v2/course/',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});

Responses

StatusMeaningDescriptionSchema
201CreatedResponse status codeCourse