Update Course
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.
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 PATCH "https://api-prod-new.tagmango.com/api/v1/external/courses/{courseId}" \ -H "x-whitelabel-host: string" \ -H "Content-Type: application/json" \ -d '{}'{
"_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_DRM_NOT_ALLOWED",
"message": "DRM-enabled courses require the creator to have DRM permissions enabled on their account.",
"result": "DRM-enabled courses require the creator to have DRM permissions enabled on their account.",
"success": false
}{
"code": 404,
"type": "Not Found",
"statusMessage": "NOT_FOUND",
"errorCode": "COURSE_NOT_FOUND",
"message": "The course does not exist, is deleted, or does not belong to this creator.",
"result": "The course does not exist, is deleted, or does not belong to this creator.",
"success": false
}