supermemory/apps/docs/v5/api-reference/ingest.mdx
MaheshtheDev 672defc08b docs: move SDK snippets to the shipped v5 call shape and finish the namespace rename (#1772)
Rewrites 339 TypeScript calls across 50 pages from the rc.5 `method({ namespace, body })` form to the shipped `method(namespace, { ... })` form, and aligns field names with the live v5 spec: `attach` to `include`, `authUrl` to `authorization`, `lastSync` to `latestRun`, `deletedCount` to `count`, and the paginated `namespaces.list()`.

Renames container tags to namespaces across concepts, connectors, integrations and snippets. The namespace pages keep container tag in the description, search keywords and a rename note so old searches still land, and the v3 reference page points at v5.

The migration guide's SDK table now covers both 5.0.0 SDKs, and the SDK integration page uses the real client options (`baseUrl`, `timeoutInSeconds`, `maxRetries`) and error classes.
2026-10-06 17:06:38 +00:00

41 lines
2.1 KiB
Text

---
title: "Ingest"
sidebarTitle: "Overview"
description: "Turn source content into searchable memory and keep it current"
icon: "/icons/hugeicons/book-open-01.svg"
---
Ingestion gives Supermemory the source material it uses to build searchable context and memories. Add new content or update an existing source without creating a disconnected copy.
| Operation | Purpose |
| --- | --- |
| `POST /ns/{namespace}/document` | Add text or a URL; reuse an ID to build on an existing document |
| `POST /ns/{namespace}/document/batch` | Bring in up to 600 documents together |
| `POST /ns/{namespace}/document/file` | Turn an uploaded file into searchable memory |
| `PATCH /ns/{namespace}/document/{id}` | Update metadata or replace canonical content |
| `POST /ns/{namespace}/document/file/{id}` | Completely replace a file-backed document |
| `PATCH /ns/{namespace}/document/file/{id}` | Refresh selected file details or its source |
<CodeGroup>
```ts TypeScript
const { id, status } = await supermemory.add("user_1", {
content: "The user prefers concise project updates",
id: "conv_1",
metadata: { source: "chat" },
dreaming: "instant",
})
```
```bash curl
curl -X POST "https://api.supermemory.ai/ns/user_1/document?dreaming=instant" \
-H "Authorization: Bearer $SUPERMEMORY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"content":"The user prefers concise project updates","id":"conv_1","metadata":{"source":"chat"}}'
```
</CodeGroup>
The `dynamic` processing mode (default) groups related documents together so memories form from coherent, logical units rather than one isolated entry at a time. Use `instant` to process each document on its own right away; it bills one extra operation per document.
Memories appear quickly only with `dreaming: "instant"`. With the default `dynamic` mode, a fresh namespace can show zero memories and an empty profile for several minutes while extraction is batched. Use `instant` in quickstarts and tests.
Every request is scoped to a namespace, keeping each user, project, or tenant isolated. See [document write migration](/migration/api-v5-document-writes).