> ## Documentation Index
> Fetch the complete documentation index at: https://supermemory.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Content management

> Retrieve, list, and remove documents, chunks, and memories

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 |

```ts TypeScript theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
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 theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
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 '{}'
```

Document lists omit `content` by default. Send `{"include":{"content":true}}` to return published extracted text, including text from uploaded files. See [Document operations](https://supermemory.ai/docs/ingestion/document-operations.md) for response and processing details.

Semantic forgetting supports `dryRun: true`, so you can review matches before deleting them. See [document read migration](https://supermemory.ai/docs/migration/api-v5-document-reads.md) and [memory forgetting migration](https://supermemory.ai/docs/migration/api-v5-memory-forgetting.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.