Submit Quiz Answers
Authentication Required: Any authenticated user with access to the lesson
POST /api/lessons/:lessonId/answer
string
required
Lesson UUID
array
required
Array of selected answer indices (0-based) for each question
boolean
Legacy flag: apply double-or-loss to all questions (default: false)
array
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
object
Updated lesson object with status “DONE” and final score
number
Percentage score (0-100)
number
Number of correct answers
number
Total number of questions in the quiz
number
Number of incorrect answers
number
Total points earned from correct answers
number
Total points deducted from double-or-loss wrong answers
boolean
Whether any double-or-loss was used
array
Array of question indices where double-or-loss was applied
number
Updated points balance after this quiz
array
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