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

## Changes

> 56 revisions in range; 4 could not be searched.

- **2026-06-04** `d7d0199d846f` — 1 info
  - the endpoint scheme security `oauth2` was removed from the API
- **2026-05-29** `5382c53ab431` — 1 info
  - the endpoint scheme security `oauth2` was added to the API
- **2026-05-28** `7c0713bef5b1` — 3 breaking, 2 info
  - added the new required request property `fileName`
  - added the new required request property `fileType`
  - added the new required request property `organizationId`
  - added the new optional request property `fileData`
  - …1 more
- **2026-04-01** `ab25f417b60b` — 2 warning, 2 info
  - removed the optional property `questionnaireId` from the response with the `200` status
  - removed the optional property `totalQuestions` from the response with the `200` status
  - added the optional property `publicAccessToken` to the response with the `200` status
  - added the optional property `runId` to the response with the `200` status

[Change history](https://skmtc.dev/trycompai/apis/comp-ai-api/changes/v1/questionnaire/upload-and-parse/post.md)

---

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