{"openapi":"3.1.0","info":{"contact":{"email":"hello@uimory.com","name":"Uimory"},"description":"Anonymous, read-only access to Uimory's human-reviewed UI pattern library. No API key. Every endpoint serves approved, published content only. Rate limit: 120 requests/minute per caller (60 for /api/mcp). CORS is open for GET.","license":{"name":"Reference use only","url":"https://staging.uimory.com/legal/terms"},"title":"Uimory Public API","version":"0.9.0"},"servers":[{"url":"https://staging.uimory.com"}],"components":{"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"]},"Pattern":{"type":"object","properties":{"slug":{"type":"string","description":"Stable identifier used by every other endpoint"},"title":{"type":"string"},"productName":{"type":"string"},"domain":{"type":"string"},"sourceUrl":{"type":"string","format":"uri","description":"The page this screen was captured from"},"category":{"type":"string"},"pageType":{"type":"string","description":"Screen type, e.g. Pricing, Kanban Board"},"viewport":{"type":"string","enum":["desktop","mobile","tablet"]},"uiElements":{"type":"array","items":{"type":"string"}},"styleTags":{"type":"array","items":{"type":"string"}},"businessIntent":{"type":"array","items":{"type":"string"}},"aiSummary":{"type":"string"},"capturedAt":{"type":"string","format":"date-time"},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["slug","title","productName","pageType","sourceUrl"]}}},"paths":{"/api/patterns":{"get":{"description":"List published UI patterns. Any filter (q / page_type / category) searches the whole approved library; without filters the newest patterns are returned. `stats` describes the full library and is independent of `limit`.","operationId":"listPatterns","parameters":[{"description":"Free-text search over product, title, tags and UI elements","in":"query","name":"q","schema":{"type":"string"}},{"description":"Exact screen type, e.g. Pricing","in":"query","name":"page_type","schema":{"type":"string"}},{"description":"Exact product category","in":"query","name":"category","schema":{"type":"string"}},{"description":"Page size, clamped to 1–100 (default 12)","in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":12}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"patterns":{"type":"array","items":{"$ref":"#/components/schemas/Pattern"}},"stats":{"type":"object","properties":{"page_returned":{"type":"integer","description":"Rows in THIS response"},"published_screens_total":{"type":"integer","description":"Whole approved library"},"source_domains_total":{"type":"integer"}}},"visibility_boundary":{"type":"string"}},"required":["patterns","stats"]}}},"description":"Matching patterns plus whole-library stats"},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"retry_after_seconds":{"type":"number"}}}}},"description":"Rate limited — retry after the Retry-After interval"},"503":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"]}}},"description":"Library temporarily unavailable (upstream database)"}},"summary":"List published patterns"}},"/api/agent-brief":{"get":{"description":"Structured design brief for one pattern: page structure, interaction patterns, style transfer rules, the deterministic prompt pack, and compliance metadata including how the screen was captured.","operationId":"getAgentBrief","parameters":[{"description":"Pattern slug; omit to get the newest published pattern","in":"query","name":"slug","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"pattern":{"$ref":"#/components/schemas/Pattern"},"agent_brief":{"type":"string"},"prompt_pack":{"type":"object","properties":{"recreate_prompt":{"type":"string"},"style_prompt":{"type":"string"},"flow_prompt":{"type":"string"},"usage_note":{"type":"string"}}},"compliance":{"type":"object","properties":{"capture_method":{"type":"string","enum":["public_page","consented_session"]},"review_status":{"type":"string"},"license_note":{"type":"string"}}}}}}},"description":"Agent brief"},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"]}}},"description":"No published pattern found"},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"retry_after_seconds":{"type":"number"}}}}},"description":"Rate limited — retry after the Retry-After interval"},"503":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"]}}},"description":"Library temporarily unavailable (upstream database)"}},"summary":"Agent brief for a pattern"}},"/api/style-dna":{"get":{"description":"Transferable style rules extracted from one pattern. `slug` is required — omitting it returns 400.","operationId":"getStyleDna","parameters":[{"in":"query","name":"slug","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Style DNA"},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"]}}},"description":"Missing required slug"},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"]}}},"description":"No published style DNA for that slug"},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"retry_after_seconds":{"type":"number"}}}}},"description":"Rate limited — retry after the Retry-After interval"},"503":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"]}}},"description":"Library temporarily unavailable (upstream database)"}},"summary":"Style DNA for a pattern"}},"/api/project-memory":{"get":{"description":"Several patterns bundled as reusable design context for one project or agent session.","operationId":"getProjectMemory","parameters":[{"in":"query","name":"q","schema":{"type":"string"}},{"description":"Comma-separated slugs to pin into the bundle","in":"query","name":"slugs","schema":{"type":"string"}},{"in":"query","name":"page_type","schema":{"type":"string"}},{"in":"query","name":"category","schema":{"type":"string"}},{"in":"query","name":"limit","schema":{"type":"integer","default":5}},{"in":"query","name":"target_agent","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Project memory bundle"},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"retry_after_seconds":{"type":"number"}}}}},"description":"Rate limited — retry after the Retry-After interval"},"503":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"]}}},"description":"Library temporarily unavailable (upstream database)"}},"summary":"Project memory bundle"}},"/api/cite/{slug}":{"get":{"description":"Self-contained markdown citation: facts, the prompt pack, and attribution with the real capture method. Designed to be quoted verbatim by AI systems.","operationId":"getCitation","parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"text/markdown":{"schema":{"type":"string"}}},"description":"Markdown citation"},"404":{"description":"Unknown slug"},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"retry_after_seconds":{"type":"number"}}}}},"description":"Rate limited — retry after the Retry-After interval"},"503":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"]}}},"description":"Library temporarily unavailable (upstream database)"}},"summary":"Markdown citation for a pattern"}},"/api/mcp":{"post":{"description":"Model Context Protocol server (Streamable HTTP, JSON responses). JSON-RPC 2.0: initialize, tools/list, tools/call. Tools: search_patterns, get_pattern, get_prompt_pack. Rate limit 60/minute.","operationId":"mcp","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"jsonrpc":{"const":"2.0","type":"string"},"id":{"type":["string","number","null"]},"method":{"type":"string","enum":["initialize","notifications/initialized","ping","tools/list","tools/call"]},"params":{"type":"object"}},"required":["jsonrpc","method"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"JSON-RPC response"},"202":{"description":"Notification accepted"},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"retry_after_seconds":{"type":"number"}}}}},"description":"Rate limited — retry after the Retry-After interval"}},"summary":"Hosted MCP server"}},"/api/health":{"get":{"description":"Per-dependency readiness: database, approved content, media volume, plus the running release SHA.","operationId":"health","responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok","degraded"]},"components":{"type":"object"},"version":{"type":"string"}}}}},"description":"Healthy or degraded"},"503":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Unavailable"}},"summary":"Health check"}}}}