document_upload
Ingest a file into this organization's document corpus so it becomes searchable. Supply a filename plus EITHER content_base64 (for binary files like PDFs, images, Office docs) OR content_text (for plain-text or markdown). The file is stored at its canonical key, a Document record is created, and — if this org's pipeline is enabled — text extraction, chunking, and embedding are queued automatically so the document shows up in document_search and document_semantic_search. Duplicate content (same SHA-256) is detected and the existing document is returned instead of creating a copy. Max 25 MB decoded. This is the only way to add documents to the corpus from inside the Studio; the corpus mount itself is read-only.
Parameters
filename: string- Filename including extension (e.g. 'pump-manual.pdf'). Drives the file extension, MIME detection, and canonical storage key. Any directory components are stripped.
content_base64: string (optional)- Base64-encoded file bytes. Use for binary files (PDF, images, docx/xlsx, zip). Provide exactly one of content_base64 or content_text.
content_text: string (optional)- UTF-8 text content. Convenience for plain-text or markdown documents. Provide exactly one of content_base64 or content_text.
title: string (optional)- Human-readable title (max 500 chars). Defaults to a title derived from the filename.
document_type: string (optional)- Taxonomy document type code (see document_taxonomy_describe). Defaults to 'other'. An invalid value falls back to 'other'.
description: string (optional)- Optional free-text description of the document.
tags: array (optional)- Optional list of string tags to attach.
is_confidential: boolean (optional)- Mark the document as requiring elevated access (default: false). — default:
false