curl --request POST \
--url https://api.trycomp.ai/v1/questionnaire/upload-and-parse \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"organizationId": "org_abc123",
"fileName": "vendor-security-questionnaire.xlsx",
"fileType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
organizationId: 'org_abc123',
fileName: 'vendor-security-questionnaire.xlsx',
fileType: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
})
};
fetch('https://api.trycomp.ai/v1/questionnaire/upload-and-parse', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/questionnaire/upload-and-parse"
payload = {
"organizationId": "org_abc123",
"fileName": "vendor-security-questionnaire.xlsx",
"fileType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"runId": "<string>",
"publicAccessToken": "<string>"
}Start questionnaire parsing | Comp AI API
Upload a questionnaire payload and start asynchronous parsing, returning a run ID for real-time progress tracking.
curl --request POST \
--url https://api.trycomp.ai/v1/questionnaire/upload-and-parse \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"organizationId": "org_abc123",
"fileName": "vendor-security-questionnaire.xlsx",
"fileType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
organizationId: 'org_abc123',
fileName: 'vendor-security-questionnaire.xlsx',
fileType: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
})
};
fetch('https://api.trycomp.ai/v1/questionnaire/upload-and-parse', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/questionnaire/upload-and-parse"
payload = {
"organizationId": "org_abc123",
"fileName": "vendor-security-questionnaire.xlsx",
"fileType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"runId": "<string>",
"publicAccessToken": "<string>"
}Authorizations
API key for authentication
Body
Organization ID (set automatically from auth context).
"org_abc123"
Name of the questionnaire file.
"vendor-security-questionnaire.xlsx"
MIME type of the file (PDF, image, XLSX, CSV, TXT).
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
Base64-encoded file contents. For the web UI / direct callers. AI/MCP clients should instead upload via /v1/uploads/presign and pass s3Key — base64 through an LLM is impractically slow. Provide exactly one of fileData or s3Key.
Key of a file already uploaded via /v1/uploads/presign (purpose=questionnaire). The server fetches the bytes from storage — no base64 needed. Provide exactly one of fileData or s3Key.
"org_abc/uploads/questionnaire/1735000000-questionnaire.xlsx"
Was this page helpful?

