Delete
Remove a single memory by id, or wipe every memory in a scope.
Delete removes memories. There are two forms: delete one memory by its id, or delete every memory in a scope at once. The first is precise and routine. The second is a bulk wipe — handle it with care.
Delete one by id
Pass the memory id in the path. The response confirms the deletion.
curl -X DELETE https://fishmem.com/v1/memories/mem_124 \
-H "Authorization: Bearer fm_..."const client = new MemoryClient({ apiKey, host: "https://fishmem.com" });
await client.delete("mem_124");Response:
{ "id": "mem_124", "deleted": true }Delete all in a scope
Pass user_id (or agent_id / run_id) as a query parameter to delete every memory in that scope. The response returns how many were removed.
curl -X DELETE "https://fishmem.com/v1/memories?user_id=alice" \
-H "Authorization: Bearer fm_..."await client.deleteAll({ user_id: "alice" });Response:
{ "deleted": 12 }Caution
Delete-all is irreversible and matches every memory in the scope you name. There is no soft-delete to undo it. Before calling it, double-check the scope parameter — a wrong user_id wipes a different user. When in doubt, list the scope first to confirm exactly what will be removed.
Parameters
| Operation | Parameter | Notes |
|---|---|---|
| Delete one | {id} (path) | The memory id. |
| Delete all | user_id | Scope to wipe. |
| Delete all | agent_id | Scope to wipe. |
| Delete all | run_id | Scope to wipe. |
Credits
(1000 credits ≈ $1.)
See the full contracts at /api-reference/delete and /api-reference/delete-all.