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

# Delete User Memory

> Delete a memory belonging to the authenticated user

Permanently deletes a memory belonging to the authenticated user.

<ParamField header="Authorization" type="string" required>
  Bearer token obtained from the authenticate endpoint.
</ParamField>

<ParamField path="memory_id" type="string" required>
  UUID of the memory to delete.
</ParamField>

## Response

<ResponseField name="message" type="string">
  Confirmation message: `"User memory deleted successfully"`.
</ResponseField>

<RequestExample>
  ```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
  curl -X DELETE https://api.trellis.sh/v1/user-memories/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
    -H "Authorization: Bearer YOUR_TOKEN"
  ```

  ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
  import requests

  memory_id = "a1b2c3d4-e5f6-7890-abcd-ef1234567890"

  response = requests.delete(
      f"https://api.trellis.sh/v1/user-memories/{memory_id}",
      headers={"Authorization": "Bearer YOUR_TOKEN"},
  )
  ```

  ```javascript JavaScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
  const memoryId = "a1b2c3d4-e5f6-7890-abcd-ef1234567890";

  await fetch(`https://api.trellis.sh/v1/user-memories/${memoryId}`, {
    method: "DELETE",
    headers: { Authorization: "Bearer YOUR_TOKEN" },
  });
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={"theme":{"light":"github-light","dark":"github-dark"}}
  {
    "message": "User memory deleted successfully"
  }
  ```

  ```json 401 theme={"theme":{"light":"github-light","dark":"github-dark"}}
  {
    "detail": "Missing Authorization header"
  }
  ```

  ```json 404 theme={"theme":{"light":"github-light","dark":"github-dark"}}
  {
    "detail": "User memory not found"
  }
  ```
</ResponseExample>
