Documents
Last updated September 21, 2026
Understand Matruno matter documents, evidence, generated legal artifacts, extraction logs, embeddings, and matter-scoped retrieval.
Documents stay with the matter#
Documents are matter-scoped evidence and generated legal artifacts. The backend has Document, Attachment, DocumentProcessingLog, DocumentTemplate, DocumentEmbedding, MatterDocumentChunk, and DocumentEdit models. The matter detail UI includes a document panel for uploaded files and generated outputs.
Use documents for material that should remain tied to legal execution history: uploaded evidence, source PDFs, extracted text context, draft and final legal documents, rendered previews, and artifacts produced by workflow or agent steps. Canonical document kinds include matter documents, evidence, exhibits, drafts, final documents, correspondence, contracts, pleadings, notices, legal memoranda, and generated legal documents.
Document processing and drafting do not file with a court and do not pull case law from an external research database.
What the API exposes#
The backend exposes upload, list, download, rendered preview, download URL, delete, and extraction routes:
POST /api/v1/matters/{matter_id}/documents
GET /api/v1/matters/{matter_id}/documents
GET /api/v1/documents/{document_id}/download
GET /api/v1/documents/{document_id}/rendered
GET /api/v1/documents/{document_id}/download-url
DELETE /api/v1/documents/{document_id}
POST /api/v1/documents/{document_id}/extract
Document access is authenticated, workspace-scoped, and matter-isolated.
Processing and extraction#
Temporal-backed document workflows can classify documents, extract fields, persist processing logs, create extraction notes, and generate embeddings. Extraction depends on configured model provider credentials and the workflow or API route used. Extracted values remain suggestions until a legal reviewer accepts them where the workflow requires review.
Generated artifacts#
Generated files are saved through the document service and attached back to the matter. Local Docker deployments use the Compose-managed storage_data volume mounted at /app/storage. Do not treat Redis as the source of truth for documents; PostgreSQL stores the records and local storage holds file contents.
Artifacts are implementation-backed
The repo supports local artifact storage and authenticated API downloads. It does not prove S3, GCS, hosted storage, or court e-filing unless a deployment adds that infrastructure.
Was this helpful?