Skip to content

Start questionnaire parsing

POST
/v1/questionnaire/upload-and-parse
curl --request POST \
--url https://api.varman.io/v1/questionnaire/upload-and-parse \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <X-API-Key>' \
--data '{ "organizationId": "org_abc123", "fileName": "vendor-security-questionnaire.xlsx", "fileType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "fileData": "example", "s3Key": "org_abc/uploads/questionnaire/1735000000-questionnaire.xlsx" }'

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

Media typeapplication/json
object
organizationId
required

Organization ID (set automatically from auth context).

string

Example

org_abc123
fileName
required

Name of the questionnaire file.

string

Example

vendor-security-questionnaire.xlsx
fileType
required

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

string

Example

application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
fileData

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.

string
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.

string

Example

org_abc/uploads/questionnaire/1735000000-questionnaire.xlsx

Upload file and trigger async parsing. Returns runId for realtime tracking.

Media typeapplication/json
object
runId
string
publicAccessToken
string

Example generated

{
"runId": "example",
"publicAccessToken": "example"
}