Parse an uploaded file into structured HTML with chunk IDs for targeted AI editing.
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.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Path Parameters
The upload_id returned by request_upload_url.
Body
Session ID to load this document/attachment into. Must match the chat/async session-id format — letters, digits, '_', '-', '.' only (no ':'); max 256 chars.
256^[a-zA-Z0-9_\-\.]+$Same filename passed to request_upload_url.
255'document' = parse and load as the active editable doc; 'attachment' = process asynchronously as AI-searchable reference (returns job_id to poll).
document, attachment 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.

