Create an assessment. 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[]=title) One of: active, canonicalId, createdAt, description, educationalContentId, id, isCurrent, passPercentage, shuffleQuestions, status, timeLimitMinutes, title, 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, educationalContent, questions. |
Request body
Required.
application/json
activebooleandescriptionstringeducationalContentIdstring (uuid) · requiredpassPercentageintegershuffleQuestionsbooleanstatusstringtimeLimitMinutesintegertitlestring · required
{
"active": true,
"description": "Test your knowledge of basic safety protocols",
"educationalContentId": "01944f76-3f07-76fe-b4fe-f8e5b0db5abc",
"passPercentage": 70,
"shuffleQuestions": false,
"status": "draft",
"timeLimitMinutes": 30,
"title": "Safety Protocol Quiz"
}
Responses
| Status | Description |
|---|---|
| 201 | A json object describing the newly created assessment |
| 400 | The request was rejected |
| 403 | The requesting user lacks appropriate permissions |
| 422 | Validation errors |
Response 201 body
idstring (uuid)activebooleancanonicalIdstring (uuid)createdAtstring (date-time)createdByobjectdescriptionstringeducationalContentobjecteducationalContentIdstring (uuid)isCurrentbooleanpassPercentageintegerquestionsobject[]shuffleQuestionsbooleanstatusstringtimeLimitMinutesintegertitlestringupdatedAtstring (date-time)updatedByobjectversioninteger
{
"id": "01944f76-3f07-76fe-b4fe-f8e5b0db5abe",
"active": true,
"canonicalId": "01944f76-3f07-76fe-b4fe-f8e5b0db5abe",
"createdAt": "string",
"createdBy": {
"id": "string",
"firstName": "string",
"lastName": "string"
},
"description": "Test your knowledge of basic safety protocols",
"educationalContent": {
"id": "string",
"title": "string"
},
"educationalContentId": "01944f76-3f07-76fe-b4fe-f8e5b0db5abc",
"isCurrent": true,
"passPercentage": 70,
"questions": [
{
"id": "01944f76-3f07-76fe-b4fe-f8e5b0db5abe",
"order": 0,
"points": 1,
"question": "What is the correct procedure for handling hazardous materials?",
"required": true,
"type": "multiple_choice"
}
],
"shuffleQuestions": false,
"status": "draft",
"timeLimitMinutes": 30,
"title": "Safety Protocol Quiz",
"updatedAt": "string",
"updatedBy": {
"id": "string",
"firstName": "string",
"lastName": "string"
},
"version": 1
}