> ## 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, 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
  /namespaces
  /organization
```

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 })
```

Every SDK call takes one object. `namespace`, path IDs, and query parameters are top-level keys; the JSON body goes under `body`. Each reference page below shows the SDK call next to the equivalent `curl`. There is no v5 Python SDK yet.

<CardGroup cols={2}>
  <Card title="Migrate to v5" icon="arrow-up-right" href="/docs/migration/api-v5">
    Translate every v3/v4 request and response deterministically.
  </Card>

  <Card title="Authentication" icon="key" href="/docs/authentication">
    Authenticate with the same bearer API keys used by legacy endpoints.
  </Card>
</CardGroup>


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