Full API documentation for MindMatrix. All endpoints require authentication unless marked otherwise.
MindMatrix uses Better Auth for authentication. All API routes (except auth routes) require a valid session.
| Method | Path | Description |
|---|---|---|
POST | /api/auth/sign-in/email | Sign in with email and password |
POST | /api/auth/sign-up/email | Register a new account |
POST | /api/auth/sign-out | Sign out |
GET | /api/auth/get-session | Get current session |
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"}'| Method | Path | Description |
|---|---|---|
GET | /api/workspaces | List all workspaces for current user |
POST | /api/workspaces | Create a new workspace |
GET | /api/workspaces/:id | Get workspace details |
PATCH | /api/workspaces/:id | Update workspace (owner only) |
DELETE | /api/workspaces/:id | Delete workspace (owner only) |
GET | /api/workspaces/:id/members | List workspace members |
POST | /api/workspaces/:id/members | Add member by email |
GET | /api/workspaces/:id/webhooks | List workspace webhooks |
POST | /api/workspaces/:id/webhooks | Create a workspace webhook |
PATCH | /api/workspaces/:id/webhooks/:webhookId | Update a workspace webhook |
DELETE | /api/workspaces/:id/webhooks/:webhookId | Delete a workspace webhook |
# 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"}'| Method | Path | Description |
|---|---|---|
GET | /api/notes?workspaceId=&folderId=&tagId=&q= | List notes with filters |
POST | /api/notes | Create a note |
GET | /api/notes/:id | Get note with full content (bypasses auth if note is publicly shared) |
PATCH | /api/notes/:id | Update note (title, content, isPublic, folderId, tagIds) |
DELETE | /api/notes/:id | Delete note |
POST | /api/notes/upload | Upload note attachment (configurable file types/size via admin) |
# 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"}'| Method | Path | Description |
|---|---|---|
GET | /api/folders?workspaceId=&parentId= | List folders |
POST | /api/folders | Create folder |
PATCH | /api/folders/:id | Update folder |
DELETE | /api/folders/:id | Delete folder |
GET | /api/tags?workspaceId= | List tags |
POST | /api/tags | Create tag |
PATCH | /api/tags/:id | Update tag |
DELETE | /api/tags/:id | Delete tag |
Super Admin endpoints are restricted to users with the super_admin role. The first registered user is automatically promoted.
| Method | Path | Description |
|---|---|---|
GET | /api/admin/stats | Dashboard statistics (users, workspaces, notes, etc.) |
GET | /api/admin/workspaces | List all workspaces with owners and note counts |
DELETE | /api/admin/workspaces/:id | Force-delete any workspace |
GET | /api/admin/users | List all users with roles and verification status |
PATCH | /api/admin/users/:id | Promote or demote user role |
GET | /api/admin/audit-logs | Paginated, searchable audit trail |
GET | /api/admin/settings | Get system config (uploads, SMTP, landing page) |
PATCH | /api/admin/settings | Update system config key/value pairs |
POST | /api/admin/settings/email-test | Send test email to verify SMTP setup |
| Method | Path | Description |
|---|---|---|
GET | /api/profile | Get current user profile |
PATCH | /api/profile | Update name, email, timezone, time format, date format |
POST | /api/profile/avatar | Upload avatar (JPEG/PNG/WebP, max 2MB) |
DELETE | /api/profile/avatar | Remove avatar |
| Method | Path | Description |
|---|---|---|
GET | /api/notes/:id/links | Get incoming and outgoing backlinks |
GET | /api/notes/:id/versions | List version history |
GET | /api/notes/:id/versions/:versionId | Get specific version content |
POST | /api/notes/:id/versions | Restore a previous version |
| Method | Path | Description |
|---|---|---|
GET | /api/notes/:id/events | SSE stream for real-time updates |
GET | /api/notes/:id/presence | List current viewers |
POST | /api/notes/:id/presence | Heartbeat (set viewer presence) |
POST | /api/notes/:id/delta | Y.js CRDT co-authoring delta update |
# 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/eventsPersistent notification system with unread tracking and SSE real-time delivery.
| Method | Path | Description |
|---|---|---|
GET | /api/notifications?limit=&page= | List notifications (paginated, includes unread count) |
PATCH | /api/notifications | Mark all notifications as read |
PATCH | /api/notifications/:id | Mark a single notification as read |
GET | /api/notifications/events | SSE stream for real-time notification delivery |
| Method | Path | Description |
|---|---|---|
GET | /api/plugins/config?workspaceId= | List plugin states for workspace |
POST | /api/plugins/config | Enable/disable plugin or save config |
POST | /api/plugins/opencode-ai/chat | Chat with notes via AI |
POST | /api/plugins/proxmox-inventory/scan | Scan Proxmox VE inventory |
POST | /api/plugins/unifi-topology/scan | Scan Unifi network topology |
POST | /api/plugins/git-sync/pull | Pull notes from remote Git branch |
POST | /api/plugins/git-sync/push | Commit and push notes to remote Git branch |
| Method | Path | Description |
|---|---|---|
GET | /api/templates?workspaceId= | List note templates |
POST | /api/templates | Create template |
PATCH | /api/templates/:id | Update template |
DELETE | /api/templates/:id | Delete template |
| Method | Path | Description |
|---|---|---|
GET | /api/search?q=&workspaceId= | Search notes |
GET | /api/export?workspaceId=&format=markdown | Export workspace notes as markdown |
GET | /api/export?workspaceId=&format=pdf | Export workspace notes as print-friendly HTML page |
POST | /api/import | Import markdown notes |
GET/POST | /api/sync/pcloud | pCloud sync management |
GET/POST | /api/sync/google-drive | Google Drive sync management |