Update a memory (creates new version)
PATCH/v4/memories
Update a memory by creating a new version. The original memory is preserved with isLatest=false.
Body ParametersJSON
content: optional string
Exact content match of the memory entry to operate on. Use this when you don’t have the ID.
forgetAfter: optional string
ISO 8601 datetime string. The memory will be auto-forgotten after this time. Pass null to clear an existing expiry. Omit to inherit from the previous version.
formatdatetime
Returns
Update a memory (creates new version)
curl https://api.supermemory.ai/v4/memories \
-X PATCH \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $SUPERMEMORY_API_KEY" \
-d '{
"containerTag": "user_123",
"newContent": "John now prefers light mode",
"id": "mem_abc123",
"content": "John prefers dark mode",
"forgetAfter": "2026-06-01T00:00:00Z",
"forgetReason": "temporary project deadline"
}'{
"id": "mem_xyz789",
"createdAt": "createdAt",
"forgetAfter": "forgetAfter",
"forgetReason": "forgetReason",
"memory": "John now prefers light mode",
"parentMemoryId": "mem_abc123",
"rootMemoryId": "mem_abc123",
"version": 2
}Returns Examples
{
"id": "mem_xyz789",
"createdAt": "createdAt",
"forgetAfter": "forgetAfter",
"forgetReason": "forgetReason",
"memory": "John now prefers light mode",
"parentMemoryId": "mem_abc123",
"rootMemoryId": "mem_abc123",
"version": 2
}