---
title: "Submit Answer"
method: POST
path: "/knowledge-quiz/attempts/{attempt_id}/answer"
tags: ["knowledge-quiz"]
---

# Submit Answer

`POST /knowledge-quiz/attempts/{attempt_id}/answer`

Submit an answer for a specific question in an attempt.
Uses the attempt's variation selection to check correctness.

## Path parameters

- `attempt_id` string, required

## Request body

- SubmitAnswerRequest — Request to submit an answer for a question.
  - `question_id` string, required
  - `selected_answer_index` integer, required

## Response `200`

Successful Response

- SubmitAnswerResponse — Response after submitting an answer.
  - `is_correct` boolean, required
  - `correct_answer_index` integer, nullable
  - `explanation` string, nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/excellence-ai/apis/excellence-learning.md) · [All operations](https://skmtc.dev/excellence-ai/apis/excellence-learning/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/excellence-ai/excellence-learning/revisions/ef67479ed898/schema)
