Skip to main content
MemContext is built for information that changes. If you save a newer fact that replaces an older one, search can return the newer memory while keeping the previous version available through the history endpoint.

Example

Earlier memory:
User prefers long-form LinkedIn posts.
Later memory:
User now prefers short hook-first LinkedIn posts.
When you search for the user’s LinkedIn preference, MemContext should return the newer memory. You do not need to manually delete the older statement first.

Inspect History

Use the history endpoint when you need to see how a memory changed.
curl https://api.memcontext.in/api/memories/a1b2c3d4-.../history \
  -H "X-API-Key: mc_your_key"
Response:
{
  "current": {
    "id": "e5f6g7h8-...",
    "content": "User now prefers short hook-first LinkedIn posts.",
    "version": 2,
    "createdAt": "2026-04-10T00:00:00Z"
  },
  "history": [
    {
      "id": "a1b2c3d4-...",
      "content": "User prefers long-form LinkedIn posts.",
      "version": 1,
      "createdAt": "2026-03-15T00:00:00Z"
    }
  ]
}

Delete Memories

Use delete when a memory should no longer appear in search.
curl -X DELETE https://api.memcontext.in/api/memories/a1b2c3d4-... \
  -H "X-API-Key: mc_your_key"
Deleted memories are excluded from future retrieval.