Skip to main content
PATCH
/
api
/
public
/
v1
/
training
/
courses
/
{id}
Update training course
curl --request PATCH \
  --url https://app.msportal.ai/api/public/v1/training/courses/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "title": "<string>",
  "description": "<string>",
  "courseType": "<string>",
  "courseCategory": "<string>",
  "companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "isMandatory": true,
  "passingScore": 50,
  "duration": 2,
  "maxAttempts": 2,
  "expiresAfterDays": 2,
  "youtubeUrl": "<string>",
  "artworkUrl": "<string>"
}
'
{
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "title": "<string>",
    "description": "<string>",
    "courseType": "<string>",
    "courseCategory": "<string>",
    "isMandatory": true,
    "passingScore": 123,
    "duration": 123,
    "maxAttempts": 123,
    "expiresAfterDays": 123,
    "artworkUrl": "<string>",
    "youtubeUrl": "<string>",
    "isGlobal": true,
    "company": {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "<string>"
    },
    "enrollmentCount": 123,
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "scormUrl": "<string>",
    "metadata": {}
  }
}

Authorizations

Authorization
string
header
required

Use your API key as a Bearer token. API keys can be generated in Settings → Integrations → API Access.

Path Parameters

id
string<uuid>
required

Course ID

Body

application/json
title
string

Course title

Required string length: 1 - 200
description
string

Course description

Maximum string length: 5000
courseType
string

Course type

Maximum string length: 50
courseCategory
string | null

Course category (null to clear)

Maximum string length: 100
companyId
string<uuid> | null

Company ID (null to clear)

isMandatory
boolean

Whether completion is mandatory

passingScore
number

Required passing score

Required range: 0 <= x <= 100
duration
number | null

Duration in minutes (null to clear)

Required range: x >= 1
maxAttempts
number | null

Max attempts (null to clear)

Required range: x >= 1
expiresAfterDays
number | null

Certificate validity (null to clear)

Required range: x >= 1
youtubeUrl
string<uri> | null

YouTube URL (null to clear)

artworkUrl
string<uri> | null

Artwork URL (null to clear)

Response

Course updated

data
object
required