Create Course
Create a new course for the creator with required course information, mango assignment, and optional nested settings.
The dashboard builds a course in two steps — create with a title and mangoes, then fill in the rest through an edit — but this endpoint accepts the whole course in one request, so there is no need to follow with an update.
- Courses are always created as drafts. Use Update Course with
isPublished: trueto publish once the required fields are in place. drip.typecan be set here, butdrip.modulescannot: a new course has no modules yet. Add modules first, then set their schedule via Update Course.instructoris a name, not an ID. An existing instructor with that name (matched case-insensitively) is reused; an unrecognised name creates a new instructor on your account.
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
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": "66c4964c11e7fef26751f3a7",
"title": "Learn JavaScript",
"description": "A comprehensive course on JavaScript",
"coverImage": "https://example.com/cover-image.jpg",
"modules": [
"66c4964c11e7fef26751f3b1",
"66c4964c11e7fef26751f3b2"
],
"creator": "66c4964c11e7fef26751f3a1",
"isPublished": false,
"publishDate": "2025-01-23T12:34:56Z",
"firstChapter": "66c4964c11e7fef26751f3c1",
"secondChapter": "66c4964c11e7fef26751f3c2",
"moduleTerminology": "Section",
"isRecommendationEnabled": false,
"instructor": "6659ca9e5f2acb7abfdcd8fd",
"instructorName": "Jane Smith",
"instructorUpdatedAt": "2025-01-23T12:34:56Z",
"courseDurationMinutes": 90,
"courseDurationFormatted": "1 hr 30 min",
"createdAt": "2025-01-23T12:34:56Z",
"updatedAt": "2025-01-24T12:34:56Z",
"mangoes": [
{
"_id": "66a1390268a76f2f5c9f39a3",
"title": "Introduction to Coding"
}
],
"defaultVideoChapterThumbnail": "https://example.com/thumbnail.jpg",
"categoryId": "61e97c146cf2b4d8c68f3a57",
"drip": {
"type": "by_enrollment",
"modules": [
{
"moduleId": "66c4964c11e7fef26751f3a7",
"openAfterDays": 7,
"openOnDate": "2026-01-31T00:00:00.000Z"
}
]
},
"settings": {
"validityInDays": 30,
"showAsLocked": {
"mangoToSell": "66c4964c11e7fef26751f3a7",
"mangoesToShowAsPaid": [
"66c4964c11e7fef26751f3a7"
]
},
"enableDRM": false,
"disableQna": false,
"disableComments": false
}
}{
"code": 400,
"type": "Bad Request",
"statusMessage": "BAD_REQUEST",
"errorCode": "COURSE_CREATOR_NOT_ELIGIBLE",
"message": "The authenticated user has not completed creator onboarding.",
"result": "The authenticated user has not completed creator onboarding.",
"success": false
}{
"code": 401,
"type": "Unauthorized",
"statusMessage": "UNAUTHORIZED",
"message": "Invalid token",
"result": "Invalid token",
"success": false
}{
"code": 403,
"type": "Forbidden",
"statusMessage": "FORBIDDEN",
"errorCode": "WORKSHOP_MANGO_FORBIDDEN",
"message": "You can not access this api with a TagMango account, only available for whitelabel hosts",
"result": "You can not access this api with a TagMango account, only available for whitelabel hosts",
"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
}{
"code": 429,
"type": "Too Many Requests",
"statusMessage": "TOO_MANY_REQUESTS",
"message": "Request limit exceeded. try after 10 seconds",
"result": "Request limit exceeded. try after 10 seconds",
"success": false
}