PUT
/
v1
/
batch
# To use the Python SDK, install the package:
# pip install mem0ai

from mem0 import MemoryClient
client = MemoryClient(api_key="your_api_key", org_id="your_org_id", project_id="your_project_id")

update_memories = [
    {
        "memory_id": "285ed74b-6e05-4043-b16b-3abd5b533496",
        "text": "Watches football"
    },
    {
        "memory_id": "2c9bd859-d1b7-4d33-a6b8-94e0147c4f07",
        "text": "Likes to travel"
    }
]

response = client.batch_update(update_memories)
print(response)
{
  "message": "Successfully updated 2 memories"
}

Authorizations

Authorization
string
header
required

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

Body

application/json
memories
object[]
required

Response

200
application/json
Successfully updated memories
message
string
Example:

"Successfully updated 2 memories"