Docs API reference

Quizzes (assessments)

Build quizzes from questions and pools.

An assessment belongs to a course version. Its items are either a pinned question version or a pool that draws random questions at attempt time.

9 endpoints · base path /api/v1

PUT/api/v1/assessment-items/{id}#

Change an item's points

AccessAdmin, or an API key with the write scope.

Sets pointsOverride (omit to use the question's own points) and, for pools, poolDrawCount.

Parameters

NameInTypeNotes
idrequiredpathstring (uuid)The id from a previous response.

Request body application/json · ItemUpdate

FieldTypeNotes
pointsOverridenumbermin 0
poolDrawCountinteger (int32)min 1
Example request body
{
  "pointsOverride": 1.5,
  "poolDrawCount": 1
}

Responses

204No Content

Errors

StatusWhen
400The request was malformed or failed validation. errors lists each field.
401Missing, invalid or expired credentials.
403Your credential is valid but isn't allowed to do this.
404It doesn't exist, or it belongs to another tenant (the two look the same on purpose).

Errors use RFC 9457 problem details.

ASSESSMENT_ITEM_ID=37386ae0-0ea5-44e0-a02e-161f807af560
curl -X PUT "$LMS_URL/api/v1/assessment-items/$ASSESSMENT_ITEM_ID" \
  -H "X-API-Key: $LMS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "pointsOverride": 1.5,
  "poolDrawCount": 1
}'
DELETE/api/v1/assessment-items/{id}#

Remove an item from a quiz

AccessAdmin, or an API key with the write scope.

Removes the item. Remaining items are renumbered.

Parameters

NameInTypeNotes
idrequiredpathstring (uuid)The id from a previous response.

Responses

204No Content

Errors

StatusWhen
401Missing, invalid or expired credentials.
403Your credential is valid but isn't allowed to do this.
404It doesn't exist, or it belongs to another tenant (the two look the same on purpose).

Errors use RFC 9457 problem details.

ASSESSMENT_ITEM_ID=37386ae0-0ea5-44e0-a02e-161f807af560
curl -X DELETE "$LMS_URL/api/v1/assessment-items/$ASSESSMENT_ITEM_ID" \
  -H "X-API-Key: $LMS_KEY"
POST/api/v1/assessment-items/{id}/upgrade#

Use the latest version of the question

AccessAdmin, or an API key with the write scope.

Re-points a quiz item at the question's newest version. This is deliberate: published quizzes never change underneath learners.

Parameters

NameInTypeNotes
idrequiredpathstring (uuid)The id from a previous response.

Responses

204No Content

Errors

StatusWhen
400The item is a pool, not a pinned question.
401Missing, invalid or expired credentials.
403Your credential is valid but isn't allowed to do this.
404It doesn't exist, or it belongs to another tenant (the two look the same on purpose).

Errors use RFC 9457 problem details.

ASSESSMENT_ITEM_ID=37386ae0-0ea5-44e0-a02e-161f807af560
curl -X POST "$LMS_URL/api/v1/assessment-items/$ASSESSMENT_ITEM_ID/upgrade" \
  -H "X-API-Key: $LMS_KEY"
GET/api/v1/assessments/{id}#

Get a quiz

AccessAdmin, or an API key with the read or write scope.

Returns the quiz's settings and its ordered items. Each item says whether it is a QUESTION (pinned to a specific version) or a POOL, its effective points, and upgradeAvailable when the question has a newer version than the one pinned. totalPoints sums everything (a pool counts poolDrawCount × points).

Parameters

NameInTypeNotes
idrequiredpathstring (uuid)The id from a previous response.

Responses

Example response
{
  "courseVersionId": "81858c49-de53-4f79-a33c-f6900c5a0b75",
  "feedbackMode": "AFTER_ATTEMPT",
  "id": "37386ae0-0ea5-44e0-a02e-161f807af560",
  "instructions": "string",
  "items": [
    {
      "id": "37386ae0-0ea5-44e0-a02e-161f807af560",
      "kind": "BUSINESS",
      "latestVersionNumber": 1,
      "points": 1,
      "poolBankId": "2d96d03c-9296-457c-ae5b-8193fa93cc0c",
      "poolBankName": "string",
      "poolDrawCount": 1,
      "position": 0,
      "prompt": "Where do you go when the fire alarm sounds?",
      "questionId": "53cf0780-692f-4f80-ae4a-4c3fa7aa8180",
      "questionVersionId": "feab681a-824d-43fa-a46a-64050ba5aed2",
      "type": "SINGLE_CHOICE",
      "upgradeAvailable": true,
      "versionNumber": 1
    }
  ],
  "maxAttempts": 3,
  "passPercent": 70,
  "shuffleOptions": true,
  "shuffleQuestions": true,
  "status": "ACTIVE",
  "timeLimitSeconds": 1,
  "title": "Workplace Safety Essentials",
  "totalPoints": 1.5
}

