mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-08-12 18:14:06 +00:00
### TL;DR Documents the new `ids` parameter for the `forget-matching` endpoint, allowing exact memory deletion without semantic search. ### What changed? The `forget-matching` endpoint now accepts either a `query` (semantic search-based forgetting) or an explicit `ids` list (direct deletion by memory ID) — one or the other must be provided. The docs have been updated to reflect this: - The `query` parameter is now marked as `one of*` rather than required, and `ids` is introduced as an alternative with the same mutual-exclusivity constraint. - `threshold` is clarified as applying to `query` mode only. - Code examples for both JavaScript and cURL now show the recommended two-step pattern: run a `dryRun` with `query`, then apply using the `ids` returned from the preview — avoiding drift if the container changes between steps. - A new `<Tip>` block explains why passing `ids` on the apply step produces a more deterministic delete than re-running the `query`. ### How to test? 1. Call `forget-matching` with `dryRun: true` and a `query` to retrieve candidate `id`s. 2. Re-call with `dryRun: false` and the `ids` from step 1 to confirm only those exact memories are forgotten. 3. Verify that passing `ids` belonging to a different `containerTag` are ignored. 4. Confirm that providing both `query` and `ids`, or neither, returns an appropriate validation error. ### Why make this change? Re-running a `query` on the apply step can produce different results if the container was modified between the preview and the apply. Exposing `ids` as a first-class parameter lets callers pin the delete to exactly the set they reviewed, making bulk forgetting safer and more predictable. |
||
|---|---|---|
| .. | ||
| memory-operations.mdx | ||
| memory-review.mdx | ||
| search.mdx | ||
| user-profiles.mdx | ||