Submit Quiz Result
Quiz API
Submit Quiz Result
Submit quiz answers and receive score with AI-powered recommendations
POST
Submit Quiz Result
Authentication
This endpoint requires user authentication. Include the authorization token in your request headers.Request Body
The unique identifier of the course
The unique identifier of the chapter
Array of answer indices (0-3) corresponding to each quiz question. Must match the number of questions in the quiz.Example:
[0, 2, 1, 3, 0, 1, 2, 0, 3, 1]Response
Indicates whether the submission was successful
The quiz result with scoring and recommendations
Error message if success is false
Code Examples
Response Example
High Performance (Mastered)
Moderate Performance (On Track)
Low Performance (Needs Review)
Error Responses
Performance Groups
| Group | Percentage Range | Description |
|---|---|---|
needs_review | 0-40% | Significant gaps in understanding. Comprehensive review recommended. |
on_track | 41-75% | Good progress with room for improvement. Additional practice suggested. |
mastered | 76-100% | Strong comprehension. Ready to advance to next topics. |
Notes
- The quiz result is automatically saved to the database and associated with the user’s account
- AI recommendations are personalized based on:
- The specific questions answered incorrectly
- The overall performance level
- The chapter content and topics covered
- Users can retake quizzes multiple times - all attempts are stored
- The
answersarray must contain exactly the same number of elements as there are questions in the quiz - Each answer must be an integer from 0 to 3, corresponding to the option index