---
title: "Answer one questionnaire question"
method: POST
path: "/v1/questionnaire/answer-single"
tags: ["Questionnaire"]
---

# Answer one questionnaire question

`POST /v1/questionnaire/answer-single`

Generate an answer for one security questionnaire item using the organization evidence library and return source references for review.

## Request body

- AnswerSingleQuestionDto
  - `question` string, required — Security questionnaire question to answer.
  - `questionIndex` number, required — Zero-based index of this question in the questionnaire or page batch.
  - `totalQuestions` number, required — Total number of questions in the current questionnaire or page batch.
  - `organizationId` string, required — Organization ID for validation. The API uses the authenticated active organization and overwrites this value server-side.
  - `questionnaireId` string — Optional questionnaire record to save the generated answer into. Omit for webpage-only answer generation.

## Response `200`

Generated single answer result

- object
  - `success` boolean
  - `data` object
    - `questionIndex` number
    - `question` string
    - `answer` string, nullable
    - `sources` object[]
    - `error` string, nullable

---

[API](https://skmtc.net/trycompai/apis/comp-ai-api.md) · [All operations](https://skmtc.net/trycompai/apis/comp-ai-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/trycompai/comp-ai-api/versions/726b9523fb22/schema)
