mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-10-11 03:37:56 +00:00
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.
44 lines
1.4 KiB
Text
44 lines
1.4 KiB
Text
---
|
|
title: "API reference"
|
|
sidebarTitle: "Overview"
|
|
description: "Documents, search, profiles, lists, memories, namespaces, and organization settings in the latest Supermemory API"
|
|
icon: "/icons/hugeicons/plug-socket.svg"
|
|
---
|
|
|
|
v5 makes namespace scope explicit in the URL and consolidates overlapping legacy operations.
|
|
|
|
```text
|
|
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
|
|
npm i supermemory
|
|
```
|
|
|
|
```ts
|
|
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="/migration/api-v5">
|
|
Translate every v3/v4 request and response deterministically.
|
|
</Card>
|
|
<Card title="Authentication" icon="key" href="/authentication">
|
|
Authenticate with the same bearer API keys used by legacy endpoints.
|
|
</Card>
|
|
</CardGroup>
|