TagMangoTagMango Docs
Course

Get Courses

GET
/api/v1/external/courses

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.
AuthorizationBearer <token>

In: header

Query Parameters

limit?number

Number of items per page of the results

Range1 <= value
page?number

Page number of the results

Range1 <= value
user?string

Unique identifier of the user, if accessed on behalf of a subscriber, courses will be filtered based on active subscription for the mangoes in the course

mangoes?string

Comma seperated list of mango unique identifiers for filtering courses

isPublished?boolean

Filter course by whether published or not

Header Parameters

x-whitelabel-host*string

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

Response Body

application/json

application/json

application/json

curl -X GET "https://api-prod-new.tagmango.com/api/v1/external/courses" \  -H "x-whitelabel-host: string"
{
  "total": 10,
  "data": [
    {
      "_id": "61e97c146cf2b4d8c68f3a40",
      "title": "Learn JavaScript",
      "description": "A comprehensive course on JavaScript",
      "coverImage": "https://example.com/cover-image.jpg",
      "isPublished": false,
      "mangoes": [
        {
          "_id": "66a1390268a76f2f5c9f39a3",
          "creator": "77b2390268a76f2f5c9f39a4",
          "title": "Introduction to Coding"
        }
      ],
      "progress": 50
    }
  ]
}
{
  "code": 400,
  "type": "Bad request",
  "statusMessage": "BAD_REQUEST",
  "message": "Invalid request",
  "success": false
}
{
  "code": 401,
  "type": "Unauthorized",
  "statusMessage": "UNAUTHORIZED",
  "message": "Invalid token",
  "success": false
}