Questionnaire

Parse security questionnaires, generate answers from approved evidence, save reviewer edits, stream progress, and export completed files.

List security questionnaires

GET/v1/questionnaire

List saved security questionnaires for an organization so teams can track customer reviews, answer status, and response history.

Responses

200List of questionnaires
curl --request GET \
  --url https://api.complianz.ai/v1/questionnaire \
  --header 'X-API-Key: <api-key>'

Get security questionnaire details

GET/v1/questionnaire/{id}

Retrieve one saved security questionnaire, including extracted questions, generated answers, and review context for the requesting client.

Path parameters

idstringrequired

Responses

200Questionnaire details
curl --request GET \
  --url https://api.complianz.ai/v1/questionnaire/<id> \
  --header 'X-API-Key: <api-key>'

Delete a security questionnaire

DELETE/v1/questionnaire/{id}

Delete a saved security questionnaire when a customer review or vendor assessment no longer needs to be retained.

Path parameters

idstringrequired

Responses

200Questionnaire deleted
curl --request DELETE \
  --url https://api.complianz.ai/v1/questionnaire/<id> \
  --header 'X-API-Key: <api-key>'

Generate answers for a questionnaire

POST/v1/questionnaire/{id}/auto-answer

Starts background answer generation for an already-parsed questionnaire and returns a run handle immediately. Poll GET /v1/questionnaire/:id until answeredQuestions equals totalQuestions, then read the answers from its questions.

Path parameters

idstringrequired

Responses

200
questionnaireIdstringrequired

The questionnaire whose answers are being generated.

runIdstringrequired

Background run identifier for the generation job (Trigger.dev run id).

publicAccessTokenstringrequired

Token for tracking the run via Trigger.dev realtime. Optional — MCP/agent clients should poll GET /v1/questionnaire/:id instead.

statusstringrequired

Always 'generating' on a successful trigger. Poll GET /v1/questionnaire/:id; answers are ready once answeredQuestions equals totalQuestions.

totalQuestionsnumberrequired

Total number of questions in the questionnaire.

answeredQuestionsnumberrequired

Questions already answered at the moment generation was triggered (answers without a value are (re)generated).

messagestringrequired

Human-readable summary of what to do next.

{
  "questionnaireId": "qst_6a179d26c4ad2c1c816ee16d",
  "runId": "run_cmpotsz153eac0ultc1ya87f5",
  "publicAccessToken": "pat_...",
  "status": "generating",
  "totalQuestions": 23,
  "answeredQuestions": 0,
  "message": "Generating answers for 23 questions. Poll GET /v1/questionnaire/qst_... until answeredQuestions reaches totalQuestions."
}
curl --request POST \
  --url https://api.complianz.ai/v1/questionnaire/<id>/auto-answer \
  --header 'X-API-Key: <api-key>'

Parse questionnaire content

POST/v1/questionnaire/parse

Parse questionnaire content from a submitted payload so teams can extract security questions before generating or reviewing answers.

Request body

Responses

200Parsed questionnaire content
{}
curl --request POST \
  --url https://api.complianz.ai/v1/questionnaire/parse \
  --header 'X-API-Key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{}'

Answer one questionnaire question

POST/v1/questionnaire/answer-single

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

Request body

questionstringrequired

Security questionnaire question to answer.

questionIndexnumberrequired

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

totalQuestionsnumberrequired

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

organizationIdstringrequired

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

questionnaireIdstring

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

Responses

200Generated single answer result
successboolean
dataobject
Show child attributes
questionIndexnumber
questionstring
answerstring
sourcesobject[]
errorstring
{
  "success": true,
  "data": {
    "questionIndex": 0,
    "question": "string",
    "answer": "string",
    "sources": [
      {}
    ],
    "error": "string"
  }
}
curl --request POST \
  --url https://api.complianz.ai/v1/questionnaire/answer-single \
  --header 'X-API-Key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
    "question": "Do you encrypt customer data at rest?",
    "questionIndex": 0,
    "totalQuestions": 12,
    "organizationId": "org_abc123",
    "questionnaireId": "qst_abc123"
  }'

