{"service":"Synapse Memory API","version":"1.7.1","base_url":"https://synapse.schaefer.zone","auth_method":"Authorization: Bearer YOUR_MIND_KEY OR ?key=YOUR_MIND_KEY","warning":"ONLY the endpoints listed below exist. All other paths return 404. Do NOT guess or invent paths.","endpoints":{"public":[{"method":"GET","path":"/","description":"Landing page (READ THIS FIRST)"},{"method":"GET","path":"/status","description":"Redirects 307 to /health (conventional alias)"},{"method":"GET","path":"/endpoints","description":"This list (machine-readable)"},{"method":"GET","path":"/help","description":"Full API documentation"},{"method":"GET","path":"/help?format=json","description":"API docs as JSON"},{"method":"GET","path":"/help?format=text","description":"API docs as plain text"},{"method":"GET","path":"/health","description":"Liveness check"},{"method":"GET","path":"/stats","description":"Public aggregate statistics (total memories, minds, users)"},{"method":"GET","path":"/openapi.json","description":"OpenAPI 3.0 specification"},{"method":"GET","path":"/robots.txt","description":"Crawler directives (allows /docs/)"},{"method":"GET","path":"/sitemap.xml","description":"XML sitemap (all doc articles)"},{"method":"GET","path":"/playground","description":"Interactive API playground (try every endpoint in-browser)"},{"method":"GET","path":"/support","description":"Support / contact form"},{"method":"GET","path":"/docs","description":"Documentation index (HTML for browsers)"},{"method":"GET","path":"/docs?format=json","description":"Documentation index as JSON (for LLMs)"},{"method":"GET","path":"/docs?format=text&scope=all","description":"ALL articles as one text block (for LLM context)"},{"method":"GET","path":"/docs/search?q=QUERY","description":"Search articles (?format=json for JSON)"},{"method":"GET","path":"/docs/:category","description":"Category page (HTML or ?format=json)"},{"method":"GET","path":"/docs/:category/:slug","description":"Article (HTML, ?format=text, ?format=json, ?format=llm)"},{"method":"POST","path":"/register","description":"Register user"},{"method":"POST","path":"/login","description":"Login"}],"memory":[{"method":"GET","path":"/memory","description":"List memories (filter: ?category=, ?tag=, ?limit=, ?offset=)"},{"method":"GET","path":"/memory/recall","description":"Get ALL memories as LLM prompt text (DO THIS FIRST)"},{"method":"GET","path":"/memory/recall/:mind_key","description":"Same as /memory/recall but Mind Key in URL path (for open-tool LLMs that can only open URLs)"},{"method":"GET","path":"/memory/search","description":"Search memories (?q=search+term)"},{"method":"GET","path":"/memory/stats","description":"Memory statistics (incl. verified/unverified counts)"},{"method":"GET","path":"/memory/:id/related","description":"Related memories by tags"},{"method":"GET","path":"/memory/by-tag","description":"Filter memories by tag (?tag=tagname)"},{"method":"GET","path":"/memory/diff","description":"Incremental sync (?since=epoch_seconds)"},{"method":"GET","path":"/memory/bulk-delete","description":"Bulk delete (?tag= or ?category= or ?older_than=)"},{"method":"GET","path":"/memory/audit","description":"Audit log (Mind Key or JWT + ?mind_id=, ?action=, ?limit=)"},{"method":"GET","path":"/memory/health","description":"Memory Health Score (0-100: confidence + freshness)"},{"method":"GET","path":"/memory/expiring","description":"Memories with expiry dates (?days=7, 0=all)"},{"method":"GET","path":"/memory/semantic-search","description":"Semantic search by meaning (?q=text, uses nomic-embed-text embeddings)"},{"method":"POST","path":"/memory/embed-batch","description":"Backfill embeddings for existing memories ({limit: 100})"},{"method":"GET","path":"/memory/embed-batch","description":"Backfill embeddings via GET (?limit=100)"},{"method":"GET","path":"/mind/export","description":"Full mind export as JSON or CSV (?format=json|csv, vendor-lock-in reduction)"},{"method":"POST","path":"/memory","description":"Store new memory (JSON body, supports source+confidence, Idempotency-Key header)"},{"method":"GET","path":"/memory/store","description":"Store memory via GET (?content=&category=&tags=&priority=&memory_key=&source=&confidence=)"},{"method":"POST","path":"/memory/sync","description":"Bulk sync (JSON body)"},{"method":"PUT","path":"/memory/:id","description":"Update memory (JSON body, supports source+confidence)"},{"method":"GET","path":"/memory/:id/update","description":"Update memory via GET (?content=&category=&priority=&tags=&source=&confidence=)"},{"method":"DELETE","path":"/memory/:id","description":"Delete memory"},{"method":"GET","path":"/memory/:id/delete","description":"Delete memory via GET"},{"method":"POST","path":"/memory/:id/attachments","description":"Upload file attachment(s) to a memory (multipart: files[], description?, tags?)"},{"method":"GET","path":"/memory/:id/attachments","description":"List attachments for a memory"},{"method":"GET","path":"/attachments/:id/download","description":"Download an attachment file"},{"method":"DELETE","path":"/attachments/:id","description":"Delete an attachment"},{"method":"PATCH","path":"/attachments/:id","description":"Update attachment metadata (description, tags)"},{"method":"GET","path":"/attachments","description":"List all attachments for the current user (?sort=date|size|name|type)"},{"method":"POST","path":"/memory/:id/links","description":"Create a memory-to-memory link (body: target_memory_id, link_type)"},{"method":"GET","path":"/memory/:id/links","description":"Get all links for a memory (outgoing + incoming)"},{"method":"DELETE","path":"/memory/links/:linkId","description":"Delete a memory link"},{"method":"GET","path":"/storage/info","description":"Get current user storage quota and usage"},{"method":"GET","path":"/storage/stats","description":"Global storage statistics (admin only)"},{"method":"POST","path":"/storage/quota/:userId","description":"Set storage quota for a user (admin only)"},{"method":"POST","path":"/storage/recalculate/:userId","description":"Recalculate storage usage (admin only)"},{"method":"GET","path":"/storage/admin/attachments","description":"List ALL attachments across all users (admin only)"}],"chat":[{"method":"GET","path":"/chat/poll","description":"Poll for human messages (?since=message_id, auto-marks read)"},{"method":"POST","path":"/chat/reply","description":"Reply to human (JSON body: {content})"},{"method":"GET","path":"/chat/reply","description":"Reply via GET (?content=reply+text)"},{"method":"POST","path":"/chat/reply-with-file","description":"Reply to human with file attachment (Mind Key, multipart: content + file)"},{"method":"GET","path":"/chat/history","description":"Chat history (Mind Key or JWT auth, ?limit=&since=&q=)"},{"method":"GET","path":"/chat/status","description":"Agent online status (Mind Key or JWT)"}],"chat_human":[{"method":"POST","path":"/chat/send","description":"Human sends message (JWT, JSON: {content, reply_to_id?})"},{"method":"GET","path":"/chat/unread","description":"Unread message count (JWT)"},{"method":"POST","path":"/chat/upload","description":"Upload file attachment (JWT, multipart: text + files, 50MB max per file)"},{"method":"GET","path":"/chat/file/:id","description":"Download a chat file attachment (JWT or Mind Key)"},{"method":"GET","path":"/chat/files/:messageId","description":"List files for a message (JWT)"},{"method":"GET","path":"/chat","description":"Chat web UI (JWT via cookie)"}],"push":[{"method":"GET","path":"/push/vapid-public-key","description":"VAPID public key for Web Push (no auth)"},{"method":"POST","path":"/push/subscribe","description":"Subscribe to push notifications (JWT, JSON: {endpoint, keys:{p256dh,auth}})"},{"method":"POST","path":"/push/unsubscribe","description":"Unsubscribe (JWT, JSON: {endpoint?})"},{"method":"POST","path":"/push/test","description":"Send test notification (JWT)"}],"import":[{"method":"POST","path":"/import","description":"Import chat as memories (Mind Key or JWT, JSON: {format: html|json|text|zai, content, dry_run?, mind_id?})"},{"method":"GET","path":"/import","description":"Import web UI (JWT via cookie, HTML page)"}],"user_minds":[{"method":"POST","path":"/minds","description":"Create a new Mind → returns mind_key (JWT, JSON: {name, description?})"},{"method":"GET","path":"/minds","description":"List all minds for user (JWT)"},{"method":"DELETE","path":"/minds/:id","description":"Delete a mind and all its memories (JWT)"},{"method":"POST","path":"/logout","description":"Logout (clears session cookie)"}],"tools_cron":[{"method":"POST","path":"/cron","description":"Create cron job (JSON body)"},{"method":"GET","path":"/cron","description":"List cron jobs"},{"method":"GET","path":"/cron/create","description":"Create cron via GET (?name=&schedule=&endpoint=)"},{"method":"DELETE","path":"/cron/:id","description":"Delete cron job"},{"method":"GET","path":"/cron/:id/delete","description":"Delete cron via GET"},{"method":"POST","path":"/cron/:id/toggle","description":"Enable/disable cron (JSON body)"},{"method":"GET","path":"/cron/:id/toggle","description":"Toggle cron via GET"}],"tools_var":[{"method":"POST","path":"/var","description":"Set variable (JSON body)"},{"method":"GET","path":"/var","description":"List all variables"},{"method":"GET","path":"/var/:key","description":"Get variable value"},{"method":"GET","path":"/var/set","description":"Set variable via GET (?var_key=&value=)"},{"method":"DELETE","path":"/var/:key","description":"Delete variable"},{"method":"GET","path":"/var/:key/delete","description":"Delete variable via GET"}],"tools_utility":[{"method":"GET","path":"/tools/time","description":"Server time + timezone (no auth)"},{"method":"GET","path":"/tools/calc","description":"Safe calculator (?expr=(10+5)*3, no auth)"},{"method":"GET","path":"/tools/random","description":"Random values (?type=uuid|int|float|hex|alpha, no auth)"}],"mind_tasks":[{"method":"GET","path":"/mind/tasks","description":"List all tasks (?status=pending|done)"},{"method":"GET","path":"/mind/task","description":"Create task via GET (?title=&description=&priority=)"},{"method":"POST","path":"/mind/task","description":"Create task via POST (JSON body)"},{"method":"PUT","path":"/mind/task/:id","description":"Update task (title/description/priority/status/due_at)"},{"method":"GET","path":"/mind/task/:id/complete","description":"Mark task as done"},{"method":"GET","path":"/mind/task/:id/delete","description":"Delete a task"}],"scripts":[{"method":"POST","path":"/script","description":"Store/update script {name, content, description?, language?} (Mind Key or JWT)"},{"method":"GET","path":"/script/:name","description":"Fetch script content as text/plain (curl | bash ready, Mind Key or JWT)"},{"method":"GET","path":"/script/:name/info","description":"Script metadata without content (Mind Key or JWT)"},{"method":"GET","path":"/scripts","description":"List all scripts (JSON, Mind Key or JWT)"},{"method":"DELETE","path":"/script/:name","description":"Delete a script (Mind Key or JWT)"}],"webhooks":[{"method":"POST","path":"/webhooks","description":"Register webhook {url, events, secret?} — get HTTP callbacks on memory/chat/task changes (Mind Key)"},{"method":"GET","path":"/webhooks","description":"List all webhooks for the current mind (Mind Key)"},{"method":"GET","path":"/webhooks/:id","description":"Get a single webhook (Mind Key)"},{"method":"PUT","path":"/webhooks/:id","description":"Update webhook {url?, events?, secret?, enabled?} (Mind Key)"},{"method":"DELETE","path":"/webhooks/:id","description":"Delete a webhook (Mind Key)"},{"method":"POST","path":"/webhooks/:id/test","description":"Send a test event to the webhook (Mind Key)"}],"memory_compact":[{"method":"POST","path":"/memory/compact","description":"Auto-summarize similar memories (clusters by tags, soft-deletes originals, creates summary). Body: {older_than?, category?, dry_run?, max_clusters?, min_cluster_size?} (Mind Key)"}],"memory_visualization":[{"method":"GET","path":"/memory/graph","description":"Graph data for visualization: nodes=memories, edges=shared tags. Params: ?max_nodes=200&category=&tag=&min_confidence=0&include_edges=true&min_shared_tags=1 (Mind Key)"},{"method":"GET","path":"/memory/tags","description":"All tags with frequency counts (Mind Key)"},{"method":"GET","path":"/memory/timeline","description":"Memories grouped by time period. Params: ?period=hour|day|week|month|year (Mind Key)"}],"mind_sharing":[{"method":"POST","path":"/minds/:id/share","description":"Share a mind with another user by email {user_email, acl=read|write|admin} (JWT)"},{"method":"GET","path":"/minds/:id/shares","description":"List all shares for a mind (JWT or shared user)"},{"method":"PUT","path":"/minds/:id/shares/:shareId","description":"Update share ACL {acl: read|write|admin} (JWT)"},{"method":"DELETE","path":"/minds/:id/shares/:shareId","description":"Revoke a share (JWT)"},{"method":"GET","path":"/minds/shared","description":"List all minds shared WITH the current user (JWT)"}],"computers_user":[{"method":"POST","path":"/computers/install-code/json","description":"JSON: generate install code (Mind Key or JWT)"},{"method":"GET","path":"/computers/list","description":"JSON: list your registered computers (Mind Key or JWT)"},{"method":"GET","path":"/computers/:id","description":"Get one computer (Mind Key or JWT)"},{"method":"DELETE","path":"/computers/:id","description":"Delete computer (revokes token, Mind Key or JWT)"},{"method":"GET","path":"/computers/:id/delete","description":"Delete computer via GET (Mind Key or JWT)"},{"method":"POST","path":"/computers/:id/disable","description":"Disable computer (revokes token but keeps record)"},{"method":"POST","path":"/computers/:id/commands","description":"Queue command {type, payload} (Mind Key or JWT)"},{"method":"GET","path":"/computers/:id/command","description":"Queue command via GET (?type=screenshot&x=100&y=200)"},{"method":"GET","path":"/computers/:id/commands","description":"List recent commands (?limit=50)"},{"method":"GET","path":"/computers/:id/commands/:cid","description":"Get command status + result"},{"method":"GET","path":"/computers/:id/screenshot","description":"One-shot: queue screenshot + wait for result (30s timeout)"}],"computers_agent":[{"method":"POST","path":"/computers/register","description":"Redeem install code → computer_token (agent-facing, no auth)"},{"method":"GET","path":"/computers/me/poll","description":"Long-poll for commands (?wait=30, Computer Token auth)"},{"method":"POST","path":"/computers/me/commands/:cid/result","description":"Post command result (Computer Token auth)"}]},"non_existent_paths":["These paths do NOT exist and will return 404:","/memory/list, /memory/create, /memory/update, /memory/delete, /memory/get","/agent/* (no agent endpoints exist)","/mind/status, /mind/info, /mind/config","/prompt/* (no prompt endpoints exist)","/config/* (no config endpoints exist)","/api/v1/*, /api/v2/*, /v1/*, /v2/* (no versioned API paths)","/synapse/* (no /synapse prefix)","/ping, /info (use /health instead — /status is a 307 redirect to /health)"],"documentation":{"base_url":"https://synapse.schaefer.zone/docs","index_html":"/docs","index_json":"/docs?format=json","index_text_all":"/docs?format=text&scope=all","search":"/docs/search?q=QUERY"}}