Skip to Content

Uploads

Send a file, and follow DOCX conversion.

Prepare

POST /api/v1/uploads with name and size (exact bytes, at least 1). lastModified (Unix milliseconds), author and language are optional. The content type comes from the extension.

Send the file

PUT the raw file to the returned url, with every returned header. The URL may be a signed storage URL or a same-origin proxy URL. Prepare another upload if expiresAt has passed.

Add it to the library

POST /api/v1/documents
{ "source": { "type": "upload", "uploadId": "..." } }

Expiry and limits

  • Pending uploads expire after 24 hours. Signed transfer URLs expire after five minutes; proxy URLs last as long as the pending upload.
  • The file must match its declared length and the instance's maximum upload size, and its bytes are verified before registration.
  • Storage transport and CORS are described in Object storage.

DOCX

The compute worker converts DOCX to PDF. Without a worker, the request returns 503 COMPUTE_WORKER_REQUIRED.

Until conversion finishes, creation returns 202 with an upload resource rather than a document.

  1. Read progress from statusUrl, or follow SSE snapshots at eventsUrl.
  2. Read statusUrl once conversion completes. That read verifies and registers the PDF and returns it as document.

Conversion continues with the tab closed, but registration still needs the status read. A failed upload includes an error message.

Upload statusMeaning
pendingWaiting for the file
processingConverting
readyThe file is registered. The PDF itself may still be not_started or processing.
failederror explains why

A compute limit or worker outage does not fail registration; the document parses later. A converted DOCX's file URL serves the PDF.

On this page

Edit this page