Skip to main content
PATCH
https://api.memoclaw.com
/
v1
/
memories
/
{id}
Update Memory
curl --request PATCH \
  --url https://api.memoclaw.com/v1/memories/{id} \
  --header 'Content-Type: application/json' \
  --data '
{
  "content": "<string>",
  "metadata": {
    "metadata.tags": [
      "<string>"
    ]
  },
  "importance": 123,
  "memory_type": "<string>",
  "namespace": "<string>",
  "pinned": true,
  "expires_at": {},
  "immutable": true
}
'
{
  "id": "<string>",
  "content": "<string>",
  "metadata": {},
  "importance": 123,
  "memory_type": "<string>",
  "namespace": "<string>",
  "expires_at": {},
  "updated_at": "<string>"
}
Price: $0.005 USDC Update one or more fields on an existing memory. If content is changed, the embedding and full-text search vector are regenerated automatically. All other fields (metadata, importance, etc.) are updated without re-embedding.

Path Parameters

id
string
required
UUID of the memory to update.

Request Body

At least one field must be provided. Only provided fields are updated — omitted fields are left unchanged.
content
string
New memory text. Max 8,192 characters. Triggers re-embedding.
metadata
object
Replace metadata entirely. Max 4 KB, 20 keys, 3 levels deep.
importance
number
Float between 0 and 1.
memory_type
string
One of: correction, preference, decision, project, observation, general.
namespace
string
Move memory to a different namespace. Max 255 characters.
pinned
boolean
Pin or unpin a memory. Pinned memories are exempt from type-based decay.
expires_at
string | null
ISO 8601 date string to set a TTL, or null to clear expiration. Must be in the future.
immutable
boolean
Set to true to lock the memory permanently. Once immutable, the memory cannot be updated or deleted. This is a one-way operation.
Immutable memories cannot be updated or deleted. Attempting either returns 409 Conflict. If you need to update a memory, do so before setting immutable: true.

Response (200)

Returns the full updated memory object.
id
string
UUID of the memory.
content
string
Memory content.
metadata
object
Memory metadata.
importance
number
Importance score.
memory_type
string
Memory type.
namespace
string
Memory namespace.
expires_at
string | null
Expiration date or null.
updated_at
string
Timestamp of this update.
Update does not run deduplication — you explicitly chose this memory ID, so the content is stored as-is. Relations, access history, and decay state are preserved.

Errors

StatusDescription
404Memory not found (or deleted, or belongs to another wallet).
409Memory is immutable and cannot be modified.
422Invalid UUID format, empty body, or field validation failed.

Example

curl -X PATCH https://api.memoclaw.com/v1/memories/550e8400-e29b-41d4-a716-446655440000 \
  -H "Content-Type: application/json" \
  -d '{
    "content": "User prefers 2-space indentation (not tabs)",
    "importance": 0.95,
    "expires_at": "2026-06-01T00:00:00Z"
  }'
Response
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "content": "User prefers 2-space indentation (not tabs)",
  "metadata": { "tags": ["preferences", "code-style"] },
  "importance": 0.95,
  "memory_type": "preference",
  "namespace": "default",
  "expires_at": "2026-06-01T00:00:00Z",
  "updated_at": "2026-02-11T15:30:00Z",
  "created_at": "2026-02-10T12:00:00Z",
  "access_count": 3
}