Skip to content

Create Test Questions

This endpoint allows the creation of questions for tests, receiving the necessary data to configure each question.

Terminal window
curl --request POST \
--url https://kong.api.toolzz.com.br/api/content/avaliation/new_questions \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <token>' \
--data '{
"school": [123],
"theme": "<string>",
"group": [1],
"subgroup": [2],
"specialty": [3],
"questions": [
{
"support_text": "<string>",
"explanation_text": "<string>",
"tags": ["<string>"],
"difficulty": 1,
"question_text": "<string>",
"options": [
{
"text": "<string>",
"is_correct": true
}
]
}
]
}'
{
"message": "Questions successfully created"
}

ParameterTypeDescriptionRequired
AuthorizationStringAccess token (“Bearer” must be before the token)Yes
ParameterTypeDescriptionRequired
schoolarrayArray of school IDs where the questions will be linked.Yes
themestringTheme ID to which the question will be linked. The theme must belong to the same school where the question is being created.No
grouparrayName or ID of the group to which the question will be linked.Yes
subgrouparrayName or ID of the subgroup to which the question will be linked. The subgroup must be related to the informed group.No
specialtyarrayName or ID of the specialty to which the question will be linked. The specialty must be related to the informed subgroup.No
questionsarrayList of questions.Yes
questions.support_textstringSupport text displayed during the execution of the test.No
questions.explanation_textstringExplanatory text of the answer, displayed after the completion of the test.No
questions.tagsarrayList of tags associated with the question.No
questions.difficultynumberQuestion difficulty level: 1 = Easy, 2 = Medium, 3 = Hard.No
questions.question_textstringQuestion statement.Yes
questions.optionsarrayQuestion options.No
questions.options.textstringText of the question alternatives. If this field is empty, the question will be registered as discursive. For multiple choice questions, it is mandatory to send at least two alternatives.No
questions.options.is_correctbooleanParameter that defines if the alternative is considered correct. false = Incorrect, true = Correct.No

KeyTypeDescription
messagestringMessage describing the result of the operation.

To access this endpoint, it is necessary to send a valid access token through the authorization header (Authorization) of the request. Additionally, the API is protected by other security measures to safeguard user data.