Skip to main content
POST
Parse an uploaded file into structured HTML with chunk IDs for targeted AI editing.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

authorization
string | null

Path Parameters

upload_id
string
required

The upload_id returned by request_upload_url.

Body

application/json
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.

Maximum string length: 256
Pattern: ^[a-zA-Z0-9_\-\.]+$
filename
string
required

Same filename passed to request_upload_url.

Maximum string length: 255
parse_mode
enum<string>
default:document

'document' = parse and load as the active editable doc; 'attachment' = process asynchronously as AI-searchable reference (returns job_id to poll).

Available options:
document,
attachment
return_html
boolean
default:false

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

Successful Response

session_id
string
required
filename
string
required
status
string
required
parse_mode
string
required
html
string | null
chunks_count
integer | null
version_id
string | null
job_id
string | null
page_setup
Page Setup · object | null
warnings
Warnings · object[] | null