Assessment Verification
Retake Assessment
Generate fresh questions for a student to retry a failed assessment.
POST
Overview
The previous questions are deleted and replaced with a new AI-generated set. The previous attempt result is preserved in the database for history. Only available when the student has at least one prior failed attempt.Requires a valid session token via the
x-api-key session middleware. No additional fields needed in the request body.Retake Eligibility Rules
| Condition | Result |
|---|---|
| Assessment is locked (passed) | 403 ASSESSMENT_LOCKED |
| No prior attempt exists | 400 NO_PRIOR_ATTEMPT |
| Last attempt was passed | 403 ASSESSMENT_PASSED |
| Last attempt was failed | Allowed — new questions generated |
Error Codes
| Code | HTTP | Description |
|---|---|---|
MISSING_VERIFICATION_ID | 400 | No recordVerificationId in session |
ASSESSMENT_LOCKED | 403 | Already passed and locked |
NO_PRIOR_ATTEMPT | 400 | No prior attempt — use generate for first attempt |
ASSESSMENT_PASSED | 403 | Last attempt was a pass — retake not permitted |
NO_DATA | 400 | No projects, experience, or certificates found |
NO_SKILLS | 400 | No skills found for this session |
GENERATION_FAILED | 500 | AI generation returned zero questions |
INTERNAL_ERROR | 500 | Unexpected server error |