Errors

StatusWhen
401Missing, invalid or expired credentials.
403Your credential is valid but isn't allowed to do this.
404It doesn't exist, or it belongs to another tenant (the two look the same on purpose).

Errors use RFC 9457 problem details.

ASSESSMENT_ID=37386ae0-0ea5-44e0-a02e-161f807af560
curl -X GET "$LMS_URL/api/v1/assessments/$ASSESSMENT_ID" \
  -H "X-API-Key: $LMS_KEY"
PUT/api/v1/assessments/{id}#

Update a quiz's settings

AccessAdmin, or an API key with the write scope.

Replaces the quiz's settings. Only quizzes in a draft can be changed.

Parameters

NameInTypeNotes
idrequiredpathstring (uuid)The id from a previous response.

Request body application/json · AssessmentInput

FieldTypeNotes
feedbackModestringmatches NEVER|AFTER_ATTEMPT|AFTER_PASS
instructionsstring—
maxAttemptsinteger (int32)min 1
passPercentnumber0 to 100
shuffleOptionsboolean—
shuffleQuestionsboolean—
timeLimitSecondsinteger (int32)min 1
titlerequiredstringmin length 1
Example request body
{
  "title": "Safety knowledge check",
  "passPercent": 80,
  "maxAttempts": 2,
  "feedbackMode": "AFTER_PASS"
}

Responses

204No Content

Errors

StatusWhen
400The request was malformed or failed validation. errors lists each field.
401Missing, invalid or expired credentials.
403Your credential is valid but isn't allowed to do this.
404It doesn't exist, or it belongs to another tenant (the two look the same on purpose).

Errors use RFC 9457 problem details.

ASSESSMENT_ID=37386ae0-0ea5-44e0-a02e-161f807af560
curl -X PUT "$LMS_URL/api/v1/assessments/$ASSESSMENT_ID" \
  -H "X-API-Key: $LMS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "title": "Safety knowledge check",
  "passPercent": 80,
  "maxAttempts": 2,
  "feedbackMode": "AFTER_PASS"
}'
DELETE/api/v1/assessments/{id}#

Delete a quiz

AccessAdmin, or an API key with the write scope.

Deletes the quiz and its items. Its questions stay in your banks.

Parameters

NameInTypeNotes
idrequiredpathstring (uuid)The id from a previous response.

Responses

204No Content

Errors

StatusWhen
401Missing, invalid or expired credentials.
403Your credential is valid but isn't allowed to do this.
404It doesn't exist, or it belongs to another tenant (the two look the same on purpose).
409A lesson block still uses this quiz. Remove the block first.

Errors use RFC 9457 problem details.

ASSESSMENT_ID=37386ae0-0ea5-44e0-a02e-161f807af560
curl -X DELETE "$LMS_URL/api/v1/assessments/$ASSESSMENT_ID" \
  -H "X-API-Key: $LMS_KEY"
POST/api/v1/assessments/{id}/items#

Add a question or pool to a quiz

AccessAdmin, or an API key with the write scope.

Send exactly one of:

  • questionId: pins the question's latest version
  • questionVersionId: pins a specific version
  • poolBankId: draws random questions from a bank at attempt time. A pool also needs poolDrawCount and pointsOverride (points per drawn question).

pointsOverride on a single question overrides its own points for this quiz only.

Parameters

NameInTypeNotes
idrequiredpathstring (uuid)The id from a previous response.

Request body application/json · ItemCreate

FieldTypeNotes
pointsOverridenumbermin 0
poolBankIdstring (uuid)—
poolDrawCountinteger (int32)min 1
positioninteger (int32)min 0
questionIdstring (uuid)—
questionVersionIdstring (uuid)—
Example request body
{
  "questionId": "2d94b1a6-7c30-4e5f-8a19-3b6c0f72d845",
  "pointsOverride": 2
}

