Upload a document file
Changed onUpload a document file.
Accepts PDF, DOCX, PPTX, XLSX, HTML, CSV, JSON, XML, YAML, Markdown and plain text (conversion/service.DOCUMENT_FORMATS); anything else is a 415. Formats other than Markdown and plain text are converted to Markdown during the upload, within per-format limits (413) and a per-process number of concurrent conversions (429). A deployment with UPLOAD_CONVERSION=false converts nothing: it accepts Markdown and plain text only and refuses every other format with 415 DOCUMENT_CONVERSION_DISABLED. Every refusal and every failed conversion happens before anything is stored. Once uploaded, the document is ready for fact extraction.
A client of such a deployment converts the file itself and uploads the Markdown with three form fields about the original (v0.7.31.0): original_filename, original_sha256 and converter. The server stores them, cites the document by the original's name, and decides duplicates by the original's hash (services/document_dedup.py). They are the client's word about a file the server never receives, and only fit a Markdown or text upload (422 INVALID_ORIGINAL_METADATA).
Request
- Base URLhttps://api.scipot.ai (the document declares no server; this is the origin it was published from)
- Authnone declared
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Query parameters
The POT this upload is for (v0.7.80.0): original_date is also stored as that POT's own date for the document (pot_original_dates), so a later date set for another POT never moves it. Only with original_date; 404 POT_NOT_FOUND for a POT not in the workspace.
Request body multipart/form-data
Response
Document uploaded, converted (if needed), and stored
Changes
- info
added the new optional
queryrequest parameterpot_id
- info
- info
added the new optional
queryrequest parametereffective_from
- info