Create Course
Create a new course for the creator with required course information, mango assignment, and optional nested settings.
Authorization
bearer In: header
Header Parameters
Host name of the dashboard, ex: mydomain.tagmango.com
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://api-prod-new.tagmango.com/api/v1/external/courses" \ -H "x-whitelabel-host: string" \ -H "Content-Type: application/json" \ -d '{ "title": "My Course", "description": "<p>Course description</p>", "mangoes": [ "66c4964c11e7fef26751f3a7" ], "coverImage": "https://example.com/cover.jpg" }'{
"_id": "61e97c146cf2b4d8c68f3a40",
"title": "Learn JavaScript",
"description": "A comprehensive course on JavaScript",
"coverImage": "https://example.com/cover-image.jpg",
"modules": [
"61e97c146cf2b4d8c68f3a40",
"61e97c146cf2b4d8c68f3a41"
],
"creator": "61e97c146cf2b4d8c68f3a35",
"isPublished": false,
"publishDate": "2025-01-23T12:34:56Z",
"firstChapter": "61e97c146cf2b4d8c68f3a52",
"secondChapter": "61e97c146cf2b4d8c68f3a53",
"moduleTerminology": "Section",
"createdAt": "2025-01-23T12:34:56Z",
"updatedAt": "2025-01-24T12:34:56Z",
"mangoes": [
"66c4964c11e7fef26751f3a7"
],
"defaultVideoChapterThumbnail": "https://example.com/thumbnail.jpg",
"settings": {
"validityInDays": 30,
"showAsLocked": {
"mangoToSell": "66c4964c11e7fef26751f3a7",
"mangoesToShowAsPaid": [
"66c4964c11e7fef26751f3a7"
]
},
"enableDRM": false,
"disableQna": false,
"disableComments": false
}
}{
"code": 400,
"type": "Bad request",
"statusMessage": "BAD_REQUEST",
"message": "Invalid request",
"success": false
}{
"code": 401,
"type": "Unauthorized",
"statusMessage": "UNAUTHORIZED",
"message": "Invalid token",
"success": false
}{
"code": 403,
"type": "Forbidden",
"statusMessage": "FORBIDDEN",
"errorCode": "COURSE_USER_NOT_CREATOR",
"message": "The user has not completed creator onboarding or is not on a host platform that allows course creation.",
"result": "The user has not completed creator onboarding or is not on a host platform that allows course creation.",
"success": false
}{
"code": 404,
"type": "Not Found",
"statusMessage": "NOT_FOUND",
"errorCode": "COURSE_CREATOR_NOT_FOUND",
"message": "The creator associated with the API key does not exist.",
"result": "The creator associated with the API key does not exist.",
"success": false
}Get Courses GET
Get all the available courses for creator or subscriber. - To access courses for a subscriber, pass the user parameter in query. - Accessed on behalf of a subscriber, courses will be filtered based on active subscription for the mangoes in the course. - Accessed without user parameter, all the courses will be returned for the creator. - Accessed on behalf of a creator, courses will be filtered based on the creator.
Update Course PATCH
Update fields of an existing course. Only provided fields are updated; omitted fields are left unchanged. Toggling `settings.enableDRM` cascades to all video chapters, re-flagging their transcoding state.