ProfileController::rotateExamUnlockCode(). The new code is the same value GET /api/v1/profile exposes as data.exam_unlock_code from then on.App\Http\Controllers\Api\V1\Profile\ProfileController::rotateExamUnlockCode()api.v1.profile.exam-unlock-code.rotateAuthorization: Bearer {token}is_professional). Any other user receives 403 and no secret is generated for them.POST/api/v1/profile/exam-unlock-code/rotate200 OK{
"success": true,
"status": "success",
"message": "OK",
"data": {
"exam_unlock_code": "9f2c0b7e5a41d3c86e1f0a7b2d4c5e68a1b3c5d7e9f0123456789abcdef01234"
}
}| Field | Type | Nullable | Always present | Description |
|---|---|---|---|---|
data.exam_unlock_code | string | No | Yes | The new exam unlock code (64 lowercase hex characters). |
401 Unauthorized{
"success": false,
"status": "error",
"message": "Unauthenticated."
}403 Forbidden{
"success": false,
"status": "error",
"message": "Forbidden"
}offline_secret_rotated activity is logged (the event only, never the secret).docs/api/profile/POST_exam_unlock_code_rotate.mdcurl --location --request POST 'https://test.diveraid.com/api/v1/profile/exam-unlock-code/rotate' \
--header 'Authorization: Bearer <token>'{
"success": true,
"status": "success",
"message": "string",
"data": {
"exam_unlock_code": "string"
}
}