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

# DELETE /memories — Wipe All Memories for a User Agent

> Permanently remove every memory for a user and agent pair in a single request. Returns the total count of deleted records. Ideal for GDPR erasure and account resets.

The Wipe endpoint deletes every memory stored for a `user_id` + `agent_id` combination in a single request. You don't need to enumerate individual memory IDs — Remem removes all of them atomically and returns the total count of deleted records. This is the right tool when you need a clean slate rather than a targeted removal.

<Warning>
  This is irreversible. All memories for the specified user and agent are permanently deleted and cannot be recovered.
</Warning>

<Note>
  **Endpoint:** `DELETE https://api.remem.online/memories`
</Note>

## Request Headers

| Name        | Required | Description        |
| ----------- | -------- | ------------------ |
| `X-API-Key` | Yes      | Your Remem API key |

## Query Parameters

<ParamField query="user_id" type="string" required>
  Wipe all memories belonging to this user.
</ParamField>

<ParamField query="agent_id" type="string" required>
  Wipe all memories belonging to this agent. Only memories that match both `user_id` and `agent_id` are removed.
</ParamField>

## Examples

<CodeGroup>
  ```bash curl theme={null}
  curl -X DELETE \
    "https://api.remem.online/memories?\
  user_id=user_123&agent_id=support_bot" \
    -H "X-API-Key: rm_live_xxx"
  ```

  ```python Python SDK theme={null}
  from remem import RememClient

  client = RememClient(api_key="rm_live_xxx")

  result = client.forget_all(
      user_id="user_123",
      agent_id="support_bot",
  )

  print(result.deleted)  # total number of memories removed
  print(result.message)  # e.g. "Deleted 47 memories."
  ```
</CodeGroup>

## Response

### 200 — Success

```json theme={null}
{
  "deleted": 47,
  "message": "Deleted 47 memories."
}
```

<ResponseField name="deleted" type="integer">
  Total number of memories permanently removed for this user+agent pair.
</ResponseField>

<ResponseField name="message" type="string">
  Human-readable confirmation of the operation.
</ResponseField>

## Error Responses

| Code  | Meaning                    | Fix                                                 |
| ----- | -------------------------- | --------------------------------------------------- |
| `401` | Invalid or missing API key | Verify your key is passed in the `X-API-Key` header |
| `422` | Missing required parameter | Both `user_id` and `agent_id` are required          |

## Common Use Cases

* **GDPR right-to-erasure** — when a user requests full deletion of their data, call this endpoint for each agent associated with their account.
* **Account resets** — clear all stored context when a user resets their profile or preferences.
* **Testing and development** — start fresh between test runs without manually deleting individual memories.
