Batch delete multiple memories (up to 1000) in a single API call.
# 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") delete_memories = [ {"memory_id": "285ed74b-6e05-4043-b16b-3abd5b533496"}, {"memory_id": "2c9bd859-d1b7-4d33-a6b8-94e0147c4f07"} ] response = client.batch_delete(delete_memories) print(response)
{ "message": "Successfully deleted 2 memories" }
API key authentication. Prefix your Mem0 API key with 'Token '. Example: 'Token your_api_key'
Successfully deleted memories
The response is of type object.
object
Was this page helpful?