curl --request POST \
--url https://api.memcontext.in/api/memories \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"content": "<string>"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({content: '<string>'})
};
fetch('https://api.memcontext.in/api/memories', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.memcontext.in/api/memories"
payload = { "content": "<string>" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"status": "saved",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"jobId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"superseded": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"existingId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"message": "<string>",
"reservedSlots": 1
}{
"status": "saved",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"jobId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"superseded": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"existingId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"message": "<string>",
"reservedSlots": 1
}{
"error": "<string>",
"code": "<string>",
"requestId": "<string>",
"errorId": "<string>"
}Save a memory
Save a durable preference, fact, decision, or piece of context. If similar content already exists, MemContext may update, extend, or deduplicate it instead of creating a separate memory.
curl --request POST \
--url https://api.memcontext.in/api/memories \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"content": "<string>"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({content: '<string>'})
};
fetch('https://api.memcontext.in/api/memories', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.memcontext.in/api/memories"
payload = { "content": "<string>" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"status": "saved",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"jobId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"superseded": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"existingId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"message": "<string>",
"reservedSlots": 1
}{
"status": "saved",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"jobId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"superseded": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"existingId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"message": "<string>",
"reservedSlots": 1
}{
"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.
Body
The memory content. Write as a clear, complete, searchable statement.
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").
preference, fact, decision, context Hard isolation boundary for the memory container. Use a stable user or tenant ID from your app.
200Grouping filter inside the selected scope. Format: lowercase, no spaces (e.g. memcontext).
100Where the memory originated.
mcp- Saved via MCP tool.web- Saved from the dashboard.api- Saved via REST API (default).openclaw- Saved via OpenClaw integration.
mcp, web, api, openclaw ISO 8601 datetime when this memory expires. Omit for permanent memories.
Response
Memory saved, updated, extended, or deduplicated.
saved- New memory created.updated- New memory superseded an existing one.extended- New memory extends an existing one (relation created).duplicate- Content already exists; no new memory created.accepted- Large content was accepted for asynchronous extraction into atomic memories.
saved, updated, extended, duplicate, accepted ID of the saved or matched memory for synchronous results.
Job/source ID for tracking accepted long-content extraction.
ID of the memory that was superseded (when status is updated).
ID of the existing duplicate (when status is duplicate).
Optional human-readable acknowledgement for asynchronous extraction.
Number of memory slots reserved while a long-content job is pending.
x >= 0