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 retrieve.

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

200 - application/json

Successfully updated memory.

id
string<uuid>

The unique identifier of the updated memory.

text
string

The updated text content of the memory

user_id
string | null

The user ID associated with the memory, if any

agent_id
string | null

The agent ID associated with the memory, if any

app_id
string | null

The app ID associated with the memory, if any

run_id
string | null

The run ID associated with the memory, if any

hash
string

Hash of the memory content

metadata
object

Additional metadata associated with the memory

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.