TagMangoTagMango Docs
Course

Update Course

PATCH
/api/v1/external/courses/{courseId}

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.
  • isPublished: true requires the course to already have a description, a cover image, and at least one linked mango. The publish date is stamped the first time a course goes live.
  • drip sets the drip type and the whole per-module unlock schedule in one request. For by_enrollment and by_date the schedule must name every module in the course; a partial schedule is rejected rather than half-applied. type: null and by_completion clear any existing schedule. Adding or removing a module afterwards does not update the schedule — send this request again whenever the course's module list changes, or a newly added module stays unlocked.
  • categoryId and isRecommendationEnabled require the COURSE_RECOMMENDATION feature on the creator account. Clearing categoryId also turns recommendation off.
  • instructor is a name, not an ID. It is matched case-insensitively against your existing instructors and reused when it matches; an unrecognised name creates a new instructor on your account. Pass null to unassign without deleting the instructor record.
  • updateThumbnailForAllChapters overwrites the thumbnail on every existing video chapter with defaultVideoChapterThumbnail.
AuthorizationBearer <token>

In: header

Path Parameters

courseId*string

Course object id

Header Parameters

x-whitelabel-host*string

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 PATCH "https://api-prod-new.tagmango.com/api/v1/external/courses/66c4964c11e7fef26751f3a7" \  -H "x-whitelabel-host: string" \  -H "Content-Type: application/json" \  -d '{}'
{
  "_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_TITLE_REQUIRED",
  "message": "The course title is empty or whitespace only.",
  "result": "The course title is empty or whitespace only.",
  "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_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
}

{
  "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
}