Create an assessment question. Requires assessments.create permission.
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
fields[] |
string[] | no | Select which fields to include in the response. When omitted, all fields are returned. When provided, only the specified fields are included. (e.g., ?fields[]=id&fields[]=question) One of: assessmentId, canonicalId, createdAt, explanation, id, isCurrent, options, order, points, question, required, type, updatedAt, version. |
with[] |
string[] | no | Include related resources in the response. Pass multiple values as separate query parameters (e.g., ?with[]=createdBy&with[]=updatedBy). One of: createdBy, updatedBy, assessment. |
Request body
Required.
application/json
assessmentIdstring (uuid) · requiredcorrectAnswersobject[] — Array of correct answer indices (for MC) or [true/false] for T/F questionsexplanationstringoptionsstring[]orderintegerpointsintegerquestionstring · requiredrequiredbooleantypestring · required
{
"assessmentId": "01944f76-3f07-76fe-b4fe-f8e5b0db5abc",
"correctAnswers": [
0,
2
],
"explanation": "Always wear protective equipment when handling hazardous materials.",
"options": [
"Option A",
"Option B",
"Option C",
"Option D"
],
"order": 0,
"points": 1,
"question": "What is the correct procedure for handling hazardous materials?",
"required": true,
"type": "multiple_choice"
}
Responses
| Status | Description |
|---|---|
| 201 | A json object describing the newly created assessment question |
| 400 | The request was rejected |
| 403 | The requesting user lacks appropriate permissions |
| 422 | Validation errors |
Response 201 body
idstring (uuid)assessmentobjectassessmentIdstring (uuid)canonicalIdstring (uuid)createdAtstring (date-time)createdByobjectexplanationstringisCurrentbooleanoptionsstring[]orderintegerpointsintegerquestionstringrequiredbooleantypestringupdatedAtstring (date-time)updatedByobjectversioninteger
{
"id": "01944f76-3f07-76fe-b4fe-f8e5b0db5abe",
"assessment": {
"id": "01944f76-3f07-76fe-b4fe-f8e5b0db5abe",
"title": "Safety Protocol Quiz"
},
"assessmentId": "01944f76-3f07-76fe-b4fe-f8e5b0db5abc",
"canonicalId": "01944f76-3f07-76fe-b4fe-f8e5b0db5abe",
"createdAt": "string",
"createdBy": {
"id": "019222d9-d87d-7724-bba6-ba91503ea311",
"firstName": "John",
"lastName": "Doe"
},
"explanation": "Always wear protective equipment when handling hazardous materials.",
"isCurrent": true,
"options": [
"Option A",
"Option B",
"Option C",
"Option D"
],
"order": 0,
"points": 1,
"question": "What is the correct procedure for handling hazardous materials?",
"required": true,
"type": "multiple_choice",
"updatedAt": "string",
"updatedBy": {
"id": "019222d9-d87d-7724-bba6-ba91503ea311",
"firstName": "John",
"lastName": "Doe"
},
"version": 1
}