SmartMemory
PATCH
/memory/{item_id}

Update a memory item (partial merge).

Canonical update path (CORE-CRUD-UPDATE-1): always routes through SecureSmartMemory.update_properties(item_id, properties, write_mode).

  • content/metadata are conveniences folded into the properties dict.
  • properties + write_mode expose the raw node-property update API.
  • When both are provided, properties takes precedence and conveniences are ignored (contract: keeps the two paths cleanly separated).
  • A status (in properties or metadata) outside the lifecycle vocabulary is refused with 422 error_code=status_not_lifecycle and nothing is written (CORE-2.0-CALLER-STATUS-LIFECYCLE-1). A lifecycle value (archived, retracted, retired, ...) stays writable here: it is in the vocabulary, so the row's owner can still repair it. An empty property key is 422 empty_property_key.

Authorization

AuthorizationBearer <token>

Send Authorization: Bearer <token>. The token is either a Clerk session JWT or a SmartMemory API key (prefix sm_live_, sm_test_, or legacy sk_).

In: header

Path Parameters

item_id*Item Id

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Request to update an existing memory item.

See CORE-CRUD-UPDATE-1 contract for full semantics. content and metadata are conveniences folded into properties. properties + write_mode give direct access to the canonical SmartMemory.update_properties surface.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/memory/string" \  -H "Content-Type: application/json" \  -d '{}'
null
{
  "detail": {
    "code": "invalid_scoped_validity",
    "message": "string",
    "retryable": false
  }
}
{
  "detail": {
    "code": "invalid_scoped_validity",
    "message": "string",
    "retryable": false
  }
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}
{
  "detail": {
    "code": "invalid_scoped_validity",
    "message": "string",
    "retryable": false
  }
}