supermemory/apps/docs/v5/api-reference/content-management.mdx
sohamd22 4347970d16 docs(api): align v5 ingestion and document operations docs with the API (#1810)
Fixes v5 ingestion and document-operation docs.

- **Query params return `400`.** `dreaming`, `fileType` and `mimeType` were documented as query params; they are JSON body or multipart form fields.
- **Errors.** Out-of-balance quota is `402`, not `429`; `429` is only rate limiting. Added the `409` returned during a namespace merge.
- **Statuses.** There is no `processing` status. The real ones are queued, extracting, chunking, embedding, done and failed; treat anything else as in progress.
- **`group` on updates.** `group` is ingestion-side: it picks which existing memories serve as context while content is processed. Changing it only takes effect on re-ingestion, so it's sent with `content`/`file`. The "group-only PATCH" claims are removed from the migration doc.
- **Lists, deletes and forget:**
  - Valid `sort` values per type, a `limit` max of 100, and `include.forgotten`.
  - Deletes skip documents that are still processing.
  - Forget-matching has a 100-match cap and a 2000-character `query` limit.
- **Failed documents stay `failed`.** The docs said they're deleted after 2 minutes. They actually stay `failed`, and resending the same `id` reprocesses them.
- **Smaller fixes:**
  - Metadata allows `string[]`.
  - The batch response field is `count`.
  - `audio` is a valid `fileType`.
  - Chunk overlap is 200 characters.
  - URL extraction no longer claims Markdowner.
  - Search examples no longer index the response object as an array.

Checked against the current API and the published SDKs (TS 5.0.1, Python 5.0.0). Legacy v3/v4 docs are unchanged apart from factual fixes.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-10-15 18:52:40 +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 forgetting migration](/migration/api-v5-memory-forgetting).