Documents & Ingestion
Documents are Remem’s core unit: encrypted content plus metadata used for retrieval, filtering, and synthesis.What happens on ingest
When you callPOST /v1/documents/ingest, Remem:
- Queues an async ingestion job
- Encrypts content + metadata with tenant-scoped keys
- Classifies content (category/tags/sensitivity/language/summary)
- Chunks and embeds searchable text
- Indexes vectors + searchable payload metadata
Ingestion is namespace-aware. If you send
"namespace": "work", Remem writes into that namespace key. If you omit it, Remem uses the API key’s default namespace.Ingest a document
JSON ingestion
Multipart upload
Ingest response
document_id is present when return_id=true; otherwise it may be null.
Request fields
| Field | Type | Required | Notes |
|---|---|---|---|
content | string | Yes (JSON mode) | Raw text |
title | string | No | Optional title |
source | string | No | api, quick_capture, folder_sync, gmail |
namespace | string | No | Namespace key for this write. Falls back to the API key default namespace. |
source_id | string | No | Correlation key (not dedupe key) |
source_path | string | No | Original file path/URI |
mime_type | string | No | MIME hint |
metadata | object | No | Encrypted metadata payload |
return_id | bool | No | Return document_id immediately |
Source ID + metadata behavior
source_idis stored as correlation metadata.project,session_id,checkpoint_kindin metadata are normalized for checkpoint filtering.- Tags are normalized/deduped for new ingests.
Retrieve a document
Retrieve document chunks
Update a document
Document versions stay in the original document’s namespace. Namespace selection happens when the document is first ingested.
Delete a document
DELETE /v1/documents/{document_id} performs a soft delete:
- Hidden from query results immediately
- Cleanup work is queued (vectors/files/cache)
- Hard delete is scheduled by lifecycle workers
Chunk backfill / reindex endpoints
These endpoints are for summary-only documents that need real chunk backfill:POST /v1/documents/backfill-chunksPOST /v1/documents/{document_id}/reindex-chunks
Idempotent ingestion
UseIdempotency-Key to avoid duplicate ingest requests on retries:
Supported file types
Remem supports common text, PDF, image, code, spreadsheet, email, and web formats. Examples:- Text/notes:
.txt,.md,.json,.yaml,.xml - PDFs/images:
.pdf,.png,.jpg,.webp - Code:
.py,.ts,.go,.rs,.java,.cpp - Spreadsheet/email/web:
.csv,.tsv,.eml,.msg,.html