PATCH /api/v1/exam/{id}/question/{questionId}

Update an existing exam question. Can modify question text, options, correct answers, or scoring.

Path parameters

  • id string Required

    UUID of the exam

  • questionId string Required

    UUID of the question to update

application/json

Body Required

Partial question data to update

  • question string Required
  • type string Required

    Values are STRUCTURED or UNSTRUCTURED.

  • options array[string]
  • correctAnswers array[string]
  • maxScore number Required

Responses

  • 200 application/json

    Question updated successfully

  • 400

    Invalid question data

  • 404

    Question not found

PATCH /api/v1/exam/{id}/question/{questionId}
curl \
 --request PATCH 'http://localhost:3500/api/v1/exam/123e4567-e89b-12d3-a456-426614174000/question/q123-456' \
 --header "Content-Type: application/json" \
 --data '{"question":"string","type":"STRUCTURED","options":["string"],"correctAnswers":["string"],"maxScore":42.0}'
Request examples
{
  "question": "string",
  "type": "STRUCTURED",
  "options": [
    "string"
  ],
  "correctAnswers": [
    "string"
  ],
  "maxScore": 42.0
}
Response examples (200)
{
  "message": "Question updated successfully",
  "success": true
}