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
}
'import requests
url = "https://api.memoclaw.com/v1/memories/{id}"
payload = {
"content": "<string>",
"metadata": { "metadata.tags": ["<string>"] },
"importance": 123,
"memory_type": "<string>",
"namespace": "<string>",
"pinned": True,
"expires_at": {},
"immutable": True
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
content: '<string>',
metadata: {'metadata.tags': ['<string>']},
importance: 123,
memory_type: '<string>',
namespace: '<string>',
pinned: true,
expires_at: {},
immutable: true
})
};
fetch('https://api.memoclaw.com/v1/memories/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.memoclaw.com/v1/memories/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'content' => '<string>',
'metadata' => [
'metadata.tags' => [
'<string>'
]
],
'importance' => 123,
'memory_type' => '<string>',
'namespace' => '<string>',
'pinned' => true,
'expires_at' => [
],
'immutable' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.memoclaw.com/v1/memories/{id}"
payload := strings.NewReader("{\n \"content\": \"<string>\",\n \"metadata\": {\n \"metadata.tags\": [\n \"<string>\"\n ]\n },\n \"importance\": 123,\n \"memory_type\": \"<string>\",\n \"namespace\": \"<string>\",\n \"pinned\": true,\n \"expires_at\": {},\n \"immutable\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.memoclaw.com/v1/memories/{id}")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"<string>\",\n \"metadata\": {\n \"metadata.tags\": [\n \"<string>\"\n ]\n },\n \"importance\": 123,\n \"memory_type\": \"<string>\",\n \"namespace\": \"<string>\",\n \"pinned\": true,\n \"expires_at\": {},\n \"immutable\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.memoclaw.com/v1/memories/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"content\": \"<string>\",\n \"metadata\": {\n \"metadata.tags\": [\n \"<string>\"\n ]\n },\n \"importance\": 123,\n \"memory_type\": \"<string>\",\n \"namespace\": \"<string>\",\n \"pinned\": true,\n \"expires_at\": {},\n \"immutable\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"content": "<string>",
"metadata": {},
"importance": 123,
"memory_type": "<string>",
"namespace": "<string>",
"expires_at": {},
"updated_at": "<string>"
}API Reference
Update Memory
PATCH /v1/memories/:id — Update a memory in-place.
PATCH
/
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
}
'import requests
url = "https://api.memoclaw.com/v1/memories/{id}"
payload = {
"content": "<string>",
"metadata": { "metadata.tags": ["<string>"] },
"importance": 123,
"memory_type": "<string>",
"namespace": "<string>",
"pinned": True,
"expires_at": {},
"immutable": True
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
content: '<string>',
metadata: {'metadata.tags': ['<string>']},
importance: 123,
memory_type: '<string>',
namespace: '<string>',
pinned: true,
expires_at: {},
immutable: true
})
};
fetch('https://api.memoclaw.com/v1/memories/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.memoclaw.com/v1/memories/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'content' => '<string>',
'metadata' => [
'metadata.tags' => [
'<string>'
]
],
'importance' => 123,
'memory_type' => '<string>',
'namespace' => '<string>',
'pinned' => true,
'expires_at' => [
],
'immutable' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.memoclaw.com/v1/memories/{id}"
payload := strings.NewReader("{\n \"content\": \"<string>\",\n \"metadata\": {\n \"metadata.tags\": [\n \"<string>\"\n ]\n },\n \"importance\": 123,\n \"memory_type\": \"<string>\",\n \"namespace\": \"<string>\",\n \"pinned\": true,\n \"expires_at\": {},\n \"immutable\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.memoclaw.com/v1/memories/{id}")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"<string>\",\n \"metadata\": {\n \"metadata.tags\": [\n \"<string>\"\n ]\n },\n \"importance\": 123,\n \"memory_type\": \"<string>\",\n \"namespace\": \"<string>\",\n \"pinned\": true,\n \"expires_at\": {},\n \"immutable\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.memoclaw.com/v1/memories/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"content\": \"<string>\",\n \"metadata\": {\n \"metadata.tags\": [\n \"<string>\"\n ]\n },\n \"importance\": 123,\n \"memory_type\": \"<string>\",\n \"namespace\": \"<string>\",\n \"pinned\": true,\n \"expires_at\": {},\n \"immutable\": true\n}"
response = http.request(request)
puts response.read_body{
"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
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.string
New memory text. Max 8,192 characters. Triggers re-embedding.
object
Replace metadata entirely. Max 4 KB, 20 keys, 3 levels deep.
Show Nested fields
Show Nested fields
string[]
Tags for filtering. Max 10 tags, 64 characters each.
number
Float between 0 and 1.
string
One of:
correction, preference, decision, project, observation, general.string
Move memory to a different namespace. Max 255 characters.
boolean
Pin or unpin a memory. Pinned memories are exempt from type-based decay.
string | null
ISO 8601 date string to set a TTL, or
null to clear expiration. Must be in the future.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.string
UUID of the memory.
string
Memory content.
object
Memory metadata.
number
Importance score.
string
Memory type.
string
Memory namespace.
string | null
Expiration date or
null.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
| Status | Description |
|---|---|
| 404 | Memory not found (or deleted, or belongs to another wallet). |
| 409 | Memory is immutable and cannot be modified. |
| 422 | Invalid 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"
}'
const response = await fetch(
"https://api.memoclaw.com/v1/memories/550e8400-e29b-41d4-a716-446655440000",
{
method: "PATCH",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
content: "User prefers 2-space indentation (not tabs)",
importance: 0.95,
expires_at: "2026-06-01T00:00:00Z",
}),
}
);
const data = await response.json();
from memoclaw import MemoClaw
client = MemoClaw()
result = client.update(
"550e8400-e29b-41d4-a716-446655440000",
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
}