openapi: 3.1.0 info: title: Api version: 0.1.0 description: VentureForge API specification servers: - url: /api description: Base API path tags: - name: health description: Health operations - name: auth description: Browser and mobile authentication endpoints. - name: dashboard description: Dashboard summary - name: ventures description: Venture management - name: agents description: Agent swarm management - name: memory description: Venture memory layer - name: timeline description: Strategic execution recorder - name: integrations description: Ecosystem integrations - name: blueprints description: Strategy blueprints marketplace paths: /auth/user: get: tags: [auth] operationId: getCurrentAuthUser summary: Get the currently authenticated user parameters: - $ref: '#/components/parameters/AuthorizationSessionHeader' - $ref: '#/components/parameters/SessionCookie' responses: '200': description: Auth status resolved successfully. content: application/json: schema: $ref: '#/components/schemas/AuthUserEnvelope' /login: get: tags: [auth] operationId: beginBrowserLogin summary: Start the browser OIDC login flow parameters: - name: returnTo in: query required: false description: Relative path to redirect to after login (must start with `/`). Defaults to `/`. schema: type: string responses: '302': description: Redirect to the OIDC authorization endpoint. /callback: get: tags: [auth] operationId: handleBrowserLoginCallback summary: Complete the browser OIDC login flow parameters: - name: code in: query required: false schema: type: string - name: state in: query required: false schema: type: string - name: iss in: query required: false schema: type: string format: uri responses: '302': description: Redirect to the returnTo path on success or /api/login on failure. /logout: get: tags: [auth] operationId: logoutBrowserSession summary: Clear the session and begin OIDC logout parameters: - $ref: '#/components/parameters/AuthorizationSessionHeader' - $ref: '#/components/parameters/SessionCookie' responses: '302': description: Redirect to the OIDC provider logout URL. /mobile-auth/token-exchange: post: tags: [auth] operationId: exchangeMobileAuthorizationCode summary: Exchange a mobile OIDC code for a session token requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/MobileTokenExchangeRequest' responses: '200': description: Session created successfully. content: application/json: schema: $ref: '#/components/schemas/MobileTokenExchangeSuccess' '400': description: Missing or invalid required fields. content: application/json: schema: $ref: '#/components/schemas/ErrorEnvelope' '401': description: Token did not contain usable claims. content: application/json: schema: $ref: '#/components/schemas/ErrorEnvelope' '500': description: Token exchange failed. content: application/json: schema: $ref: '#/components/schemas/ErrorEnvelope' /mobile-auth/logout: post: tags: [auth] operationId: logoutMobileSession summary: Delete a mobile session token parameters: - $ref: '#/components/parameters/AuthorizationSessionHeader' responses: '200': description: Logout processed. content: application/json: schema: $ref: '#/components/schemas/LogoutSuccess' /healthz: get: operationId: healthCheck tags: [health] summary: Health check responses: "200": description: Healthy content: application/json: schema: $ref: "#/components/schemas/HealthStatus" /dashboard: get: operationId: getDashboard tags: [dashboard] summary: Get dashboard summary stats responses: "200": description: Dashboard summary content: application/json: schema: $ref: "#/components/schemas/DashboardSummary" /init: get: operationId: getInitData tags: [dashboard] summary: Aggregated page-load data — ventures, agents, and dashboard stats in one request responses: "200": description: All page-load data content: application/json: schema: $ref: "#/components/schemas/InitData" /ventures: get: operationId: listVentures tags: [ventures] summary: List all ventures responses: "200": description: List of ventures content: application/json: schema: type: array items: $ref: "#/components/schemas/Venture" post: operationId: createVenture tags: [ventures] summary: Create a new venture requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreateVentureBody" responses: "201": description: Created venture content: application/json: schema: $ref: "#/components/schemas/Venture" /ventures/{id}: get: operationId: getVenture tags: [ventures] summary: Get a venture by ID parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Venture content: application/json: schema: $ref: "#/components/schemas/Venture" "404": description: Not found put: operationId: updateVenture tags: [ventures] summary: Update a venture parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/UpdateVentureBody" responses: "200": description: Updated venture content: application/json: schema: $ref: "#/components/schemas/Venture" delete: operationId: deleteVenture tags: [ventures] summary: Delete a venture parameters: - name: id in: path required: true schema: type: integer responses: "204": description: Deleted /ventures/{id}/activity: get: operationId: getVentureActivity tags: [ventures] summary: Get recent activity for a venture parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Activity feed content: application/json: schema: type: array items: $ref: "#/components/schemas/ActivityItem" /agents: get: operationId: listAgents tags: [agents] summary: List all agents parameters: - name: ventureId in: query schema: type: integer responses: "200": description: List of agents content: application/json: schema: type: array items: $ref: "#/components/schemas/Agent" post: operationId: createAgent tags: [agents] summary: Create a new agent requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreateAgentBody" responses: "201": description: Created agent content: application/json: schema: $ref: "#/components/schemas/Agent" /agents/{id}: get: operationId: getAgent tags: [agents] summary: Get an agent by ID parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Agent content: application/json: schema: $ref: "#/components/schemas/Agent" put: operationId: updateAgent tags: [agents] summary: Update an agent parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/UpdateAgentBody" responses: "200": description: Updated agent content: application/json: schema: $ref: "#/components/schemas/Agent" /agents/{id}/run: post: operationId: runAgent tags: [agents] summary: Trigger an agent run with a prompt parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/RunAgentBody" responses: "200": description: Agent run result content: application/json: schema: $ref: "#/components/schemas/AgentRunResult" /agents/swarm-status: get: operationId: getSwarmStatus tags: [agents] summary: Get overall swarm status summary responses: "200": description: Swarm status content: application/json: schema: $ref: "#/components/schemas/SwarmStatus" /memory: get: operationId: listMemoryEntries tags: [memory] summary: List memory entries parameters: - name: ventureId in: query schema: type: integer - name: search in: query schema: type: string responses: "200": description: List of memory entries content: application/json: schema: type: array items: $ref: "#/components/schemas/MemoryEntry" post: operationId: createMemoryEntry tags: [memory] summary: Create a memory entry requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreateMemoryEntryBody" responses: "201": description: Created memory entry content: application/json: schema: $ref: "#/components/schemas/MemoryEntry" /memory/{id}: delete: operationId: deleteMemoryEntry tags: [memory] summary: Delete a memory entry parameters: - name: id in: path required: true schema: type: integer responses: "204": description: Deleted /timeline: get: operationId: listTimelineEvents tags: [timeline] summary: List timeline events parameters: - name: ventureId in: query schema: type: integer responses: "200": description: Timeline events content: application/json: schema: type: array items: $ref: "#/components/schemas/TimelineEvent" post: operationId: createTimelineEvent tags: [timeline] summary: Record a timeline event requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreateTimelineEventBody" responses: "201": description: Created event content: application/json: schema: $ref: "#/components/schemas/TimelineEvent" /integrations: get: operationId: listIntegrations tags: [integrations] summary: List all integrations responses: "200": description: List of integrations content: application/json: schema: type: array items: $ref: "#/components/schemas/Integration" post: operationId: createIntegration tags: [integrations] summary: Connect a new integration requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreateIntegrationBody" responses: "201": description: Created integration content: application/json: schema: $ref: "#/components/schemas/Integration" /integrations/{id}: put: operationId: updateIntegration tags: [integrations] summary: Update integration status parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/UpdateIntegrationBody" responses: "200": description: Updated integration content: application/json: schema: $ref: "#/components/schemas/Integration" delete: operationId: deleteIntegration tags: [integrations] summary: Remove an integration parameters: - name: id in: path required: true schema: type: integer responses: "204": description: Deleted /blueprints/{id}/use: post: operationId: useBlueprint tags: [blueprints] summary: Deploy an agent from a blueprint parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/UseBlueprintBody" responses: "201": description: Deployed agent content: application/json: schema: $ref: "#/components/schemas/UseBlueprintResponse" "404": description: Blueprint or venture not found /blueprints: get: operationId: listBlueprints tags: [blueprints] summary: List marketplace blueprints responses: "200": description: List of blueprints content: application/json: schema: type: array items: $ref: "#/components/schemas/Blueprint" post: operationId: createBlueprint tags: [blueprints] summary: Publish a blueprint requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreateBlueprintBody" responses: "201": description: Created blueprint content: application/json: schema: $ref: "#/components/schemas/Blueprint" components: parameters: AuthorizationSessionHeader: name: Authorization in: header required: false description: Opaque session token — `Bearer `. schema: type: string SessionCookie: name: sid in: cookie required: false description: Browser session cookie. schema: type: string schemas: HealthStatus: type: object properties: status: type: string required: [status] DashboardSummary: type: object properties: totalVentures: type: integer activeAgents: type: integer memoryEntries: type: integer timelineEvents: type: integer connectedIntegrations: type: integer recentActivity: type: array items: $ref: "#/components/schemas/ActivityItem" venturesByStage: type: array items: $ref: "#/components/schemas/StageCount" required: - totalVentures - activeAgents - memoryEntries - timelineEvents - connectedIntegrations - recentActivity - venturesByStage InitData: type: object properties: dashboard: $ref: "#/components/schemas/DashboardSummary" ventures: type: array items: $ref: "#/components/schemas/Venture" agents: type: array items: $ref: "#/components/schemas/Agent" required: [dashboard, ventures, agents] StageCount: type: object properties: stage: type: string count: type: integer required: [stage, count] ActivityItem: type: object properties: id: type: integer type: type: string description: type: string createdAt: type: string format: date-time ventureId: type: integer ventureName: type: string required: [id, type, description, createdAt] Venture: type: object properties: id: type: integer name: type: string description: type: string stage: type: string enum: [ideation, validation, mvp, growth, scale] status: type: string enum: [active, paused, archived] industry: type: string targetMarket: type: string createdAt: type: string format: date-time updatedAt: type: string format: date-time required: [id, name, stage, status, createdAt, updatedAt] CreateVentureBody: type: object properties: name: type: string description: type: string stage: type: string enum: [ideation, validation, mvp, growth, scale] industry: type: string targetMarket: type: string required: [name, stage] UpdateVentureBody: type: object properties: name: type: string description: type: string stage: type: string enum: [ideation, validation, mvp, growth, scale] status: type: string enum: [active, paused, archived] industry: type: string targetMarket: type: string Agent: type: object properties: id: type: integer ventureId: type: integer name: type: string type: type: string enum: [strategy, ops, market_testing] status: type: string enum: [idle, running, completed, error] description: type: string lastRunAt: type: string format: date-time lastOutput: type: string createdAt: type: string format: date-time required: [id, ventureId, name, type, status, createdAt] CreateAgentBody: type: object properties: ventureId: type: integer name: type: string type: type: string enum: [strategy, ops, market_testing] description: type: string required: [ventureId, name, type] UpdateAgentBody: type: object properties: name: type: string status: type: string enum: [idle, running, completed, error] description: type: string RunAgentBody: type: object properties: prompt: type: string minLength: 1 required: [prompt] AgentRunResult: type: object properties: agentId: type: integer output: type: string tokensUsed: type: integer duration: type: integer createdAt: type: string format: date-time required: [agentId, output, createdAt] SwarmStatus: type: object properties: totalAgents: type: integer idleAgents: type: integer runningAgents: type: integer completedAgents: type: integer errorAgents: type: integer agentsByType: type: array items: $ref: "#/components/schemas/AgentTypeCount" required: - totalAgents - idleAgents - runningAgents - completedAgents - errorAgents - agentsByType AgentTypeCount: type: object properties: type: type: string count: type: integer required: [type, count] MemoryEntry: type: object properties: id: type: integer ventureId: type: integer title: type: string content: type: string tags: type: array items: type: string source: type: string enum: [manual, agent, webhook, import] createdAt: type: string format: date-time required: [id, ventureId, title, content, source, createdAt] CreateMemoryEntryBody: type: object properties: ventureId: type: integer title: type: string content: type: string tags: type: array items: type: string source: type: string enum: [manual, agent, webhook, import] required: [ventureId, title, content] TimelineEvent: type: object properties: id: type: integer ventureId: type: integer eventType: type: string enum: [decision, milestone, agent_run, integration, note] title: type: string description: type: string metadata: type: object occurredAt: type: string format: date-time createdAt: type: string format: date-time required: [id, ventureId, eventType, title, occurredAt, createdAt] CreateTimelineEventBody: type: object properties: ventureId: type: integer eventType: type: string enum: [decision, milestone, agent_run, integration, note] title: type: string description: type: string metadata: type: object occurredAt: type: string format: date-time required: [ventureId, eventType, title] Integration: type: object properties: id: type: integer name: type: string provider: type: string enum: [stripe, notion, webflow, airtable, framer, vercel, github, slack] status: type: string enum: [connected, disconnected, error] description: type: string webhookUrl: type: string connectedAt: type: string format: date-time createdAt: type: string format: date-time required: [id, name, provider, status, createdAt] CreateIntegrationBody: type: object properties: name: type: string provider: type: string enum: [stripe, notion, webflow, airtable, framer, vercel, github, slack] description: type: string webhookUrl: type: string required: [name, provider] UpdateIntegrationBody: type: object properties: status: type: string enum: [connected, disconnected, error] webhookUrl: type: string Blueprint: type: object properties: id: type: integer title: type: string description: type: string category: type: string enum: [strategy, gtm, ops, market_testing, narrative, micro_venture] author: type: string tags: type: array items: type: string usageCount: type: integer rating: type: number createdAt: type: string format: date-time required: [id, title, category, author, usageCount, createdAt] CreateBlueprintBody: type: object properties: title: type: string description: type: string category: type: string enum: [strategy, gtm, ops, market_testing, narrative, micro_venture] author: type: string tags: type: array items: type: string required: [title, category, author] UseBlueprintBody: type: object properties: ventureId: type: integer required: [ventureId] UseBlueprintResponse: type: object properties: agent: $ref: "#/components/schemas/Agent" blueprint: $ref: "#/components/schemas/Blueprint" required: [agent, blueprint] AuthUser: type: object required: [id, email, firstName, lastName, profileImageUrl] properties: id: type: string email: type: [string, 'null'] format: email firstName: type: [string, 'null'] lastName: type: [string, 'null'] profileImageUrl: type: [string, 'null'] AuthUserEnvelope: type: object required: [user] properties: user: oneOf: - $ref: '#/components/schemas/AuthUser' - type: 'null' MobileTokenExchangeRequest: type: object required: [code, code_verifier, redirect_uri, state] properties: code: type: string minLength: 1 code_verifier: type: string minLength: 1 redirect_uri: type: string minLength: 1 format: uri state: type: string minLength: 1 nonce: type: string minLength: 1 MobileTokenExchangeSuccess: type: object required: [token] properties: token: type: string LogoutSuccess: type: object required: [success] properties: success: type: boolean const: true ErrorEnvelope: type: object required: [error] properties: error: type: string