POST /api/context
Builds a prompt-ready pack. Accepts a session cookie or an MCP token, which is what the Claude Code SessionStart hook uses.
request
curl -X POST https://memo.uno/api/context \
-H "Content-Type: application/json" \
-H "Authorization: Bearer memo_..." \
-d '{"preset":"coding","repo":"acme/api","path":"lib","task":"refactor auth"}'presetNotes
chat (~1,200 chars), coding (~1,600), full (~2,800). Defaults to chat.repoNotes
Repository as
owner/name; includes its code memory.pathNotes
File or directory used for ranking.
taskNotes
Short description; matching memories move up.
response
{ "text": "# Memory for you · acme/api\n\n…", "sections": [ … ], "preset": "coding" }POST /api/import
Parses a ChatGPT or Claude export, or pasted text, and returns candidates without saving them. Requires a session.
request
curl -X POST https://memo.uno/api/import \
-H "Content-Type: application/json" \
--cookie "memo_session=<session>" \
-d '{"data":{"conversations":[…]}}'dataaccepts the parsed export;textaccepts plain text.- Only user messages are read; assistant output is discarded.
- Candidates carry a duplicate flag when they are close to existing memory.
- Nothing is written until you select candidates and save them from the dashboard.
POST /api/ingest
Accepts a git commit or a conversation payload and queues the extracted memories as pending. This is what the capture hooks call. It accepts a session or a bearer token.
commit payload
curl -X POST https://memo.uno/api/ingest \
-H "Content-Type: application/json" \
-H "Authorization: Bearer memo_..." \
-d '{
"source": "git-hook",
"repo": "acme/api",
"branch": "main",
"commit_sha": "…",
"message": "fix: retry embeddings on timeout",
"files": ["lib/server/embed.ts"],
"diff": "…"
}'conversation payload
{
"source": "claude-code",
"session_id": "…",
"repo": "acme/api",
"messages": ["I always deploy from main.", "Never force-push."]
}The response reports how many captures were created and what was extracted.
Inbox
GETPath
/api/inboxPurpose
List pending captures;
?count=1 returns just the totalPATCHPath
/api/inbox/:idPurpose
Approve or reject one capture, optionally editing it first
POSTPath
/api/inboxPurpose
Bulk decision:
{ "action": "approve" | "reject", "items": [ … ] }Approval is a write
Approving a capture runs it through the same resolver as a manual write, so an approved duplicate merges instead of creating a second row.