Update a memory
curl --request PATCH \
--url https://api.memcontext.in/api/memories/{id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"content": "<string>",
"project": "<string>"
}
'const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({content: '<string>', project: '<string>'})
};
fetch('https://api.memcontext.in/api/memories/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.memcontext.in/api/memories/{id}"
payload = {
"content": "<string>",
"project": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"success": true,
"memory": {
"id": "<string>",
"content": "<string>",
"category": "<string>",
"scope": "<string>",
"project": "<string>"
},
"superseded": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"relatedTo": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"error": "<string>"
}{
"error": "<string>",
"code": "<string>",
"requestId": "<string>",
"errorId": "<string>"
}Memories
Update a memory
Update a memory’s content, category, or project. If only metadata changes, a simple update is performed. If content changes, the system re-runs the classification flow against similar memories and may supersede or relate to them.
PATCH
https://api.memcontext.in
/
api
/
memories
/
{id}
Update a memory
curl --request PATCH \
--url https://api.memcontext.in/api/memories/{id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"content": "<string>",
"project": "<string>"
}
'const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({content: '<string>', project: '<string>'})
};
fetch('https://api.memcontext.in/api/memories/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.memcontext.in/api/memories/{id}"
payload = {
"content": "<string>",
"project": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"success": true,
"memory": {
"id": "<string>",
"content": "<string>",
"category": "<string>",
"scope": "<string>",
"project": "<string>"
},
"superseded": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"relatedTo": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"error": "<string>"
}{
"error": "<string>",
"code": "<string>",
"requestId": "<string>",
"errorId": "<string>"
}Authorizations
API key created from the MemContext dashboard. Keys are prefixed with mc_, bound to one workspace, and API-key requests cannot override that workspace.
Path Parameters
Memory UUID.
Query Parameters
Hard isolation boundary. When provided, the memory must belong to this scope.
Maximum string length:
200Body
application/json
New content. If changed, triggers re-classification against similar memories.
Maximum string length:
10000preference- User likes or dislikes (e.g. "prefers dark mode").fact- Objective information (e.g. "uses macOS").decision- Choices made (e.g. "chose the new billing provider").context- Background information (e.g. "working on e-commerce app").
Available options:
preference, fact, decision, context Maximum string length:
100Response
Update result.
ID of superseded memory (when content update triggers supersession).
ID of related memory (when content update creates an extend/similar relation).
Error message when success is false.
