Answer one questionnaire question
curl --request POST \
--url https://api.trycomp.ai/v1/questionnaire/answer-single \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '{}'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.trycomp.ai/v1/questionnaire/answer-single', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/questionnaire/answer-single"
payload = {}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"questionIndex": 123,
"question": "<string>",
"answer": "<string>",
"sources": [
{}
],
"error": "<string>"
}
}Questionnaire
Answer one questionnaire question | Comp AI API
Generate an answer for one security questionnaire item using the organization evidence library and return source references for review.
POST
/
v1
/
questionnaire
/
answer-single
Answer one questionnaire question
curl --request POST \
--url https://api.trycomp.ai/v1/questionnaire/answer-single \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '{}'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.trycomp.ai/v1/questionnaire/answer-single', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/questionnaire/answer-single"
payload = {}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"questionIndex": 123,
"question": "<string>",
"answer": "<string>",
"sources": [
{}
],
"error": "<string>"
}
}Was this page helpful?

