> ## 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.

# API reference

> Documents, search, profiles, lists, memories, connectors, namespaces, and organization settings in the latest Supermemory API

v5 makes namespace scope explicit in the URL and consolidates overlapping legacy operations.

```text theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
https://api.supermemory.ai
  /ns/{namespace}/document
  /ns/{namespace}/search
  /ns/{namespace}/profile
  /ns/{namespace}/list/{type}
  /ns/{namespace}/memories
  /ns/{namespace}/connectors
  /connectors
  /namespaces
  /organization
```

> [!TIP]
>
> On v3 or v4? Run `npx supermemory@latest migrate`, or read the [v5 migration guide](https://supermemory.ai/docs/migration/api-v5.md).

Use the [v5 reference](https://api.supermemory.ai/v5/reference) for the stable v5 API. [`/reference`](https://api.supermemory.ai/reference) always points to the latest public version.

## Install the TypeScript SDK

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
npm i supermemory
```

```ts theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
import { Supermemory } from "supermemory"

const supermemory = new Supermemory({ apiKey: process.env.SUPERMEMORY_API_KEY })
```

URL values are positional arguments (`namespace` first, then `id` where there is one), and everything else goes in one object: `supermemory.add("user_123", { content })`. Each reference page below shows the SDK call next to the equivalent `curl`. The Python SDK (`pip install supermemory`, 5.0.0 and later) follows the same shape with keyword arguments: `client.add("user_123", content="...")`.

> [card] [Migrate to v5](https://supermemory.ai/docs/migration/api-v5.md)
>
> Translate every v3/v4 request and response deterministically.

> [card] [Authentication](https://supermemory.ai/docs/authentication.md)
>
> Authenticate with the same bearer API keys used by legacy endpoints.


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