Save questionnaire answer

POST/v1/questionnaire/save-answer

Save a manual or AI-generated security questionnaire answer for later review, export, and audit tracking.

Request body

Responses

200Save manual or generated answer
successboolean
errorstring
{
  "success": true,
  "error": "string"
}
curl --request POST \
  --url https://api.complianz.ai/v1/questionnaire/save-answer \
  --header 'X-API-Key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{}'

Delete questionnaire answer

POST/v1/questionnaire/delete-answer

Delete a stored questionnaire answer when it should be removed from the active response set.

Request body

Responses

200Delete questionnaire answer
successboolean
errorstring
{
  "success": true,
  "error": "string"
}
curl --request POST \
  --url https://api.complianz.ai/v1/questionnaire/delete-answer \
  --header 'X-API-Key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{}'

Export a security questionnaire

POST/v1/questionnaire/export

Export a saved security questionnaire response package as PDF, CSV, or XLSX for customer and vendor security reviews.

Request body

Responses

200Export questionnaire by ID to specified format
curl --request POST \
  --url https://api.complianz.ai/v1/questionnaire/export \
  --header 'X-API-Key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{}'

Start questionnaire parsing

POST/v1/questionnaire/upload-and-parse

Upload a questionnaire payload and start asynchronous parsing, returning a run ID for real-time progress tracking.

Request body

organizationIdstringrequired

Organization ID (set automatically from auth context).

fileNamestringrequired

Name of the questionnaire file.

fileTypestringrequired

MIME type of the file (PDF, image, XLSX, CSV, TXT).

fileDatastring

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.

s3Keystring

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.

Responses

200Upload file and trigger async parsing. Returns runId for realtime tracking.
runIdstring
publicAccessTokenstring
{
  "runId": "string",
  "publicAccessToken": "string"
}
curl --request POST \
  --url https://api.complianz.ai/v1/questionnaire/upload-and-parse \
  --header 'X-API-Key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
    "organizationId": "org_abc123",
    "fileName": "vendor-security-questionnaire.xlsx",
    "fileType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
    "fileData": "string",
    "s3Key": "org_abc/uploads/questionnaire/1735000000-questionnaire.xlsx"
  }'

Upload and parse questionnaire file

POST/v1/questionnaire/upload-and-parse/upload

Upload a security questionnaire file, extract questions, save the parsed questionnaire, and return its identifier and question count.

Responses

200Upload file, parse questions (no answers), save to DB, return questionnaireId
questionnaireIdstring
totalQuestionsnumber
{
  "questionnaireId": "string",
  "totalQuestions": 0
}
curl --request POST \
  --url https://api.complianz.ai/v1/questionnaire/upload-and-parse/upload \
  --header 'X-API-Key: <api-key>'

Auto-answer uploaded questionnaire

POST/v1/questionnaire/parse/upload

Upload a questionnaire file and generate answer exports from approved organization evidence in PDF, CSV, or XLSX format.

Responses

201
curl --request POST \
  --url https://api.complianz.ai/v1/questionnaire/parse/upload \
  --header 'X-API-Key: <api-key>'

Export generated questionnaire answers

POST/v1/questionnaire/answers/export

Generate and export questionnaire answers from a submitted payload using approved organization evidence.

Request body

Responses

201
curl --request POST \
  --url https://api.complianz.ai/v1/questionnaire/answers/export \
  --header 'X-API-Key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{}'

Upload and export generated answers

POST/v1/questionnaire/answers/export/upload

Upload a questionnaire file and return generated answer exports in PDF, CSV, or XLSX format.

Responses

201
curl --request POST \
  --url https://api.complianz.ai/v1/questionnaire/answers/export/upload \
  --header 'X-API-Key: <api-key>'

Stream generated questionnaire answers

POST/v1/questionnaire/auto-answer

Stream generated questionnaire answers over server-sent events so clients can show progress while answers are produced.

Request body

Responses

201
curl --request POST \
  --url https://api.complianz.ai/v1/questionnaire/auto-answer \
  --header 'X-API-Key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{}'