PATCH update (v0.2.2)

Partial update with history audit trail.

PATCH /api/memories/:id updates only the fields you pass. Any of content, namespace, tags, metadata can be specified — unspecified fields are untouched.

curl -X PATCH -H "Authorization: Bearer mnu_..." -H "Content-Type: application/json" \
  -d '{"content": "Revised text", "tags": ["v2", "edited"]}' \
  https://mnueron.com/api/memories/<id>

Metadata merging

Metadata patches are merged, not replaced. To remove a key, pass it explicitly as null:

{ "metadata": { "speaker": null, "category": "decision" } }

This deletes speaker and sets/replaces category.

Change history

When content changes, mnueron appends an entry to metadata.history:

{
  "history": [
    { "at": 1717530000000, "prev_content_len": 412,
      "by_user": "<uuid>", "by_token": "<uuid>" }
  ]
}

We don't store the prior text (could be very large) — just length + who+when so an audit log can correlate. Combine with /api/audit_log (future) for full provenance.

Re-embedding

The hosted backend doesn't yet generate semantic embeddings inline (too heavy for Vercel serverless). When that lands in v0.3, content changes will trigger re-embedding automatically. Until then, search falls back to BM25 only.

Last updated 2026-05-16edit