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

# Get a memory's history

> Get every version of a memory, oldest first, linked by edits, corrections and confirmations. Pass the ID of any version.

Use this endpoint to see how a memory changed over time: the original version and every edit, correction or confirmation since.

## What EDN does

1. Finds every version linked to the ID you pass, older and newer.
2. Returns them oldest first. The last one is the latest.

## Required headers

| Header | Value | Description |
| - | - | - |
| `Authorization` | `Bearer YOUR_API_KEY` | Your EDN API key. Create keys in the [Console](https://docs.tensorpro.ai/console/api-keys.md). See [Authentication](https://docs.tensorpro.ai/authentication.md) |

## Request

| Parameter | Type | Description |
| - | - | - |
| `record_id` | string | Identifier for any version of the memory, old or current |

```bash cURL theme={"theme":"github-light"}
curl "https://api.tensorpro.ai/api/v1/memory/records/8f0d2c61-5b7e-4a39-9c1e-2d4f6a8b0e17/history" \
  -H "Authorization: Bearer $EDN_API_KEY"
```

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

resp = requests.get(
    "https://api.tensorpro.ai/api/v1/memory/records/8f0d2c61-5b7e-4a39-9c1e-2d4f6a8b0e17/history",
    headers={"Authorization": f"Bearer {os.environ['EDN_API_KEY']}"},
)
resp.raise_for_status()
print(resp.json())
```

```javascript JavaScript theme={"theme":"github-light"}
const resp = await fetch("https://api.tensorpro.ai/api/v1/memory/records/8f0d2c61-5b7e-4a39-9c1e-2d4f6a8b0e17/history", {
  headers: {
    Authorization: `Bearer ${process.env.EDN_API_KEY}`,
  },
});
console.log(await resp.json());
```

## Response

```json 200 OK theme={"theme":"github-light"}
{
  "versions": [
    {
      "id": "8f0d2c61-5b7e-4a39-9c1e-2d4f6a8b0e17",
      "content_summary": "Sara manages the website project.",
      "full_text": "Sara manages the website project.",
      "provenance": "USER_STATED",
      "domain": "factual",
      "status": "replaced",
      "created_at": "2026-11-10T04:43:25+00:00",
      "project_id": null,
      "session_id": "chat-42",
      "source_id": null,
      "supersedes": null,
      "superseded_by": "1b3d5f7a-9c2e-4a6b-8d0f-2e4a6c8e0b1d",
      "event_date": null,
      "document_date": "2026-11-10T04:43:25+00:00"
    },
    {
      "id": "1b3d5f7a-9c2e-4a6b-8d0f-2e4a6c8e0b1d",
      "content_summary": "Tom manages the website project.",
      "full_text": "Tom manages the website project.",
      "provenance": "USER_CONFIRMED",
      "domain": "factual",
      "status": "current",
      "created_at": "2026-11-11T09:12:44+00:00",
      "project_id": null,
      "session_id": "chat-42",
      "source_id": null,
      "supersedes": "8f0d2c61-5b7e-4a39-9c1e-2d4f6a8b0e17",
      "superseded_by": null,
      "event_date": null,
      "document_date": "2026-11-10T04:43:25+00:00"
    }
  ]
}
```

Each version has the same fields as [Get a memory](https://docs.tensorpro.ai/api-reference/get-memory-record.md).

| Field | Type | Description |
| - | - | - |
| `versions` | array | Every version of the memory, oldest first |
| `versions[].status` | string | `current`, `replaced` or `deleted` |

## Important behavior

* **Deleted versions are included**, with `status: deleted`, so the history stays complete.

## Errors

| Status | Code | When |
| - | - | - |
| `401` | `UNAUTHORIZED` | The API key is missing, invalid or revoked |
| `404` | `NOT_FOUND` | The memory doesn't exist or isn't yours |
| `429` | `RATE_LIMITED` | Per-minute limit reached. Retry after `Retry-After` seconds |
| `500` | `INTERNAL_ERROR` | Something failed on EDN's side. Retry later |

See [Error handling](https://docs.tensorpro.ai/reference/errors.md).

```json 200 theme={"theme":"github-light"}
{
  "versions": [
    {
      "id": "8f0d2c61-5b7e-4a39-9c1e-2d4f6a8b0e17",
      "content_summary": "Sara manages the website project.",
      "full_text": "Sara manages the website project.",
      "provenance": "USER_STATED",
      "domain": "factual",
      "status": "replaced",
      "created_at": "2026-11-10T04:43:25+00:00",
      "project_id": null,
      "session_id": "chat-42",
      "source_id": null,
      "supersedes": null,
      "superseded_by": "1b3d5f7a-9c2e-4a6b-8d0f-2e4a6c8e0b1d",
      "event_date": null,
      "document_date": "2026-11-10T04:43:25+00:00"
    },
    {
      "id": "1b3d5f7a-9c2e-4a6b-8d0f-2e4a6c8e0b1d",
      "content_summary": "Tom manages the website project.",
      "full_text": "Tom manages the website project.",
      "provenance": "USER_CONFIRMED",
      "domain": "factual",
      "status": "current",
      "created_at": "2026-11-11T09:12:44+00:00",
      "project_id": null,
      "session_id": "chat-42",
      "source_id": null,
      "supersedes": "8f0d2c61-5b7e-4a39-9c1e-2d4f6a8b0e17",
      "superseded_by": null,
      "event_date": null,
      "document_date": "2026-11-10T04:43:25+00:00"
    }
  ]
}
```


## OpenAPI

````yaml get /api/v1/memory/records/{record_id}/history
openapi: 3.1.0
info:
  title: EDN Memory Engine
  version: 0.1.0
servers:
  - description: EDN evaluation endpoint
    url: https://api.tensorpro.ai
security:
  - EDNApiKey: []
paths:
  /api/v1/memory/records/{record_id}/history:
    get:
      summary: Get a memory's history
      description: >-
        Get every version of a memory, oldest first, linked by edits,
        corrections and confirmations. Pass the ID of any version.
      operationId: get_memory_record_history_api_v1_memory_records__record_id__history_get
      parameters:
        - description: The ID of the memory (the record_id returned when it was saved).
          in: path
          name: record_id
          required: true
          schema:
            description: The ID of the memory (the record_id returned when it was saved).
            title: Record Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RecordHistoryResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: The API key is missing, invalid, revoked or expired.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: The resource does not exist or does not belong to you.
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
          description: A request field is missing or invalid. errors lists each problem.
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: >-
            A rate limit or your daily quota was reached. Wait for the number of
            seconds in the Retry-After header, then retry.
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
components:
  schemas:
    RecordHistoryResponse:
      properties:
        versions:
          description: >-
            Every version of this memory, oldest first. The last one is the
            latest.
          items:
            $ref: '#/components/schemas/MemoryRecordDetail'
          title: Versions
          type: array
      required:
        - versions
      title: RecordHistoryResponse
      type: object
    ErrorResponse:
      properties:
        code:
          description: >-
            A stable error code, e.g. NOT_FOUND. Also sent in the
            X-EDN-Error-Code header.
          title: Code
          type: string
        detail:
          description: What went wrong, in plain language.
          title: Detail
          type: string
      required:
        - detail
        - code
      title: ErrorResponse
      type: object
    ValidationErrorResponse:
      properties:
        code:
          description: >-
            A stable error code, e.g. NOT_FOUND. Also sent in the
            X-EDN-Error-Code header.
          title: Code
          type: string
        detail:
          description: What went wrong, in plain language.
          title: Detail
          type: string
        errors:
          description: One entry per invalid field.
          items:
            $ref: '#/components/schemas/FieldError'
          title: Errors
          type: array
      required:
        - detail
        - code
        - errors
      title: ValidationErrorResponse
      type: object
    MemoryRecordDetail:
      properties:
        content_summary:
          description: What the memory says, as used in the SIP.
          title: Content Summary
          type: string
        created_at:
          description: When this version was created (ISO 8601, UTC).
          title: Created At
          type: string
        document_date:
          anyOf:
            - type: string
            - type: 'null'
          description: When the information was recorded (ISO 8601, UTC).
          title: Document Date
        domain:
          description: The memory's category.
          enum:
            - technical
            - professional-context
            - communication-style
            - factual
          title: Domain
          type: string
        event_date:
          anyOf:
            - type: string
            - type: 'null'
          description: When the event it describes happened, if known (ISO 8601, UTC).
          title: Event Date
        full_text:
          description: >-
            The memory's complete text. For a saved conversation turn this is
            the full exchange; otherwise it matches content_summary.
          title: Full Text
          type: string
        id:
          description: The memory's ID (same as record_id elsewhere).
          title: Id
          type: string
        project_id:
          anyOf:
            - type: string
            - type: 'null'
          description: The project it belongs to, or null for general memory.
          title: Project Id
        provenance:
          description: Where the memory came from.
          enum:
            - USER_STATED
            - USER_CONFIRMED
            - DOCUMENT_VERIFIED
            - AI_INFERRED
            - AI_GENERATED
            - SYSTEM_DERIVED
            - ROUND
          title: Provenance
          type: string
        session_id:
          anyOf:
            - type: string
            - type: 'null'
          description: The session it was saved in.
          title: Session Id
        source_id:
          anyOf:
            - type: string
            - type: 'null'
          description: The project document it came from, or null if not from a document.
          title: Source Id
        status:
          description: >-
            current: the latest version, used in SIPs. replaced: a newer version
            (an edit, correction or confirmation) took its place. deleted:
            removed (only seen in history).
          enum:
            - current
            - replaced
            - deleted
          title: Status
          type: string
        superseded_by:
          anyOf:
            - type: string
            - type: 'null'
          description: The ID of the newer version that replaced this one, or null.
          title: Superseded By
        supersedes:
          anyOf:
            - type: string
            - type: 'null'
          description: The ID of the earlier version this one replaced, or null.
          title: Supersedes
      required:
        - id
        - content_summary
        - full_text
        - provenance
        - domain
        - status
        - created_at
      title: MemoryRecordDetail
      type: object
    FieldError:
      properties:
        field:
          description: The request field with the problem, e.g. session_id.
          title: Field
          type: string
        message:
          description: What is wrong with it.
          title: Message
          type: string
      required:
        - field
        - message
      title: FieldError
      type: object
  securitySchemes:
    EDNApiKey:
      description: >-
        Your EDN API key, sent as `Bearer YOUR_API_KEY`. Create keys in the
        Console.
      scheme: bearer
      type: http

````

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