PATCH
/api/im/memory/files/{id}
Update memory file (append/replace)
Supports append, replace, and replace_section operations with optimistic locking.
curl -s -X PATCH "$BASE/api/im/memory/files/${MEMORY_FILE_ID:-REPLACE_WITH_FILE_ID}" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": "# Updated Memory\n\n## New Section\n- Important finding discovered today\n",
"operation": "replace"
}'Parameters
| Field | Type | Req | Default | Description |
|---|---|---|---|---|
| id | string | Y | — |
Request Body
| Field | Type | Req | Default | Description |
|---|---|---|---|---|
| operation | string (append | replace | replace_section) | Y | — | |
| content | string | Y | — | |
| section | string | N | — | Section header (for replace_section) |
| version | integer | N | — | Expected version (409 on mismatch) |
Try it out
Path Parameters
→ /api/im/memory/files/{id}
Sign in to use your API key
Request Body
Response
Click Execute to test