Skip to main content
PATCH
Update a memory (creates new version)

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
containerTag
string
required

Container tag / space identifier. Required to scope the operation.

Maximum string length: 100
Pattern: ^[a-zA-Z0-9_:-]+$
Example:

"user_123"

newContent
string
required

The new content that will replace the existing memory

Minimum string length: 1
Example:

"John now prefers light mode"

id
string

ID of the memory entry to operate on

Example:

"mem_abc123"

content
string

Exact content match of the memory entry to operate on. Use this when you don't have the ID.

Example:

"John prefers dark mode"

metadata
object

Optional metadata. If not provided, inherits from the previous version.

forgetAfter
string<datetime>

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.

Example:

"2026-06-01T00:00:00Z"

forgetReason
string | null

Optional reason for the scheduled forgetting. Cleared automatically when forgetAfter is set to null.

Example:

"temporary project deadline"

temporalContext
object

Structured temporal metadata. Merged into the metadata JSON column. If omitted, existing temporalContext is preserved.

Response

Memory updated successfully

Response after updating a memory

id
string
required

ID of the newly created memory version

Example:

"mem_xyz789"

memory
string
required

The content of the new memory version

Example:

"John now prefers light mode"

version
number
required

Version number of this memory entry

Example:

2

parentMemoryId
string | null
required

ID of the memory this version updates

Example:

"mem_abc123"

rootMemoryId
string | null
required

ID of the first memory in this version chain

Example:

"mem_abc123"

createdAt
string<datetime>
required

When this memory version was created

forgetAfter
string<datetime>
required

When this memory will be auto-forgotten, or null if no expiry

forgetReason
string | null
required

Reason for the scheduled forgetting, or null

metadata
object | null
required

Arbitrary key-value metadata attached to this memory, or null if none was provided