Upload a document (multipart)
Uploads a single document as multipart/form-data, intended for browser drag-and-drop and accepting larger files than the inline JSON path (up to 64 MiB). The file bytes go in a part named file (or body), with optional text fields scope (private, channel, or team; defaults to private), channel_id, category, tags (comma-separated), and caption. Behavior otherwise matches the inline upload, including content-addressed deduplication and metadata enrichment of an existing identical document. Returns the document id, download URL, SHA-256, and size. Requires the documents:write scope.
Multipart file upload
Send the file asmultipart/form-data (a real binary file part), not JSON. Use this variant for direct uploads from a browser file-picker or a form. The interactive playground’s file control posts the part for you; from code, build a multipart body.Authorizations
Personal Access Token. Send as Authorization: Bearer hq_pat_....
Body
Documentation shape for the POST /v1/api/documents/upload multipart
form. The handler reads the parts directly; this only drives the spec.
Response
Document saved
True iff this hashed identical to an existing document in this tenant - we still record the new metadata row but the Trove object is shared. The UI surfaces this as a "saved (dedup'd against existing copy)" hint.
x >= 0True iff this was a same-owner/same-scope dedup AND the caller supplied new metadata (tags/caption/category) that we actually merged onto the existing row. Lets the UI say "already in your library - details updated" honestly vs a bare "already there".