API Endpoints
The T3 webapp exposes REST endpoints under two path families.
Health Check
GET /api/healthReturns:
json
{
"ok": true,
"db": { "reachable": true, "latencyMs": 4 },
"version": "1.0.0",
"time": "2024-01-15T12:00:00.000Z"
}On database failure returns HTTP 503 with "ok": false.
Response headers include cache-control: no-store.
Upload
POST /api/uploadAuth: x-api-key: $UPLOAD_API_KEY header required.
Body: multipart/form-data with a file field.
Constraints:
- PDF only (magic-byte validated — first 5 bytes must be
%PDF-) - Max 50 MB
- Filename must not contain
..,/, or\
On success, writes the PDF to ~/FundAdmin-AI-Vault/Inbox/ and triggers the classifier. Returns the classification result and whether the SDK review pipeline was triggered.
Error responses:
| Status | Body |
|---|---|
| 401 | {"error": "Unauthorized"} |
| 400 | {"error": "No file"} |
| 400 | {"error": "Only PDF files accepted"} |
| 400 | {"error": "File too large (max 50MB)"} |
| 400 | {"error": "Not a valid PDF file"} |
Workspace-Scoped Endpoints (/api/w/[slug]/)
| Endpoint | Method | Description |
|---|---|---|
/api/w/[slug]/activity | GET | Workspace activity feed |
/api/w/[slug]/copilot | POST | AI copilot chat |
/api/w/[slug]/extract | POST | Term extraction |
/api/w/[slug]/funds | GET, POST | Fund list / create |
/api/w/[slug]/inbox | GET | Inbox items |
/api/w/[slug]/investors | GET, POST | Investor list / create |
/api/w/[slug]/issues | GET | Issue list |
/api/w/[slug]/runs | GET | Run history |
/api/w/[slug]/search | GET | Global search |
Global Entity Endpoints
| Endpoint | Method | Description |
|---|---|---|
/api/agents/[id] | GET | Agent detail |
/api/autopilots/[id] | GET, PATCH, DELETE | Autopilot schedule |
/api/funds/[id] | GET, PATCH | Fund detail |
/api/investors/[id] | GET, PATCH | Investor detail |
/api/issues/[id] | GET, PATCH | Issue detail |
/api/runs/[id] | GET | Run detail |
/api/skills/[id] | GET | Skill detail |
MCP Vault Server REST API
The MCP vault server runs a separate HTTP listener on 127.0.0.1:3001 (configurable via MCP_VAULT_API_PORT).
| Endpoint | Method | Description |
|---|---|---|
/api/review/status | POST | Update review status |
/api/kanban/add | POST | Add Kanban card |
/api/kanban/move | POST | Move Kanban card |
/api/kanban/check | GET | Check card existence |
This API is an internal interface between the webapp and the MCP vault server. It is not exposed to the public internet.