Skip to main content
POST
Submit Quiz Result

Authentication

This endpoint requires user authentication. Include the authorization token in your request headers.

Request Body

string
required
The unique identifier of the course
string
required
The unique identifier of the chapter
array
required
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

boolean
Indicates whether the submission was successful
object
The quiz result with scoring and recommendations
string
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

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 answers array 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