TagMangoTagMango Docs
Course

Update Module

PATCH
/api/v1/external/modules/{moduleId}

Update fields of an existing module. Only provided fields are updated; omitted fields are left unchanged.

AuthorizationBearer <token>

In: header

Path Parameters

moduleId*string

Module 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.

title?string

Add a clear title for this module.

Response Body

application/json

application/json

application/json

application/json

curl -X PATCH "https://api-prod-new.tagmango.com/api/v1/external/modules/66c4964c11e7fef26751f3a7" \  -H "x-whitelabel-host: string" \  -H "Content-Type: application/json" \  -d '{}'
{
  "createdAt": "2024-11-04T13:05:43.799Z",
  "updatedAt": "2024-11-04T13:05:43.799Z",
  "_id": "61e97c146cf2b4d8c68f3a40",
  "title": "Introduction",
  "creator": "61e97c146cf2b4d8c68f3a35",
  "course": "61e97c146cf2b4d8c68f3a41",
  "chapters": [
    "61e97c146cf2b4d8c68f3a42",
    "61e97c146cf2b4d8c68f3a43"
  ]
}
{
  "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": 404,
  "type": "Not Found",
  "statusMessage": "NOT_FOUND",
  "errorCode": "MODULE_NOT_FOUND",
  "message": "The module does not exist or does not belong to this creator.",
  "result": "The module does not exist or does not belong to this creator.",
  "success": false
}