> ## 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/{memory_id} — Remove a Single Memory

> Permanently remove one specific memory by UUID. Requires user_id and agent_id to match the memory owner, preventing accidental cross-user deletion.

Use this endpoint when you need to surgically remove one specific memory — for example, to correct a mistakenly stored fact or honour a targeted deletion request. You must supply the `user_id` and `agent_id` that own the memory; the API will not delete memories belonging to a different user, which prevents accidental cross-user data loss.

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

## Request Headers

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

## Path Parameters

<ParamField path="memory_id" type="string" required>
  UUID of the memory to delete. Obtain this from a previous store, search, or list response.
</ParamField>

## Query Parameters

<ParamField query="user_id" type="string" required>
  Must match the `user_id` that owns this memory.
</ParamField>

<ParamField query="agent_id" type="string" required>
  Must match the `agent_id` that stored this memory.
</ParamField>

## Examples

<CodeGroup>
  ```bash curl theme={null}
  curl -X DELETE \
    "https://api.remem.online/memories/775263ee-73af-4416-9804-1f274048ae08?\
  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(
      memory_id="775263ee-73af-4416-9804-1f274048ae08",
      user_id="user_123",
      agent_id="support_bot",
  )

  print(result.deleted)  # 1 if removed, 0 if not found
  print(result.message)  # "Deleted 1 memory."
  ```
</CodeGroup>

## Response

### 200 — Memory Deleted

```json theme={null}
{
  "deleted": 1,
  "message": "Deleted 1 memory."
}
```

### Memory Not Found

```json theme={null}
{
  "deleted": 0,
  "message": "Memory not found."
}
```

<ResponseField name="deleted" type="integer">
  `1` if the memory was removed, `0` if the ID does not exist or belongs to a different user/agent pair.
</ResponseField>

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

<Note>
  The endpoint always returns HTTP 200, even when no memory was removed. A `deleted: 0` result means the supplied ID does not exist or belongs to a different user/agent pair. This makes it safe to call without first checking whether the memory exists.
</Note>

## 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 query parameters |
