openapi: 3.1.0
info:
  title: Phorm API
  version: 0.6.0
  description: Phorm design, template, prompt-to-interface, preview, export, review, and platform discovery API.
servers:
  - url: https://phorm.platphormnews.com
  - url: https://design.platphormnews.com
paths:
  /api/health:
    get:
      summary: Health summary
      responses:
        "200":
          description: OK
  /api/v1/health:
    get:
      summary: Versioned health summary
      responses:
        "200":
          description: OK
  /api/docs:
    get:
      summary: OpenAPI JSON
      responses:
        "200":
          description: OK
  /api/v1/docs:
    get:
      summary: Versioned OpenAPI JSON
      responses:
        "200":
          description: OK
  /openapi.json:
    get:
      summary: OpenAPI JSON
      responses:
        "200":
          description: OK
  /openapi.yaml:
    get:
      summary: OpenAPI YAML
      responses:
        "200":
          description: OK
  /llms.txt:
    get:
      summary: LLMS summary
      responses:
        "200":
          description: OK
  /llms-full.txt:
    get:
      summary: Full LLMS context
      responses:
        "200":
          description: OK
  /llms-index.json:
    get:
      summary: LLMS index
      responses:
        "200":
          description: OK
  /rss.xml:
    get:
      summary: RSS feed
      responses:
        "200":
          description: OK
  /feed.xml:
    get:
      summary: Atom feed
      responses:
        "200":
          description: OK
  /atom.xml:
    get:
      summary: Atom feed alias
      responses:
        "200":
          description: OK
  /sitemap.xml:
    get:
      summary: Sitemap
      responses:
        "200":
          description: OK
  /sitemap-main.xml:
    get:
      summary: Main sitemap
      responses:
        "200":
          description: OK
  /sitemap-full.xml:
    get:
      summary: Full sitemap
      responses:
        "200":
          description: OK
  /sitemap-index.xml:
    get:
      summary: Sitemap index
      responses:
        "200":
          description: OK
  /sitemap-network.xml:
    get:
      summary: Network sitemap
      responses:
        "200":
          description: OK
  /humans.txt:
    get:
      summary: Human attribution
      responses:
        "200":
          description: OK
  /attribution.json:
    get:
      summary: Structured attribution
      responses:
        "200":
          description: OK
  /index.jsonld:
    get:
      summary: JSON-LD graph
      responses:
        "200":
          description: OK
  /.well-known/agents.json:
    get:
      summary: Agents policy
      responses:
        "200":
          description: OK
  /.well-known/agent-policy.json:
    get:
      summary: Agent policy
      responses:
        "200":
          description: OK
  /.well-known/ai-policy.json:
    get:
      summary: AI policy
      responses:
        "200":
          description: OK
  /.well-known/trust.json:
    get:
      summary: Trust policy
      responses:
        "200":
          description: OK
  /api/v1/designs:
    get:
      summary: List public designs
      responses:
        "200":
          description: OK
    post:
      summary: Create protected design session
      responses:
        "200":
          description: OK
  /api/v1/designs/{id}:
    get:
      summary: Get design
      responses:
        "200":
          description: OK
    put:
      summary: Update design
      responses:
        "200":
          description: OK
    delete:
      summary: Delete design
      responses:
        "200":
          description: OK
  /api/v1/templates:
    get:
      summary: List templates
      responses:
        "200":
          description: OK
  /api/v1/templates/{id}:
    get:
      summary: Get template
      responses:
        "200":
          description: OK
  /api/v1/templates/{id}/instantiate:
    post:
      summary: Instantiate template
      responses:
        "200":
          description: OK
  /api/v1/generate/design:
    post:
      summary: Generate public design draft
      responses:
        "200":
          description: OK
  /api/v1/generate/layout:
    post:
      summary: Generate layout
      responses:
        "200":
          description: OK
  /api/v1/generate/variants:
    post:
      summary: Generate variants
      responses:
        "200":
          description: OK
  /api/v1/generate/from-schema:
    post:
      summary: Generate from schema
      responses:
        "200":
          description: OK
  /api/v1/generate/from-mcp-tool:
    post:
      summary: Generate from MCP tool
      responses:
        "200":
          description: OK
  /api/v1/generate/from-openapi-operation:
    post:
      summary: Generate from OpenAPI operation
      responses:
        "200":
          description: OK
  /api/v1/generate:
    post:
      summary: Generate design from prompt
      responses:
        "200":
          description: OK
  /api/v1/generation-runs/{id}:
    get:
      summary: Get generation run
      responses:
        "200":
          description: OK
  /api/v1/designs/{id}/prompts:
    get:
      summary: List prompts
      responses:
        "200":
          description: OK
    post:
      summary: Add prompt
      responses:
        "200":
          description: OK
  /api/v1/designs/{id}/export:
    post:
      summary: Export design
      responses:
        "200":
          description: OK
  /api/v1/designs/{id}/review:
    post:
      summary: Review design
      responses:
        "200":
          description: OK
  /api/v1/designs/{id}/preview:
    get:
      summary: Get preview
      responses:
        "200":
          description: OK
    post:
      summary: Render preview
      responses:
        "200":
          description: OK
  /api/v1/preview:
    post:
      summary: Preview design
      responses:
        "200":
          description: OK
  /api/v1/preview/responsive:
    post:
      summary: Responsive preview
      responses:
        "200":
          description: OK
  /api/v1/preview/accessibility:
    post:
      summary: Accessibility preview
      responses:
        "200":
          description: OK
  /api/v1/preview/export:
    post:
      summary: Export preview
      responses:
        "200":
          description: OK
  /api/v1/designs/{id}/screenshot:
    post:
      summary: Capture screenshot
      responses:
        "200":
          description: OK
  /api/v1/designs/{id}/review/browserops:
    post:
      summary: BrowserOps review
      responses:
        "200":
          description: OK
  /api/v1/designs/{id}/review/evals:
    post:
      summary: Evals review
      responses:
        "200":
          description: OK
  /api/v1/designs/{id}/reviews:
    get:
      summary: List reviews
      responses:
        "200":
          description: OK
  /api/v1/network/graph:
    get:
      summary: Network graph
      responses:
        "200":
          description: OK
  /api/network/graph:
    get:
      summary: Network graph alias
      responses:
        "200":
          description: OK
  /api/v1/network/sites:
    get:
      summary: Network sites
      responses:
        "200":
          description: OK
  /api/v1/network/trusted-domains:
    get:
      summary: Trusted domains
      responses:
        "200":
          description: OK
  /api/v1/network/route-compliance:
    get:
      summary: Route compliance
      responses:
        "200":
          description: OK
  /api/v1/network/discovery-compliance:
    get:
      summary: Discovery compliance
      responses:
        "200":
          description: OK
  /api/v1/network/graph/sync:
    post:
      summary: Sync network graph
      responses:
        "200":
          description: OK
  /api/v1/integrations:
    get:
      summary: Integration matrix
      responses:
        "200":
          description: OK
  /api/v1/integrations/status:
    get:
      summary: Integration status
      responses:
        "200":
          description: OK
  /api/v1/integrations/agentui/status:
    get:
      summary: AgentUI status
      responses:
        "200":
          description: OK
  /api/v1/agentui/preview-handoff:
    post:
      summary: Preview AgentUI handoff
      responses:
        "200":
          description: OK
  /api/v1/agentui/create-workflow:
    post:
      summary: Create AgentUI workflow
      responses:
        "200":
          description: OK
  /api/v1/agentui/validate-design:
    post:
      summary: Validate AgentUI compatibility
      responses:
        "200":
          description: OK
  /api/v1/agentui/handoffs/{id}:
    get:
      summary: Get AgentUI handoff
      responses:
        "200":
          description: OK
  /api/v1/integrations/cli/status:
    get:
      summary: CLI status
      responses:
        "200":
          description: OK
  /api/v1/cli/examples:
    get:
      summary: CLI examples
      responses:
        "200":
          description: OK
  /api/v1/cli/examples/{id}:
    get:
      summary: CLI example
      responses:
        "200":
          description: OK
  /api/v1/agent-policy:
    get:
      summary: Agent policy summary
      responses:
        "200":
          description: OK
  /api/v1/agent-policy/platforms:
    get:
      summary: Agent platforms
      responses:
        "200":
          description: OK
  /api/v1/agent-policy/platforms/{id}:
    get:
      summary: Agent platform policy
      responses:
        "200":
          description: OK
  /api/v1/agent-policy/robots:
    get:
      summary: Robots policy
      responses:
        "200":
          description: OK
  /api/v1/agent-policy/summary:
    get:
      summary: Agent policy summary alias
      responses:
        "200":
          description: OK
  /api/mcp:
    get:
      summary: MCP metadata
      responses:
        "200":
          description: OK
    post:
      summary: MCP JSON-RPC
      responses:
        "200":
          description: OK
  /api/v1/mcp:
    get:
      summary: Versioned MCP metadata
      responses:
        "200":
          description: OK
    post:
      summary: Versioned MCP JSON-RPC
      responses:
        "200":
          description: OK
components:
  securitySchemes:
    PlatPhormBearer:
      type: http
      scheme: bearer
      description: Bearer token value is PLATPHORM_API_KEY.
    PlatPhormHeader:
      type: apiKey
      in: header
      name: X-PlatPhorm-API-Key