Responses

201Created· IdResponse
Example response
{
  "id": "37386ae0-0ea5-44e0-a02e-161f807af560"
}

Errors

StatusWhen
400Not exactly one of the three, a pool missing its count or points, or an unknown or archived question.
401Missing, invalid or expired credentials.
403Your credential is valid but isn't allowed to do this.
404It doesn't exist, or it belongs to another tenant (the two look the same on purpose).

Errors use RFC 9457 problem details.

ASSESSMENT_ID=37386ae0-0ea5-44e0-a02e-161f807af560
curl -X POST "$LMS_URL/api/v1/assessments/$ASSESSMENT_ID/items" \
  -H "X-API-Key: $LMS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "questionId": "2d94b1a6-7c30-4e5f-8a19-3b6c0f72d845",
  "pointsOverride": 2
}'
POST/api/v1/assessments/{id}/items/order#

Reorder a quiz's items

AccessAdmin, or an API key with the write scope.

Sets the order. ids must list every item exactly once.

Parameters

NameInTypeNotes
idrequiredpathstring (uuid)The id from a previous response.

Request body application/json · Order

FieldTypeNotes
idsrequiredstring (uuid)[]min 1 item
Example request body
{
  "ids": [
    "37386ae0-0ea5-44e0-a02e-161f807af560"
  ]
}

Responses

204No Content

Errors

StatusWhen
400The request was malformed or failed validation. errors lists each field.
401Missing, invalid or expired credentials.
403Your credential is valid but isn't allowed to do this.
404It doesn't exist, or it belongs to another tenant (the two look the same on purpose).

Errors use RFC 9457 problem details.

ASSESSMENT_ID=37386ae0-0ea5-44e0-a02e-161f807af560
curl -X POST "$LMS_URL/api/v1/assessments/$ASSESSMENT_ID/items/order" \
  -H "X-API-Key: $LMS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "ids": [
    "37386ae0-0ea5-44e0-a02e-161f807af560"
  ]
}'
POST/api/v1/courses/{courseId}/draft/assessments#

Create a quiz

AccessAdmin, or an API key with the write scope.

Creates an assessment in the course's draft. It does nothing until you add questions (POST /assessments/{id}/items) and place it in a lesson with an ASSESSMENT block.

Settings: passPercent (default 70), maxAttempts (omit for unlimited), timeLimitSeconds (omit for untimed), shuffling, and feedbackMode (NEVER, AFTER_ATTEMPT or AFTER_PASS).

Parameters

NameInTypeNotes
courseIdrequiredpathstring (uuid)The id from a previous response.

Request body application/json · AssessmentInput

FieldTypeNotes
feedbackModestringmatches NEVER|AFTER_ATTEMPT|AFTER_PASS
instructionsstring—
maxAttemptsinteger (int32)min 1
passPercentnumber0 to 100
shuffleOptionsboolean—
shuffleQuestionsboolean—
timeLimitSecondsinteger (int32)min 1
titlerequiredstringmin length 1
Example request body
{
  "title": "Safety knowledge check",
  "instructions": "Answer every question. You need 70% to pass.",
  "passPercent": 70,
  "maxAttempts": 3,
  "timeLimitSeconds": 900,
  "shuffleQuestions": true,
  "feedbackMode": "AFTER_ATTEMPT"
}

Responses

201Created· IdResponse
Example response
{
  "id": "37386ae0-0ea5-44e0-a02e-161f807af560"
}

Errors

StatusWhen
400The request was malformed or failed validation. errors lists each field.
401Missing, invalid or expired credentials.
403Your credential is valid but isn't allowed to do this.
404It doesn't exist, or it belongs to another tenant (the two look the same on purpose).
409The course has no draft.

Errors use RFC 9457 problem details.

COURSE_ID=ecec91e5-4eb9-4c55-a6a7-b3c44ebe7561
curl -X POST "$LMS_URL/api/v1/courses/$COURSE_ID/draft/assessments" \
  -H "X-API-Key: $LMS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "title": "Safety knowledge check",
  "instructions": "Answer every question. You need 70% to pass.",
  "passPercent": 70,
  "maxAttempts": 3,
  "timeLimitSeconds": 900,
  "shuffleQuestions": true,
  "feedbackMode": "AFTER_ATTEMPT"
}'

Type to search guides and every endpoint.