Skip to main content
PUT
Python
Use this endpoint to update mutable memory fields. To make a memory expire, set expiration_date to a YYYY-MM-DD date. To make it permanent again, send expiration_date: null.
TypeScript uses expirationDate.

Authorizations

Authorization
string
header
required

API key authentication. Prefix your Mem0 API key with 'Token '. Example: 'Token your_api_key'

Path Parameters

memory_id
string<uuid>
required

The unique identifier of the memory to update.

Body

application/json
text
string

The updated text content of the memory

metadata
object

Additional metadata associated with the memory

expiration_date
string<date> | null

Expiration date in YYYY-MM-DD format, or null to clear the expiration date.

Response

Successfully updated memory.

id
string<uuid>

The unique identifier of the updated memory.

memory
string

The updated content of the memory.

user_id
string | null

Identifier of the user associated with this memory

agent_id
string | null

The identifier of the agent associated with this memory, if any.

app_id
string | null

The identifier of the app associated with this memory, if any.

session_id
string | null

The run identifier associated with this memory, returned as session_id.

metadata
object | null

Additional metadata associated with the memory

categories
string[] | null
created_at
string<date-time>

Timestamp of when the memory was created.

updated_at
string<date-time>

Timestamp of when the memory was last updated.

expiration_date
string<date> | null

The date when the memory will expire. Format: YYYY-MM-DD.

structured_attributes
object | null

System-derived temporal breakdown of the memory's creation time (e.g. year, month, day_of_week).

replaced_by
string | null

ID of the memory that superseded this one, if any.

synthesized
boolean

Whether this memory was synthesized rather than directly extracted.

lifecycle_state
string

Lifecycle state of the memory.