Save questionnaire answer
curl --request POST \
--url https://api.trycomp.ai/v1/questionnaire/save-answer \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"questionnaireId": "qst_abc123",
"organizationId": "org_abc123",
"status": "manual"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({questionnaireId: 'qst_abc123', organizationId: 'org_abc123', status: 'manual'})
};
fetch('https://api.trycomp.ai/v1/questionnaire/save-answer', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/questionnaire/save-answer"
payload = {
"questionnaireId": "qst_abc123",
"organizationId": "org_abc123",
"status": "manual"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"error": "<string>"
}Questionnaire
Save questionnaire answer | Comp AI API
Save a manual or AI-generated security questionnaire answer for later review, export, and audit tracking.
POST
/
v1
/
questionnaire
/
save-answer
Save questionnaire answer
curl --request POST \
--url https://api.trycomp.ai/v1/questionnaire/save-answer \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"questionnaireId": "qst_abc123",
"organizationId": "org_abc123",
"status": "manual"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({questionnaireId: 'qst_abc123', organizationId: 'org_abc123', status: 'manual'})
};
fetch('https://api.trycomp.ai/v1/questionnaire/save-answer', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/questionnaire/save-answer"
payload = {
"questionnaireId": "qst_abc123",
"organizationId": "org_abc123",
"status": "manual"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"error": "<string>"
}Authorizations
API key for authentication
Body
application/json
Questionnaire that contains the answer being saved.
Example:
"qst_abc123"
Organization ID. The API overwrites this with the authenticated active organization.
Example:
"org_abc123"
Whether the answer was AI-generated or written by a person.
Available options:
generated, manual Example:
"manual"
Question/answer record to update. Provide this or questionIndex.
Example:
"qqa_abc123"
Zero-based position of the question in the questionnaire. Provide this or questionAnswerId.
Required range:
x >= 0Example:
0
Answer text to store. Send null or empty to clear it.
Example:
"Yes, all customer data is encrypted at rest with AES-256."
Knowledge sources the answer was derived from.
Show child attributes
Show child attributes
Was this page helpful?

