Skip to content

Answer one questionnaire question

POST
/v1/questionnaire/answer-single
curl --request POST \
--url https://api.varman.io/v1/questionnaire/answer-single \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <X-API-Key>' \
--data '{ "question": "Do you encrypt customer data at rest?", "questionIndex": 0, "totalQuestions": 12, "organizationId": "org_abc123", "questionnaireId": "qst_abc123" }'

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

Media typeapplication/json
object
question
required

Security questionnaire question to answer.

string

Example

Do you encrypt customer data at rest?
questionIndex
required

Zero-based index of this question in the questionnaire or page batch.

number

Example

0
totalQuestions
required

Total number of questions in the current questionnaire or page batch.

number
>= 1

Example

12
organizationId
required

Organization ID for validation. The API uses the authenticated active organization and overwrites this value server-side.

string

Example

org_abc123
questionnaireId

Optional questionnaire record to save the generated answer into. Omit for webpage-only answer generation.

string

Example

qst_abc123

Generated single answer result

Media typeapplication/json
object
success
boolean
data
object
questionIndex
number
question
string
answer
string
nullable
sources
Array<object>
object
error
string
nullable

Example generated

{
"success": true,
"data": {
"questionIndex": 1,
"question": "example",
"answer": "example",
"sources": [
{}
],
"error": "example"
}
}