Back to Dashboard

API Reference

Full API documentation for MindMatrix. All endpoints require authentication unless marked otherwise.

Active Integration Examples:

Authentication

MindMatrix uses Better Auth for authentication. All API routes (except auth routes) require a valid session.

Endpoints

MethodPathDescription
POST/api/auth/sign-in/emailSign in with email and password
POST/api/auth/sign-up/emailRegister a new account
POST/api/auth/sign-outSign out
GET/api/auth/get-sessionGet current session
Show Integration Example (cURL)
curl -X POST https://mindmatrix.johansen.foo/api/auth/sign-in/email \
  -H "Content-Type: application/json" \
  -d '{"email": "user@example.com", "password": "your_password"}'

Workspaces

MethodPathDescription
GET/api/workspacesList all workspaces for current user
POST/api/workspacesCreate a new workspace
GET/api/workspaces/:idGet workspace details
PATCH/api/workspaces/:idUpdate workspace (owner only)
DELETE/api/workspaces/:idDelete workspace (owner only)
GET/api/workspaces/:id/membersList workspace members
POST/api/workspaces/:id/membersAdd member by email
GET/api/workspaces/:id/webhooksList workspace webhooks
POST/api/workspaces/:id/webhooksCreate a workspace webhook
PATCH/api/workspaces/:id/webhooks/:webhookIdUpdate a workspace webhook
DELETE/api/workspaces/:id/webhooks/:webhookIdDelete a workspace webhook
Show Integration Example (cURL)
# List workspaces
curl -H "Authorization: Bearer your_api_token_here" \
  https://mindmatrix.johansen.foo/api/workspaces

# Create a workspace
curl -X POST https://mindmatrix.johansen.foo/api/workspaces \
  -H "Authorization: Bearer your_api_token_here" \
  -H "Content-Type: application/json" \
  -d '{"name": "New Team", "description": "Collaborative hub", "icon": "Users"}'

Notes

MethodPathDescription
GET/api/notes?workspaceId=&folderId=&tagId=&q=List notes with filters
POST/api/notesCreate a note
GET/api/notes/:idGet note with full content (bypasses auth if note is publicly shared)
PATCH/api/notes/:idUpdate note (title, content, isPublic, folderId, tagIds)
DELETE/api/notes/:idDelete note
POST/api/notes/uploadUpload note attachment (configurable file types/size via admin)
Show Integration Example (cURL)
# List notes in workspace
curl -H "Authorization: Bearer your_api_token_here" \
  "https://mindmatrix.johansen.foo/api/notes?workspaceId=your_workspace_uuid"

# Create a note
curl -X POST https://mindmatrix.johansen.foo/api/notes \
  -H "Authorization: Bearer your_api_token_here" \
  -H "Content-Type: application/json" \
  -d '{"title": "Note Title", "content": "# My Content", "workspaceId": "your_workspace_uuid"}'

Folders & Tags

MethodPathDescription
GET/api/folders?workspaceId=&parentId=List folders
POST/api/foldersCreate folder
PATCH/api/folders/:idUpdate folder
DELETE/api/folders/:idDelete folder
GET/api/tags?workspaceId=List tags
POST/api/tagsCreate tag
PATCH/api/tags/:idUpdate tag
DELETE/api/tags/:idDelete tag

Super Admin

Super Admin endpoints are restricted to users with the super_admin role. The first registered user is automatically promoted.

MethodPathDescription
GET/api/admin/statsDashboard statistics (users, workspaces, notes, etc.)
GET/api/admin/workspacesList all workspaces with owners and note counts
DELETE/api/admin/workspaces/:idForce-delete any workspace
GET/api/admin/usersList all users with roles and verification status
PATCH/api/admin/users/:idPromote or demote user role
GET/api/admin/audit-logsPaginated, searchable audit trail
GET/api/admin/settingsGet system config (uploads, SMTP, landing page)
PATCH/api/admin/settingsUpdate system config key/value pairs
POST/api/admin/settings/email-testSend test email to verify SMTP setup

Profile

MethodPathDescription
GET/api/profileGet current user profile
PATCH/api/profileUpdate name, email, timezone, time format, date format
POST/api/profile/avatarUpload avatar (JPEG/PNG/WebP, max 2MB)
DELETE/api/profile/avatarRemove avatar

Backlinks & Versions

MethodPathDescription
GET/api/notes/:id/linksGet incoming and outgoing backlinks
GET/api/notes/:id/versionsList version history
GET/api/notes/:id/versions/:versionIdGet specific version content
POST/api/notes/:id/versionsRestore a previous version

Realtime

MethodPathDescription
GET/api/notes/:id/eventsSSE stream for real-time updates
GET/api/notes/:id/presenceList current viewers
POST/api/notes/:id/presenceHeartbeat (set viewer presence)
POST/api/notes/:id/deltaY.js CRDT co-authoring delta update
Show Integration Example (cURL)
# Listen to Note Realtime Collaboration Stream
curl -H "Authorization: Bearer your_api_token_here" \
  -H "Accept: text/event-stream" \
  https://mindmatrix.johansen.foo/api/notes/your_note_uuid/events

Notifications

Persistent notification system with unread tracking and SSE real-time delivery.

MethodPathDescription
GET/api/notifications?limit=&page=List notifications (paginated, includes unread count)
PATCH/api/notificationsMark all notifications as read
PATCH/api/notifications/:idMark a single notification as read
GET/api/notifications/eventsSSE stream for real-time notification delivery

Plugins

MethodPathDescription
GET/api/plugins/config?workspaceId=List plugin states for workspace
POST/api/plugins/configEnable/disable plugin or save config
POST/api/plugins/opencode-ai/chatChat with notes via AI
POST/api/plugins/proxmox-inventory/scanScan Proxmox VE inventory
POST/api/plugins/unifi-topology/scanScan Unifi network topology
POST/api/plugins/git-sync/pullPull notes from remote Git branch
POST/api/plugins/git-sync/pushCommit and push notes to remote Git branch

Templates

MethodPathDescription
GET/api/templates?workspaceId=List note templates
POST/api/templatesCreate template
PATCH/api/templates/:idUpdate template
DELETE/api/templates/:idDelete template

Additional Endpoints

MethodPathDescription
GET/api/search?q=&workspaceId=Search notes
GET/api/export?workspaceId=&format=markdownExport workspace notes as markdown
GET/api/export?workspaceId=&format=pdfExport workspace notes as print-friendly HTML page
POST/api/importImport markdown notes
GET/POST/api/sync/pcloudpCloud sync management
GET/POST/api/sync/google-driveGoogle Drive sync management