FishMem
Memory Operations

Update

Edit a memory's text or metadata in place by id.

Update lets you correct or revise an existing memory directly, by its id. Use it when you already know which memory to change and what it should say — for example, fixing a fact that drifted or attaching new metadata. This is a deterministic edit, not an inference: FishMem writes exactly what you send.

What you can change

  • text — replaces the memory's stored content.
  • metadata — replaces the memory's metadata object.

Send either or both. The path carries the memory id you're updating.

curl -X PUT https://fishmem.com/v1/memories/mem_124 \
  -H "Authorization: Bearer fm_..." \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Is vegan",
    "metadata": {"source": "profile-edit"}
  }'
const client = new MemoryClient({ apiKey, host: "https://fishmem.com" });

await client.update("mem_124", {
  text: "Is vegan",
  metadata: { source: "profile-edit" },
});

Parameters

FieldTypeNotes
{id} (path)stringThe memory id to update.
textstringOptional. New content for the memory.
metadataobjectOptional. Replaces existing metadata.

Response

{
  "id": "mem_124",
  "memory": "Is vegan",
  "event": "UPDATE"
}

event will be UPDATE when the change is applied.

Notes

An update revises the memory in place and is recorded in the memory's change log — the old and new values are preserved. If you need to see what changed over time, read the history for that id.

Credits

(1000 credits ≈ $1.)

See the full contract at /api-reference/update.

On this page