Skip to content

API Reference

The Mako API is a RESTful API built with Hono. All endpoints are prefixed with /api.

Two authentication methods:

  1. Session cookies — For the web app (set automatically on login)
  2. API keys — For programmatic access (prefix: revops_)
Terminal window
# API key authentication
Authorization: Bearer revops_YOUR_API_KEY
MethodEndpointDescription
POST/api/auth/registerCreate account (email/password)
POST/api/auth/loginLogin, returns session cookie
GET/api/auth/meGet current user session
POST/api/auth/logoutEnd session
GET/api/auth/googleGoogle OAuth redirect
GET/api/auth/githubGitHub OAuth redirect
MethodEndpointDescription
GET/api/workspacesList user’s workspaces
POST/api/workspacesCreate a workspace
GET/api/workspaces/:idGet workspace details
MethodEndpointDescription
GET/api/workspaces/:wid/connectorsList connections
POST/api/workspaces/:wid/connectorsAdd a connection
POST/api/workspaces/:wid/connectors/:id/testTest a connection
DELETE/api/workspaces/:wid/connectors/:idRemove a connection
MethodEndpointDescription
POST/api/executeExecute a SQL or MongoDB query
MethodEndpointDescription
GET/api/workspaces/:wid/consoles/listList all consoles
GET/api/workspaces/:wid/consoles/:id/detailsGet console details + code
POST/api/workspaces/:wid/consoles/:id/executeExecute a saved console

See Console for full API documentation with examples.

MethodEndpointDescription
POST/api/workspaces/:wid/flowsCreate/trigger a flow
GET/api/workspaces/:wid/flows/:idGet flow status

The Chat API enables programmatic access to Mako’s AI agent with streaming responses.

MethodEndpointDescription
POST/api/agent/chatSend messages, receive streaming AI response
GET/api/agent/modelsList available AI models
Terminal window
curl -X POST https://app.mako.ai/api/agent/chat \
-H "Authorization: Bearer revops_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"messages": [{"role": "user", "content": "Show me top 10 customers by revenue"}],
"chatId": "optional-session-id",
"workspaceId": "your-workspace-id",
"model": "claude-sonnet-4-20250514"
}'

The response is a Server-Sent Events (SSE) stream:

Event TypeDescription
startStream started, contains messageId
text-deltaIncremental text chunk from assistant
tool-input-availableTool call with full input (e.g., SQL query)
tool-resultTool execution result (e.g., query results)
finishStream complete, contains finishReason
StatusDescription
400Missing or invalid messages, chatId, or workspaceId
401Unauthorized (missing or invalid API key)
403API key not authorized for the workspace
404Agent not found (invalid agentId)
MethodEndpointDescription
GET/api/workspaces/:wid/chatsList chat sessions
POST/api/workspaces/:wid/chatsCreate a new chat
GET/api/workspaces/:wid/chats/:idGet chat details
PUT/api/workspaces/:wid/chats/:idUpdate chat title
DELETE/api/workspaces/:wid/chats/:idDelete a chat
MethodEndpointDescription
GET/api/workspaces/:wid/dashboardsList dashboards
POST/api/workspaces/:wid/dashboardsCreate a dashboard
GET/api/workspaces/:wid/dashboards/:didGet dashboard details
PUT/api/workspaces/:wid/dashboards/:didUpdate dashboard
DELETE/api/workspaces/:wid/dashboards/:didDelete dashboard
POST/api/workspaces/:wid/dashboards/:did/duplicateDuplicate a dashboard
MethodEndpointDescription
GET/api/workspaces/:wid/dashboard-foldersList dashboard folders
POST/api/workspaces/:wid/dashboard-foldersCreate a folder
PUT/api/workspaces/:wid/dashboard-folders/:fidUpdate a folder
DELETE/api/workspaces/:wid/dashboard-folders/:fidDelete a folder
MethodEndpointDescription
GET/api/workspaces/:wid/dashboards/:did/materialization/statusGet materialization status for all data sources
POST/api/workspaces/:wid/dashboards/:did/materialization/triggerTrigger materialization for a data source
POST/api/workspaces/:wid/dashboards/:did/materialization/trigger-allTrigger materialization for all data sources
GET/api/workspaces/:wid/dashboards/:did/materialization/stream/:dataSourceIdStream Parquet artifact (supports range requests)
MethodEndpointDescription
POST/api/inngestInngest webhook handler (internal)