---
title: "Start questionnaire parsing"
method: POST
path: "/v1/questionnaire/upload-and-parse"
tags: ["Questionnaire"]
---

# 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

- UploadAndParseDto
  - `organizationId` string, required — Organization ID (set automatically from auth context).
  - `fileName` string, required — Name of the questionnaire file.
  - `fileType` string, required — MIME type of the file (PDF, image, XLSX, CSV, TXT).
  - `fileData` string — 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.
  - `s3Key` string — 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.

## Response `200`

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

- object
  - `runId` string
  - `publicAccessToken` string

---

[API](https://skmtc.net/trycompai/apis/comp-ai-api.md) · [All operations](https://skmtc.net/trycompai/apis/comp-ai-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/trycompai/comp-ai-api/versions/726b9523fb22/schema)
