{"uid":"cap_ZsMO61-okwiBs65vUA3-k","slug":"mem0-cloud-delete-memories-05e74893","name":"Mem0 Cloud - Delete Memories","description":"Read your stored memories, like mem0's get memory and get all memories. With memory_id: returns that one memory (404 if it is not yours). Without it: returns a page {count, next, previous, results} of the memories matching user_id, agent_id, app_id or run_id (at least one; \"*\" matches any value), newest first. Requires your memory_key (a secret string you generate): a different key sees nothing.","url":"https://mem0-cloud.saastemly.com/v1/memories?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET","HEAD","DELETE"],"type":"string"},"queryParams":{"type":"object","required":["memory_key"],"properties":{"page":{"type":"integer","description":"Page number, from 1 (default 1)"},"app_id":{"type":"string","description":"Entity: the app (1-128 characters)"},"run_id":{"type":"string","description":"Entity: the session or run (1-128 characters)"},"user_id":{"type":"string","description":"Entity: the user the memories are about (1-128 characters)"},"agent_id":{"type":"string","description":"Entity: the agent the memories belong to (1-128 characters)"},"memory_id":{"type":"string","description":"UUID of one memory to fetch; leave out to list memories instead"},"page_size":{"type":"integer","description":"Memories per page, 1-100 (default 50)"},"memory_key":{"type":"string","description":"Your secret: a random string of 16-256 characters that you generate once and keep (also accepted as the X-Memory-Key header). Memories are stored and searched only under its hash, so nobody who lacks it can read them, whatever user_id they send. Lose it and the memories are unreachable."},"show_expired":{"type":"boolean","description":"Include memories whose expiration_date has passed (default false)"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_E1CsnIEbjly2ldcOWh0IW","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Deletes one specific memory by ID or up to 200 memories matching a given entity scope (user, agent, app, or run), authenticated by a secret memory key.","exampleAgentPrompt":"Delete all the memories stored under my agent 'assistant-v2' — my memory key is mk_abc123xyz789defgh456, and the agent_id is 'assistant-v2'. Let me know if more than 200 remain after this.","exampleUseCases":[{"title":"Clear a user's memory after account deletion","prompt":"A user just deleted their account — please wipe all their stored memories for user_id 'user_8821' using memory key mk_secret99887766aabbcc. Tell me if there are more left after the first batch."},{"title":"Remove a single incorrect memory record","prompt":"There's a wrong memory saved with ID 'd3f1a2b4-9c87-4e56-a123-0f1234567890' — go ahead and delete just that one using memory key mk_myprivatekey112233445566."},{"title":"Reset agent memory between sessions","prompt":"The current session for run_id 'run_20240601_morning' is over — delete all memories tied to that run using memory key mk_agentrunkey778899aabbccddeeff so we start fresh next time."}],"resultDescription":"Returns a confirmation that the memory or memories were deleted. For bulk deletes (no memory_id), also indicates whether more than 200 matching memories remain. Returns a 404 error if a specific memory_id is not found or does not belong to the provided memory key.","failureModes":["404 Not Found: specified memory_id does not exist or belongs to a different memory key","400 Bad Request: neither memory_id nor at least one of user_id/agent_id/app_id/run_id provided for bulk delete","400 Bad Request: memory_key missing or malformed (not 16-256 characters)","Partial deletion: up to 200 memories deleted per call; endpoint signals if more remain, requiring additional calls","No memories found matching the provided entity scope: no-op, zero deletions"],"whenToPreferThis":"Use this endpoint when you need to remove stored memories from Mem0 Cloud — either a single known memory by its UUID or a scoped bulk deletion for a user, agent, app, or run. Choose this over alternatives when you are already using the Mem0 Cloud sibling endpoints (add/store and search) and need lifecycle management of stored memories. The secret memory_key architecture ensures only the owner can delete, making this suitable for multi-tenant agent deployments where memory isolation is critical.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-31T00:35:11.068Z","isFirstParty":false,"canonicalSlug":"mem0-cloud-delete-memories-05e74893"}