Submit Quiz Answers
Authentication Required: Any authenticated user with access to the lesson
POST /api/lessons/:lessonId/answer
Lesson UUID
Array of selected answer indices (0-based) for each question
Legacy flag: apply double-or-loss to all questions (default: false)
Array of question indices (0-based) where double-or-loss is enabled
Authorization
- LEARNER: Can submit for their own lessons
- PARENT: Can submit for their children’s lessons
- ADMIN: Can submit for any lesson
When a parent submits answers, points and achievements are attributed to the child learner, not the parent.
Double-or-Loss Mode
When double-or-loss is enabled for a question:- Correct answer: Award 2 points instead of 1
- Wrong answer: Deduct 1 point from balance
Response
Updated lesson object with status “DONE” and final score
Percentage score (0-100)
Number of correct answers
Total number of questions in the quiz
Number of incorrect answers
Total points earned from correct answers
Total points deducted from double-or-loss wrong answers
Whether any double-or-loss was used
Array of question indices where double-or-loss was applied
Updated points balance after this quiz
Array of newly earned achievements
Response Example
Error Codes
- 400 - Answers must be an array
- 400 - Lesson is not active
- 400 - Invalid lesson specification
- 401 - Unauthorized
- 403 - Forbidden
- 404 - Lesson not found
Understanding Quiz Scoring
Base Points
- Each correct answer: 1 point
- Each wrong answer: 0 points