TagMangoTagMango Docs
Course

Get Course by ID

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

Read one course you own, with every module and chapter it contains, in a single response. Use Get Courses to discover course IDs, then this endpoint when you need the full structure of one of them — for example to mirror or synchronise a course in an external system.

The whole hierarchy comes back at once: there is no paging, filtering, or partial selection, so the response grows with the course.

  • modules follows the order the creator arranged modules on the course, and each modules[].chapters follows the order arranged inside that module — not creation order and not alphabetical order. mangoes and settings.showAsLocked.mangoesToShowAsPaid keep their stored order too.
  • Unpublished courses are returned to their creator; read isPublished to tell a draft from a live course.
  • A module or chapter the course still points at but that no longer resolves — deleted, or moved to another course or module — is left out silently rather than reported as an error, so modules[].chapters can be shorter than a chapter count you hold elsewhere.
  • mangoes, settings.showAsLocked.mangoToSell and settings.showAsLocked.mangoesToShowAsPaid carry full mango objects rather than IDs, so no follow-up call is needed. Only mangoes belonging to the authenticated creator resolve; any other reference is dropped, and when mangoToSell is dropped the whole settings.showAsLocked object is omitted.
  • A mango the creator has since deleted is still returned here, carrying isDeleted: true. Check that flag before treating a mango as a live product.
AuthorizationBearer <token>

In: header

Path Parameters

courseId*string

ID of the course to read — the _id returned by Get Courses. Must be a 24-character hex ObjectId belonging to the authenticated creator.

Header Parameters

x-whitelabel-host*string

Host name of the dashboard, ex: mydomain.tagmango.com

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://api-prod-new.tagmango.com/api/v1/external/courses/66c4964c11e7fef26751f3a7" \  -H "x-whitelabel-host: string"
{
  "_id": "66c4964c11e7fef26751f3a7",
  "title": "Learn JavaScript",
  "description": "A comprehensive course on JavaScript",
  "coverImage": "https://example.com/cover-image.jpg",
  "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,
    "enableDRM": false,
    "disableQna": false,
    "disableComments": false,
    "showAsLocked": {
      "mangoToSell": {
        "_id": "66a1390268a76f2f5c9f39a3",
        "title": "Introduction to Coding"
      },
      "mangoesToShowAsPaid": [
        {
          "_id": "66a1390268a76f2f5c9f39a3",
          "title": "Introduction to Coding"
        }
      ]
    }
  },
  "modules": [
    {
      "createdAt": "2024-11-04T13:05:43.799Z",
      "updatedAt": "2024-11-04T13:05:43.799Z",
      "_id": "66c4964c11e7fef26751f3b1",
      "title": "Introduction",
      "creator": "66c4964c11e7fef26751f3a1",
      "course": "66c4964c11e7fef26751f3a7",
      "chapters": [
        {
          "_id": "66c4964c11e7fef26751f3c1",
          "title": "Variables and scope",
          "description": "How let, const and var differ, and when each one is the right choice.",
          "content": "https://cdn.example.com/variables-and-scope.mp4",
          "contentType": "video",
          "contentFileName": "variables-and-scope.mp4",
          "contentSize": 1024000,
          "module": "66c4964c11e7fef26751f3b1",
          "creator": "66c4964c11e7fef26751f3a1",
          "course": "66c4964c11e7fef26751f3a7",
          "compressedVideoUrl": "https://cdn.example.com/variables-and-scope-720p.mp4",
          "totalDuration": 1800,
          "assignment": "61e97c146cf2b4d8c68f3a45",
          "customThumbnail": true,
          "embeddedLink": "https://www.youtube.com/embed/dQw4w9WgXcQ",
          "createdAt": "2025-01-23T12:34:56Z",
          "updatedAt": "2025-01-24T12:34:56Z",
          "defaultThumbnail": "https://cdn.example.com/variables-and-scope-thumb.jpg",
          "isFree": false,
          "additionalContents": [
            "https://cdn.example.com/scope-cheatsheet.pdf"
          ]
        }
      ]
    }
  ]
}
{
  "code": 400,
  "type": "Bad Request",
  "statusMessage": "BAD_REQUEST",
  "success": false,
  "message": "Invalid request",
  "result": "Invalid request"
}
{
  "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": "No course with this ID belongs to the authenticated creator. Nonexistent, deleted, and other creators' courses are all answered identically, so this response never reveals whether a course exists. Fetch valid IDs from Get Courses.",
  "result": "No course with this ID belongs to the authenticated creator. Nonexistent, deleted, and other creators' courses are all answered identically, so this response never reveals whether a course exists. Fetch valid IDs from Get Courses.",
  "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
}