---
title: "Parse an uploaded file into structured HTML with chunk IDs for targeted AI editing."
method: POST
path: "/v1/uploads/{upload_id}/process"
tags: ["uploads", "mcp", "uploads"]
---

# Parse an uploaded file into structured HTML with chunk IDs for targeted AI editing.

`POST /v1/uploads/{upload_id}/process`

## Request

- Base URL: `https://api.superdocs.app`
- URL: `https://api.superdocs.app/v1/uploads/{upload_id}/process`
- Auth: HTTP bearer

Fetches the file uploaded via request_upload_url and runs the same parsing pipeline as upload_document_base64: every paragraph, heading, table, row, and cell gets a unique chunk ID, enabling targeted structural edits via chat ("remove row 3 of the pricing table" works), with tables, borders, shading, alternating row colors, fonts, and inline styling preserved on edit and export. By default the response is compact (metadata only, no document body) to keep your context small — the document is loaded into the session and you edit it via chat; pass return_html=true if you need the parsed HTML inline. Uploading and parsing is NOT itself a billable operation — you are charged only when the AI edits the document. Specify parse_mode='document' to load as the active editable document, or parse_mode='attachment' to load as a read-only AI-searchable reference.

## Path parameters

- `upload_id` string, required: The upload_id returned by request_upload_url.

## Headers

- `authorization` string, nullable

## Request body

- ProcessUploadRequest
  - `session_id` string, required: Session ID to load this document/attachment into. Must match the chat/async session-id format — letters, digits, '_', '-', '.' only (no ':'); max 256 chars.
  - `filename` string, required: Same filename passed to request_upload_url.
  - `parse_mode` 'document' | 'attachment': 'document' = parse and load as the active editable doc; 'attachment' = process asynchronously as AI-searchable reference (returns job_id to poll).
  - `return_html` boolean: When false (default), the response is compact — metadata only (chunks_count, version_id, page_setup), no document body — to keep your context small; the document is loaded into the session and you edit it via chat. Set true only if you actually need the parsed HTML returned inline.

## Response `200`

Successful Response

- ProcessDocumentResponse
  - `html` string, nullable
  - `session_id` string, required
  - `filename` string, required
  - `chunks_count` integer, nullable
  - `version_id` string, nullable
  - `job_id` string, nullable
  - `status` string, required
  - `parse_mode` string, required
  - `page_setup` object, nullable
  - `warnings` object[], nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/superdocs/apis/universal-document-ai-api.md) · [All operations](https://skmtc.dev/superdocs/apis/universal-document-ai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/superdocs/apis/universal-document-ai-api/revisions/37d03122940b?raw)
