Skip to main content
PATCH
/
api
/
public
/
v1
/
training
/
enrollments
/
{id}
Update enrollment
curl --request PATCH \
  --url https://app.msportal.ai/api/public/v1/training/enrollments/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "status": "not_started",
  "progress": 50,
  "score": 50,
  "dueDate": "2023-11-07T05:31:56Z"
}
'
{
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "course": {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "title": "<string>",
      "courseType": "<string>"
    },
    "user": {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "fullName": "<string>",
      "email": "<string>"
    },
    "status": "not_started",
    "progress": 50,
    "score": 123,
    "enrolledAt": "2023-11-07T05:31:56Z",
    "startedAt": "2023-11-07T05:31:56Z",
    "completedAt": "2023-11-07T05:31:56Z",
    "dueDate": "2023-11-07T05:31:56Z",
    "timeSpentSeconds": 123,
    "certificateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  }
}

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

Enrollment ID

Body

application/json
status
enum<string>

Enrollment status

Available options:
not_started,
in_progress,
completed
progress
number

Progress percentage

Required range: 0 <= x <= 100
score
number

Score achieved

Required range: 0 <= x <= 100
dueDate
string<date-time> | null

Due date (null to clear)

Response

Enrollment updated

data
object
required