> ## Documentation Index
> Fetch the complete documentation index at: https://docs.maximem.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Maximem Synap is a managed memory layer for AI agents: it ingests conversations and documents, extracts structured memory, and returns scoped context to the agent at retrieval time.
> The Python and JavaScript/TypeScript SDKs are the supported way to use Synap. Write integration code with SDK calls, not raw HTTP requests.
> Start with the Quickstart: https://docs.maximem.ai/getting-started/quickstart.md. Every SDK method is documented in the SDK reference: https://docs.maximem.ai/sdk-reference/overview.md.

# memories.forget

> Forget memories by describing them in the user's own words, when you do not hold their ids.

```python Python theme={null}
await sdk.memories.forget(description, user_id=None, customer_id=None, scope=None, mode="preview")
```

```typescript TypeScript theme={null}
await sdk.memories.forget(options: ForgetOptions)
```

REST One HTTPS request. Works in any runtime, including serverless functions.

Forget memories by describing them, for example "my old phone number". Synap finds the memories that match the description and either files them for a person to approve, or removes them straight away. Use this when you do not hold memory ids. To delete one memory whose id you have, use [`memories.delete`](/sdk-reference/memories/delete).

A call always covers exactly one user: pass `user_id`, plus `customer_id` on a B2B instance. A request that would reach wider than one user is refused.

Python 0.5.5 and later. JavaScript and TypeScript 0.5.6 and later.

### Parameters

**description** `string` *required*

What to forget, in the user's own words. 3 to 500 characters.

**user\_id** `string`

The user whose memories to search. Optional in the signature, but a call without it is refused (HTTP 400), because a forget must cover exactly one user.

**customer\_id** `string`

The customer the user belongs to. Required on B2B. **Not accepted on B2C**: passing it is rejected. See [B2C vs B2B](/concepts/memory-scopes.md#b2c-vs-b2b-which-scopes-apply-to-you).

**scope** `dict[str, str]`

The level of your [scope ladder](/concepts/scope-ladder.md) to search, named in full, for example `{"customer": "acme", "team": "payments", "user": "dana"}`. Only needed when your ladder has a level between customer and user.

**mode** `string` (default: preview)

What happens to the memories that match.

| Value | What happens |
| - | - |
| `preview` | **Default.** Nothing is deleted. Synap files a pending request that a person approves in the dashboard, on the **Requests** page under **Deletion requests**. `candidates` lists what matched. |
| `direct` | Synap finds the matches and removes them from every read in the same call. A repeat is harmless and finds nothing new, but it counts as a new request. |

### Returns

A `ForgetResponse`.

**status** `string`

What happened.

| Value | Meaning |
| - | - |
| `nothing_matches` | No memory matched the description. |
| `preview` | A pending request was filed. Nothing is deleted yet. |
| `deleted` | The matching memories are gone. |
| `partial` | The memories are hidden from reads, but a store named in `still_present_in` may still hold the text. |

**request\_id** `string | None`

The id of this forget request. In `preview` mode, the pending request you approve in the dashboard.

**candidates** `list[ForgetCandidate]`

The memories the description matched. Each has `memory_id`, `content`, `memory_type`, and `store`: `"memory"`, or where a copy of its text lives (`chunk`, `sentence`, `entity`, `triple`, `profile`, `candidate`).

**deleted\_ids** `list[string]`

The memories removed by this call.

**failed\_ids** `list[string]`

The memories that could not be removed.

**still\_present\_in** `list[string]`

On a `partial` result, the stores that may still hold the text.

**may\_be\_incomplete** `bool`

`true` when a search limit stopped the match while it was still finding memories, so the description may cover more than this call reached.

> [!WARNING]
>
> Tell your end user something was removed only when `status` is `"deleted"`. A `partial` result hides the memories from reads, but a copy of the text may remain.

### Example

```python Python theme={null}
from maximem_synap import MaximemSynapSDK

sdk = MaximemSynapSDK()  # reads SYNAP_API_KEY from your environment
await sdk.initialize()

result = await sdk.memories.forget(
    description="my old phone number",
    user_id="user_alice",
    customer_id="customer_acme",  # B2B only: required there, rejected on B2C
)

if result.status == "preview":
    print(f"{len(result.candidates)} memories wait for approval (request {result.request_id})")
elif result.status == "nothing_matches":
    print("Nothing matched that description.")
```

```typescript TypeScript theme={null}
import { SynapClient } from '@maximem/synap-js-sdk';

const sdk = new SynapClient(); // reads SYNAP_API_KEY from your environment
await sdk.initialize();

const result = await sdk.memories.forget({
  description: 'my old phone number',
  user_id: 'user_alice',
  customer_id: 'customer_acme', // B2B only: required there, rejected on B2C
});

if (result.status === 'preview') {
  console.log(`${result.candidates.length} memories wait for approval (request ${result.request_id})`);
} else if (result.status === 'nothing_matches') {
  console.log('Nothing matched that description.');
}
```

### Raises

* `InvalidInputError`: the call does not cover exactly one user (HTTP 400), Synap rejected the request (HTTP 422), or `description` or `mode` is invalid (caught before anything is sent).
* `ServiceUnavailableError`: the matcher was unavailable (HTTP 503). Nothing was deleted, so it is safe to try again. The SDK retries first, under its normal retry policy.
* `RateLimitError`: too many requests (HTTP 429).
* `AuthenticationError`: the API key is missing or invalid, or `initialize()` has not been called.

### See also

* [memories.delete](/sdk-reference/memories/delete.md): delete one memory by its id
* [Erasing a person](/guides/erasure.md): remove everything about one person


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