Skip to main content
POST
https://api.memcontext.in
/
api
/
memories
Save a 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>"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "status": "saved",
  "superseded": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "existingId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}

Authorizations

X-API-Key
string
header
required

API key created from the MemContext dashboard. Keys are prefixed with mc_.

Body

application/json
content
string
required

The memory content. Write as a clear, complete, searchable statement.

Maximum string length: 10000
category
enum<string>
  • preference - User likes or dislikes (e.g. "prefers dark mode").
  • fact - Objective information (e.g. "uses macOS").
  • decision - Choices made (e.g. "chose PostgreSQL for DB").
  • context - Background information (e.g. "working on e-commerce app").
Available options:
preference,
fact,
decision,
context
project
string

Project scope. Format: lowercase, no spaces (e.g. memcontext).

Maximum string length: 100
source
enum<string>

Where the memory originated.

  • mcp - Saved via MCP tool.
  • web - Saved from the dashboard.
  • api - Saved via REST API (default).
  • openclaw - Saved via OpenClaw integration.
Available options:
mcp,
web,
api,
openclaw
validUntil
string<date-time>

ISO 8601 datetime when this memory expires. Omit for permanent memories.

Response

Memory saved, updated, extended, or deduplicated.

id
string<uuid>
required

ID of the saved or matched memory.

status
enum<string>
required
  • 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.
Available options:
saved,
updated,
extended,
duplicate
superseded
string<uuid>

ID of the memory that was superseded (when status is updated or extended).

existingId
string<uuid>

ID of the existing duplicate (when status is duplicate).