Assign one or more courses to a specific user.
API Key. Go to your Konstantly site > Settings > API and copy the value from there.
URL Parameters
Request Body
Array of course IDs to assign to the user
Timestamp when the courses should be assigned (UTC)
Timestamp for assignment completion deadline (UTC)
Response
Array of created course assignmentsShow Assignment properties
Timestamp when course was assigned
Timestamp when user started the course
Timestamp when assignment expires
Timestamp when user finished the course
Whether user has started the course
Whether user has finished the course
Whether assignment has expired
Error Responses
Validation error responseShow Error object properties
Field-specific validation errors
Not Found error responseShow Error object properties
curl --request POST \
--url 'https://YOURSITE.konstant.ly/openapi/v1/users/1234567890/assignments' \
--header 'X-API-KEY: 1qaz2wsx3edc4rfv1qaz2wsx3edc4rfv' \
--header 'Content-Type: application/json' \
--data '{
"courses": [110, 150],
"deadlineAt": 1704067200
}'
{
"assignments": [
{
"assignedAt": 1443183322,
"startedAt": 0,
"deadlineAt": 1704067200,
"finishedAt": 0,
"progressValue": 0,
"resultValue": 0,
"isCourseStarted": false,
"isCourseFinished": false,
"isExpired": false,
"course": {
"id": 110,
"name": "Sales Fundamentals",
"annotation": "Core sales concepts and techniques",
"isDraft": false,
"createdAt": 1507807711,
"updatedAt": 1507808372,
"publishedAt": 1508225229,
"image": null
}
}
]
}