mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-10-27 06:15:15 +00:00
Fixes namespace, auth and SDK-shape docs.
- **Namespace move example deleted instead.** It sent `moveTo` in a JSON body on `DELETE /ns/{namespace}`. The route only reads `moveTo` from the query string and ignores the body, so following the docs permanently deleted the namespace. It now uses `?moveTo=`, and the overview warns about this.
- **SDK call shape.** URL values are positional (`namespace` first), followed by one options object; the docs described one object with `body`. Python 5.0.0 is the v5 client, so "no v5 Python SDK" is gone.
- **Scoped keys** (`authentication.mdx`):
- The allowed-endpoints list now includes the `/ns/*` routes; all legacy routes are kept.
- `containerTags` (several namespaces) is documented.
- Namespace names don't allow dots.
- **Key permissions.** Read/write applies to the whole key; only restricted members have per-namespace permissions.
- **Smaller fixes:**
- The move response has no `success` field.
- `namespaceCount` only matches the namespace list for an unrestricted key.
- `setup --json` does nothing.
- The agent prompt's ban on `memories.*` now covers only the calls v5 removed.
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)
74 lines
2.4 KiB
Text
74 lines
2.4 KiB
Text
v5 exposes only the organization-wide context needed to guide memory formation. Internal controls and profile bucket mutation are no longer part of this settings resource.
|
|
|
|
### Endpoint mapping
|
|
|
|
| Legacy | v5 |
|
|
| --- | --- |
|
|
| `GET /v3/settings` | `GET /organization` |
|
|
| `PATCH /v3/settings` | `PATCH /organization` |
|
|
| `filterPrompt` | `organizationalContext` |
|
|
|
|
### Read organization settings
|
|
|
|
```bash
|
|
GET /organization
|
|
```
|
|
|
|
```json
|
|
{
|
|
"organizationalContext": "Acme builds security tools for enterprises",
|
|
"namespaceCount": 42
|
|
}
|
|
```
|
|
|
|
Remove readers for legacy settings that are not present in this allowlisted response. `namespaceCount` is informational and cannot be changed through PATCH.
|
|
|
|
### Update organization context
|
|
|
|
<CodeGroup>
|
|
```bash Legacy
|
|
PATCH /v3/settings
|
|
{"filterPrompt":"Acme builds security tools for enterprises"}
|
|
```
|
|
|
|
```bash v5
|
|
PATCH /organization
|
|
{"organizationalContext":"Acme builds security tools for enterprises"}
|
|
```
|
|
</CodeGroup>
|
|
|
|
The field is exhaustive: the supplied value replaces the existing context. Send `null` to remove it. Empty strings are rejected.
|
|
|
|
Organization updates require an organization administrator. Do not silently fall back to namespace context when the caller receives `403`.
|
|
|
|
### With the SDK
|
|
|
|
<CodeGroup>
|
|
```ts Legacy
|
|
const settings = await client.settings.get()
|
|
await client.settings.update({ filterPrompt: "Acme builds security tools for enterprises" })
|
|
```
|
|
|
|
```ts v5
|
|
const { organizationalContext, namespaceCount } = await supermemory.organization.get()
|
|
|
|
await supermemory.organization.update({
|
|
organizationalContext: "Acme builds security tools for enterprises",
|
|
})
|
|
```
|
|
</CodeGroup>
|
|
|
|
### Removed public operations
|
|
|
|
- Organization profile-bucket mutation is not exposed through organization settings.
|
|
- Bucket suggestion is not part of v5.
|
|
- Organization data reset is not part of v5.
|
|
- Namespace-owned profile buckets are managed through `/ns/{namespace}/profile/buckets`.
|
|
|
|
### Verification
|
|
|
|
- Compare the v5 context with the legacy `filterPrompt` before cutover.
|
|
- Set, replace, and clear organizational context.
|
|
- Confirm `namespaceCount` agrees with `pagination.totalItems` from `GET /namespaces` when called with an unrestricted org key. `namespaceCount` always counts every namespace in the organization, while `GET /namespaces` only counts the namespaces the caller can read.
|
|
- Verify non-admin callers receive `403` on PATCH.
|
|
- Confirm removed fields are not required by downstream configuration code.
|