supermemory/apps/docs/v5/api-reference/content-management.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

44 lines
1.8 KiB
Text

---
title: "Content management"
sidebarTitle: "Overview"
description: "Retrieve, list, and remove documents, chunks, and memories"
icon: "/icons/hugeicons/book-open-01.svg"
---
Inspect the context stored in a namespace and remove information that should no longer be used. Retrieve a document with its derived context, page through any resource type, or forget documents and memories precisely.
| Operation | Purpose |
| --- | --- |
| `GET /ns/{namespace}/document/{id}` | Retrieve source content with its chunks or memories |
| `GET /ns/{namespace}/memories/{id}` | Retrieve one memory with its history, connected memories, or source document |
| `POST /ns/{namespace}/list/{type}` | Page through documents, chunks, or memories |
| `DELETE /ns/{namespace}/document` | Remove one or many documents |
| `DELETE /ns/{namespace}/memories` | Forget reviewed memories by exact ID |
| `DELETE /ns/{namespace}/memories/semantic` | Find and forget memories by meaning |
<CodeGroup>
```ts TypeScript
const doc = await supermemory.documents.get("user_1", "conv_1", {
include: ["chunks", "memories"],
})
const { documents, pagination } = await supermemory.list("user_1", "documents", {
page: 1,
limit: 50,
sort: "createdAt",
order: "desc",
})
```
```bash curl
curl "https://api.supermemory.ai/ns/user_1/document/conv_1?include=chunks&include=memories" \
-H "Authorization: Bearer $SUPERMEMORY_API_KEY"
curl -X POST "https://api.supermemory.ai/ns/user_1/list/documents?page=1&limit=50&sort=createdAt&order=desc" \
-H "Authorization: Bearer $SUPERMEMORY_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'
```
</CodeGroup>
Semantic forgetting supports `dryRun: true`, so you can review matches before deleting them. See [document read migration](/migration/api-v5-document-reads) and [memory migration](/migration/api-v5-recall).