Export generated questionnaire answers
curl --request POST \
--url https://api.trycomp.ai/v1/questionnaire/answers/export \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"fileData": "<string>",
"fileType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"organizationId": "org_abc123",
"format": "xlsx"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
fileData: '<string>',
fileType: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
organizationId: 'org_abc123',
format: 'xlsx'
})
};
fetch('https://api.trycomp.ai/v1/questionnaire/answers/export', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/questionnaire/answers/export"
payload = {
"fileData": "<string>",
"fileType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"organizationId": "org_abc123",
"format": "xlsx"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Questionnaire
Export generated questionnaire answers | Comp AI API
Generate and export questionnaire answers from a submitted payload using approved organization evidence.
POST
/
v1
/
questionnaire
/
answers
/
export
Export generated questionnaire answers
curl --request POST \
--url https://api.trycomp.ai/v1/questionnaire/answers/export \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"fileData": "<string>",
"fileType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"organizationId": "org_abc123",
"format": "xlsx"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
fileData: '<string>',
fileType: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
organizationId: 'org_abc123',
format: 'xlsx'
})
};
fetch('https://api.trycomp.ai/v1/questionnaire/answers/export', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/questionnaire/answers/export"
payload = {
"fileData": "<string>",
"fileType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"organizationId": "org_abc123",
"format": "xlsx"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Authorizations
API key for authentication
Body
application/json
Base64-encoded contents of the questionnaire file.
MIME type of the file (PDF, image, XLSX, CSV, TXT).
Example:
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
Organization ID. The API overwrites this with the authenticated active organization.
Example:
"org_abc123"
File format to export the answered questionnaire in.
Available options:
pdf, csv, xlsx Example:
"xlsx"
Original name of the questionnaire file.
Example:
"vendor-security-questionnaire.xlsx"
Name of the vendor the questionnaire came from.
Example:
"Acme Corp"
Return a ZIP containing the questionnaire in every format (PDF, CSV and XLSX) instead of one file.
Example:
false
Response
201 - undefined
Was this page helpful?

