POST · Add memories

Save a new memory. Returns the row with auto-generated id + timestamps.

POST /api/memories

Save a single memory. The body of the memory is required; everything else is optional.

Request

curl -X POST https://www.mnueron.com/api/memories \
  -H "Authorization: Bearer $MNUERON_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "Prefers 2-space indentation in JavaScript",
    "namespace": "preferences",
    "tags": ["style", "js"],
    "source": "claude-desktop",
    "metadata": { "captured_at": 1737070000000 }
  }'

Body

FieldTypeRequiredNotes
contentstringyesUp to 256 KB
namespacestringnoDefault "default"; auto-created
tagsstring[]noFree-form
sourcestringnoDefault "agent"
source_refstringnoCaller-supplied id (e.g. a chat conversation id) for joining
metadataobjectnoJSON. Special keys: extract_facts, extract_entities, summarize, byok_anthropic_key, byok_openai_key

Special metadata flags

  • metadata.extract_entities: true — force entity extraction even on short content (bypasses the 200-char floor).
  • metadata.extract_facts: true — kick off fact extraction in the background (paid plan / BYOK).
  • metadata.summarize: true — generate an LLM synopsis (paid plan / BYOK).
  • metadata.byok_anthropic_key / metadata.byok_openai_key — use the caller's own LLM key for this save instead of Mnueron's. Stripped from persisted metadata — the key is used for this call only and never stored.

Response

201 Created

{
  "id": "01HQB9R3MV…",
  "content": "Prefers 2-space indentation in JavaScript",
  "namespace": "preferences",
  "tags": ["style", "js"],
  "source": "claude-desktop",
  "source_ref": null,
  "metadata": { "captured_at": 1737070000000 },
  "created_at": 1737070000000,
  "updated_at": 1737070000000
}

Errors

StatuserrorNotes
400invalid json / content required
402memory_quota_exceededFree tier capped at 500 memories. Body includes quota + upgrade_url.
402storage_quota_exceededFree tier capped at 50 MB.
413memory_too_largecontent exceeded 256 KB. Body includes max_bytes, received_bytes.
429rate-limited60 writes/min per token

Side effects

  • Secrets are server-side redacted before insert (13 regex patterns + Bearer/Basic-auth heuristics). When something is redacted, metadata.redacted_count and metadata.redacted_kinds are stamped on the row.
  • The memory.saved webhook fires for any endpoint subscribed to that event (see Webhooks).
  • On paid plans (or with BYOK), entity extraction + auto-synopsis + fact extraction run in the background.
Last updated 2026-05-24edit