API Reference

51 REST endpoints across 12 groups.

Base URL: https://api.foundry.mindaeon.com

Authentication

Most endpoints require a JWT access token. Include it in the Authorization header:

Authorization: Bearer <access_token>

Authentication

/api/auth
POST/api/auth/registerCreate account
POST/api/auth/loginEmail/password login
POST/api/auth/refreshRefresh JWT tokens
GET/api/auth/meGet current user profile
PUT/api/auth/profileUpdate profile
POST/api/auth/forgot-passwordSend reset email
POST/api/auth/reset-passwordReset with token
POST/api/auth/change-passwordChange password

OAuth

/api/auth
GET/api/auth/googleStart Google OAuth flow
GET/api/auth/google/callbackGoogle OAuth callback
GET/api/auth/githubStart GitHub OAuth flow
GET/api/auth/github/callbackGitHub OAuth callback

Projects

/api/projects
GET/api/projects/List all projects
POST/api/projects/Create project
GET/api/projects/:idGet project
PUT/api/projects/:idUpdate project
DELETE/api/projects/:idSoft-delete project
GET/api/projects/:id/phases/:phaseGet phase data
PUT/api/projects/:id/phases/:phaseSave phase data

Pipeline

/api/pipeline
POST/api/pipeline/runRun DISCOVERY/SPEC/PLAN phase
GET/api/pipeline/:projectId/:phaseGet phase results

Agent Chat

/api/agent
POST/api/agent/chatSend message + get SSE stream
GET/api/agent/messages/:projectIdLoad chat history

Design System

/api/design-system
POST/api/design-system/generateGenerate colors, typography, spacing
GET/api/design-system/:idGet design system
GET/api/design-system/project/:projectIdGet project design system
PUT/api/design-system/:idCustomize design system
POST/api/design-system/:id/exportExport as CSS/Tailwind/JSON/SCSS

Vision AI

/api/vision
POST/api/vision/analyze-imageImage → UI analysis (multipart)
POST/api/vision/extract-urlURL → design extraction
POST/api/vision/analyze-to-systemImage/URL → full design system

Export

/api/export
POST/api/export/:projectId/htmlExport as HTML + CSS
POST/api/export/:projectId/reactExport as React components

Prototypes

/api/prototypes
POST/api/prototypes/Create prototype
GET/api/prototypes/:idGet prototype
GET/api/prototypes/project/:projectIdList project prototypes
PUT/api/prototypes/:idUpdate screens/flows
DELETE/api/prototypes/:idDelete prototype

Files (R2)

/api/files
GET/api/files/:projectIdList files
GET/api/files/:projectId/*Get file content
PUT/api/files/:projectId/*Upload/write file
DELETE/api/files/:projectId/*Delete file
GET/api/files/:projectId/exportExport all as text bundle

Team

/api/team
GET/api/team/List members
POST/api/team/inviteInvite member (admin)
PUT/api/team/:memberId/roleChange role (admin)
DELETE/api/team/:memberIdRemove member (admin)

Billing (Stripe)

/api/stripe
GET/api/stripe/statusGet subscription status
POST/api/stripe/checkoutCreate checkout session
POST/api/stripe/portalOpen customer portal
GET/api/stripe/usageGet usage metrics

Rate Limits

Login: 20/min
Register: 10/min
API calls: 120/min