The Mako API is a RESTful API built with Hono. All endpoints are prefixed with /api.
Two authentication methods:
- Session cookies — For the web app (set automatically on login)
- API keys — For programmatic access (prefix:
revops_)
Authorization: Bearer revops_YOUR_API_KEY
| Method | Endpoint | Description |
|---|
POST | /api/auth/register | Create account (email/password) |
POST | /api/auth/login | Login, returns session cookie |
GET | /api/auth/me | Get current user session |
POST | /api/auth/logout | End session |
GET | /api/auth/google | Google OAuth redirect |
GET | /api/auth/github | GitHub OAuth redirect |
| Method | Endpoint | Description |
|---|
GET | /api/workspaces | List user’s workspaces |
POST | /api/workspaces | Create a workspace |
GET | /api/workspaces/:id | Get workspace details |
| Method | Endpoint | Description |
|---|
GET | /api/workspaces/:wid/connectors | List connections |
POST | /api/workspaces/:wid/connectors | Add a connection |
POST | /api/workspaces/:wid/connectors/:id/test | Test a connection |
DELETE | /api/workspaces/:wid/connectors/:id | Remove a connection |
| Method | Endpoint | Description |
|---|
POST | /api/execute | Execute a SQL or MongoDB query |
| Method | Endpoint | Description |
|---|
GET | /api/workspaces/:wid/consoles/list | List all consoles |
GET | /api/workspaces/:wid/consoles/:id/details | Get console details + code |
POST | /api/workspaces/:wid/consoles/:id/execute | Execute a saved console |
See Console for full API documentation with examples.
| Method | Endpoint | Description |
|---|
POST | /api/workspaces/:wid/flows | Create/trigger a flow |
GET | /api/workspaces/:wid/flows/:id | Get flow status |
The Chat API enables programmatic access to Mako’s AI agent with streaming responses.
| Method | Endpoint | Description |
|---|
POST | /api/agent/chat | Send messages, receive streaming AI response |
GET | /api/agent/models | List available AI models |
curl -X POST https://app.mako.ai/api/agent/chat \
-H "Authorization: Bearer revops_YOUR_API_KEY" \
-H "Content-Type: application/json" \
"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 Type | Description |
|---|
start | Stream started, contains messageId |
text-delta | Incremental text chunk from assistant |
tool-input-available | Tool call with full input (e.g., SQL query) |
tool-result | Tool execution result (e.g., query results) |
finish | Stream complete, contains finishReason |
| Status | Description |
|---|
| 400 | Missing or invalid messages, chatId, or workspaceId |
| 401 | Unauthorized (missing or invalid API key) |
| 403 | API key not authorized for the workspace |
| 404 | Agent not found (invalid agentId) |
| Method | Endpoint | Description |
|---|
GET | /api/workspaces/:wid/chats | List chat sessions |
POST | /api/workspaces/:wid/chats | Create a new chat |
GET | /api/workspaces/:wid/chats/:id | Get chat details |
PUT | /api/workspaces/:wid/chats/:id | Update chat title |
DELETE | /api/workspaces/:wid/chats/:id | Delete a chat |
| Method | Endpoint | Description |
|---|
GET | /api/workspaces/:wid/dashboards | List dashboards |
POST | /api/workspaces/:wid/dashboards | Create a dashboard |
GET | /api/workspaces/:wid/dashboards/:did | Get dashboard details |
PUT | /api/workspaces/:wid/dashboards/:did | Update dashboard |
DELETE | /api/workspaces/:wid/dashboards/:did | Delete dashboard |
POST | /api/workspaces/:wid/dashboards/:did/duplicate | Duplicate a dashboard |
| Method | Endpoint | Description |
|---|
GET | /api/workspaces/:wid/dashboard-folders | List dashboard folders |
POST | /api/workspaces/:wid/dashboard-folders | Create a folder |
PUT | /api/workspaces/:wid/dashboard-folders/:fid | Update a folder |
DELETE | /api/workspaces/:wid/dashboard-folders/:fid | Delete a folder |
| Method | Endpoint | Description |
|---|
GET | /api/workspaces/:wid/dashboards/:did/materialization/status | Get materialization status for all data sources |
POST | /api/workspaces/:wid/dashboards/:did/materialization/trigger | Trigger materialization for a data source |
POST | /api/workspaces/:wid/dashboards/:did/materialization/trigger-all | Trigger materialization for all data sources |
GET | /api/workspaces/:wid/dashboards/:did/materialization/stream/:dataSourceId | Stream Parquet artifact (supports range requests) |
| Method | Endpoint | Description |
|---|
POST | /api/inngest | Inngest webhook handler (internal) |