curl --request POST \
--url https://app.msportal.ai/api/public/v1/training/enrollments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"courseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"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"
}
}Enroll a user in a training course.
curl --request POST \
--url https://app.msportal.ai/api/public/v1/training/enrollments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"courseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"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"
}
}Use your API key as a Bearer token. API keys can be generated in Settings → Integrations → API Access.
Enrollment created
Show child attributes