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

# Memory History

> GET /v1/memories/:id/history — Get the change history for a memory.

<Snippet file="snippets/wallet-auth-callout.mdx" />

**Price:** FREE

Retrieve the full change history for a memory. Every update (content, importance, metadata, etc.) is tracked as a history entry.

## Path Parameters

<ParamField path="id" type="string" required>
  UUID of the memory.
</ParamField>

## Response (200)

<ResponseField name="history" type="array">
  Array of history entries, ordered by creation time (newest first).

  <Expandable title="History entry fields">
    <ResponseField name="history[].id" type="string">
      UUID of the history entry.
    </ResponseField>

    <ResponseField name="history[].memory_id" type="string">
      UUID of the memory.
    </ResponseField>

    <ResponseField name="history[].changes" type="object">
      Object containing the fields that were changed and their new values.
    </ResponseField>

    <ResponseField name="history[].created_at" type="string">
      ISO 8601 timestamp of when the change was made.
    </ResponseField>
  </Expandable>
</ResponseField>

## Errors

| Status | Description                                              |
| ------ | -------------------------------------------------------- |
| 404    | Memory not found, deleted, or belongs to another wallet. |
| 422    | Invalid UUID format.                                     |

## Example

<CodeGroup>
  ```bash curl theme={null}
  curl https://api.memoclaw.com/v1/memories/550e8400-e29b-41d4-a716-446655440000/history
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    "https://api.memoclaw.com/v1/memories/550e8400-e29b-41d4-a716-446655440000/history"
  );
  const data = await response.json();
  ```

  ```python Python theme={null}
  from memoclaw import MemoClaw

  client = MemoClaw()
  history = client.get_history("550e8400-e29b-41d4-a716-446655440000")
  for entry in history:
      print(f"{entry.created_at}: {entry.changes}")
  ```

  ```typescript TypeScript theme={null}
  const history = await client.getHistory("550e8400-e29b-41d4-a716-446655440000");
  for (const entry of history) {
    console.log(`${entry.created_at}: ${JSON.stringify(entry.changes)}`);
  }
  ```
</CodeGroup>

```json Response theme={null}
{
  "history": [
    {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "memory_id": "550e8400-e29b-41d4-a716-446655440000",
      "changes": {
        "importance": 0.95,
        "content": "User prefers 2-space indentation (not tabs)"
      },
      "created_at": "2026-02-11T15:30:00Z"
    },
    {
      "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "memory_id": "550e8400-e29b-41d4-a716-446655440000",
      "changes": {
        "metadata": { "tags": ["preferences", "code-style"] }
      },
      "created_at": "2026-02-10T12:00:00Z"
    }
  ]
}
```

<Note>
  History is only created when a memory is updated via `PATCH /v1/memories/:id`. The initial store does not create a history entry.
</Note>
