{"openapi":"3.0.3","info":{"title":"GoOmni AI","description":"AI-powered project management, quality assurance, and knowledge platform.\n\n**Base URL:** `https://agent.goomni.ai` &nbsp;|&nbsp; **Auth:** `Authorization: Bearer <jwt>`\n","version":"1.0.0","contact":{"name":"GoOmni API Support","url":"https://goomni.ai"},"license":{"name":"Proprietary","url":"https://goomni.ai/terms"}},"servers":[{"url":"https://agent.goomni.ai","description":"Production"},{"url":"http://localhost:3000","description":"Local Development"}],"tags":[{"name":"Website Crawling","description":"Full website crawling, indexing, and pipeline management"},{"name":"Site Analysis","description":"Lighthouse SEO/performance/accessibility analysis"},{"name":"Content Type Analysis","description":"CMS content type detection and migration planning"},{"name":"Page Transformation","description":"Page migration preview, navigation strategy"}],"security":[{"bearerAuth":[]}],"components":{"parameters":{"organizationId":{"name":"organizationId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organization ID (top-level tenant identifier)"},"projectId":{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Project ID (scoped workspace within an organization)"},"kbId":{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Knowledge Base ID"}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token from NextAuth/Cognito authentication"}},"schemas":{"AnalyticsWebsite":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"domain":{"type":"string","nullable":true},"organizationId":{"type":"string","format":"uuid"},"teamId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}}},"CollectRequest":{"type":"object","required":["type","payload"],"properties":{"type":{"type":"string","enum":["event","identify"],"description":"`event` records a pageview or custom event. `identify` attaches\nsession properties via the session_data pipeline.\n"},"payload":{"type":"object","required":["website"],"properties":{"website":{"type":"string","format":"uuid","description":"Website ID from the analytics console (tracker site key)."},"url":{"type":"string"},"title":{"type":"string"},"referrer":{"type":"string"},"hostname":{"type":"string"},"language":{"type":"string"},"screen":{"type":"string"},"name":{"type":"string","description":"Custom event name (omit for pageviews)."},"specialEventName":{"type":"string"},"tag":{"type":"string","nullable":true},"data":{"type":"object","additionalProperties":true,"description":"Custom event properties."},"session":{"type":"object","additionalProperties":true}}}}},"RecordRequest":{"type":"object","required":["type","payload"],"properties":{"type":{"type":"string","enum":["record"]},"payload":{"type":"object","required":["website","events"],"properties":{"website":{"type":"string","format":"uuid"},"events":{"type":"array","minItems":1,"maxItems":200,"items":{"type":"object","description":"rrweb recording chunk events."}},"timestamp":{"type":"integer","format":"int64"}}}}},"Heatmap":{"type":"object","properties":{"heatmapId":{"type":"string","format":"uuid"},"websiteId":{"type":"string","format":"uuid"},"urlPath":{"type":"string"},"device":{"type":"string","enum":["desktop","mobile","tablet"]},"status":{"type":"string","enum":["pending","building","ready","failed"]},"windowStart":{"type":"string","format":"date-time"},"windowEnd":{"type":"string","format":"date-time"}}},"ReplaySessionSummary":{"type":"object","properties":{"replaySessionId":{"type":"string"},"websiteId":{"type":"string","format":"uuid"},"sessionId":{"type":"string"},"startedAt":{"type":"string","format":"date-time"},"endedAt":{"type":"string","format":"date-time"},"durationMs":{"type":"integer"},"eventCount":{"type":"integer"},"errorCount":{"type":"integer"},"rageClickCount":{"type":"integer"},"deadClickCount":{"type":"integer"},"device":{"type":"string"},"browser":{"type":"string"},"country":{"type":"string"},"landingUrl":{"type":"string"},"exitUrl":{"type":"string"},"status":{"type":"string","enum":["recording","finalized","failed",""]},"qualityScore":{"type":"number"},"chunkCount":{"type":"integer"},"playable":{"type":"boolean"}}},"Experiment":{"type":"object","properties":{"experimentId":{"type":"string","format":"uuid"},"websiteId":{"type":"string","format":"uuid"},"name":{"type":"string"},"status":{"type":"string","enum":["draft","running","paused","completed","archived"]},"hypothesis":{"type":"string"},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"weight":{"type":"number"},"isControl":{"type":"boolean"}}}}}},"Error":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}},"Organization":{"type":"object","properties":{"organizationId":{"type":"string","format":"uuid","description":"Unique organization identifier"},"name":{"type":"string","example":"Acme Corp"},"slug":{"type":"string","example":"acme-corp","description":"URL-friendly identifier"},"tier":{"type":"string","enum":["startup","growth","enterprise"]},"billingEmail":{"type":"string","format":"email"},"settings":{"type":"object","properties":{"chatModel":{"type":"string"},"chatTemperature":{"type":"number"},"maxMembers":{"type":"integer"},"maxProjects":{"type":"integer"},"maxStorage":{"type":"integer"},"allowPublicKBs":{"type":"boolean"},"customBranding":{"type":"boolean"}}},"googleDriveLinked":{"type":"boolean"},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"Project":{"type":"object","properties":{"projectId":{"type":"string","format":"uuid","description":"Unique project identifier"},"organizationId":{"type":"string","format":"uuid","description":"Parent organization"},"name":{"type":"string","example":"Q1 2026 Government RFP"},"description":{"type":"string"},"templateId":{"type":"string"},"templateType":{"type":"string","enum":["rfp","migration","qa","blank"]},"knowledgeBaseIds":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Linked knowledge bases providing context for this project"},"agentConfigs":{"type":"array","items":{"type":"object","properties":{"agentId":{"type":"string"},"agentType":{"type":"string"},"enabled":{"type":"boolean"},"order":{"type":"integer"},"config":{"type":"object"}}}},"status":{"type":"string","enum":["active","archived","deleted"]},"stats":{"type":"object","properties":{"fileCount":{"type":"integer"},"agentRunCount":{"type":"integer"},"lastActivityAt":{"type":"string","format":"date-time"}}},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"KnowledgeBase":{"type":"object","properties":{"kbId":{"type":"string","format":"uuid","description":"Unique knowledge base identifier"},"organizationId":{"type":"string","format":"uuid","description":"Parent organization"},"name":{"type":"string","example":"Company Training Materials"},"description":{"type":"string"},"type":{"type":"string","enum":["drive_folders","manual_files","integration","website"],"description":"How content is ingested"},"isPublic":{"type":"boolean","description":"Whether KB is publicly searchable"},"publicSlug":{"type":"string"},"fileCount":{"type":"integer"},"totalSizeBytes":{"type":"integer"},"embeddingModel":{"type":"string"},"status":{"type":"string","enum":["active","indexing","error","archived"]},"masterContext":{"type":"string","description":"AI-generated summary of all KB content"},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"KnowledgeBaseCreate":{"type":"object","required":["name"],"properties":{"name":{"type":"string","example":"Company Policies"},"description":{"type":"string","example":"Internal company policies and procedures"},"isPublic":{"type":"boolean","default":false}}},"FileUpload":{"type":"object","properties":{"fileId":{"type":"string","format":"uuid"},"fileName":{"type":"string"},"fileType":{"type":"string"},"fileSize":{"type":"integer"},"status":{"type":"string","enum":["uploaded","processing","indexed","error"]},"createdAt":{"type":"string","format":"date-time"}}},"SearchRequest":{"type":"object","required":["question"],"properties":{"question":{"type":"string","description":"The search question to ask the knowledge base","example":"What is our refund policy?"},"conversationHistory":{"type":"array","items":{"type":"object"},"description":"Previous conversation messages for context"},"enableWebSearch":{"type":"boolean","default":false},"stream":{"type":"boolean","default":false},"limit":{"type":"integer","minimum":1,"maximum":200,"default":10,"description":"Maximum number of source chunks to return. In non-streaming mode this\nis also the page size unless `perPage` is provided. Capped at 200 per\nrequest; use `page` to retrieve additional results.\n"},"page":{"type":"integer","minimum":1,"default":1,"description":"1-indexed page number for paginating through source results.\nNon-streaming mode only. The total crawl depth (page × perPage) is\ncapped at 1000 sources per query.\n"},"perPage":{"type":"integer","minimum":1,"maximum":200,"description":"Page size for pagination. Defaults to `limit` if not provided.\nNon-streaming mode only.\n"}}},"SearchPagination":{"type":"object","properties":{"page":{"type":"integer","description":"Current 1-indexed page"},"perPage":{"type":"integer","description":"Page size used for this response"},"total":{"type":"integer","description":"Total source chunks retrieved across all pages for this query\n(bounded by the 1000-source crawl cap).\n"},"hasMore":{"type":"boolean","description":"True if additional pages may exist"}}},"SearchResponse":{"type":"object","properties":{"answer":{"type":"string","description":"LLM-generated answer (always reflects the top source set, even when you page through results)"},"sources":{"type":"array","items":{"type":"object"}},"entities":{"type":"array","items":{"type":"object"}},"relationships":{"type":"array","items":{"type":"object"}},"question":{"type":"string"},"kbName":{"type":"string"},"pagination":{"$ref":"#/components/schemas/SearchPagination"}}},"SearchResult":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"chunkId":{"type":"string"},"content":{"type":"string"},"score":{"type":"number","format":"float"},"metadata":{"type":"object","properties":{"fileName":{"type":"string"},"fileId":{"type":"string"},"pageNumber":{"type":"integer"}}}}}},"totalResults":{"type":"integer"}}},"Integration":{"type":"object","properties":{"integrationId":{"type":"string"},"type":{"type":"string","enum":["twilio","hubspot","google-drive"]},"status":{"type":"string","enum":["active","inactive","error"]},"config":{"type":"object"}}},"PublicTestStep":{"type":"object","required":["stepNumber","action","expectedResult"],"properties":{"stepNumber":{"type":"integer"},"action":{"type":"string","description":"Prose instruction (e.g. \"Click the Sign Up button\")"},"expectedResult":{"type":"string","description":"Verification target (e.g. \"User is redirected to /verify-email\")"},"testData":{"type":"string"}}},"PublicTestCase":{"type":"object","required":["id","title"],"properties":{"id":{"type":"string","example":"TC-001"},"title":{"type":"string"},"description":{"type":"string"},"objective":{"type":"string"},"testBasis":{"type":"string","description":"Source requirement (e.g. user story ID)"},"testCondition":{"type":"string"},"designTechnique":{"type":"string","example":"equivalence-partitioning"},"testLevel":{"type":"string","enum":["unit","integration","system","acceptance"],"default":"system"},"testType":{"type":"string","enum":["functional","regression","integration","e2e","accessibility","security","performance","boundary","negative","smoke"],"default":"functional"},"preconditions":{"type":"array","items":{"type":"string"}},"steps":{"type":"array","items":{"$ref":"#/components/schemas/PublicTestStep"}},"expectedResult":{"type":"string"},"postconditions":{"type":"array","items":{"type":"string"}},"priority":{"type":"string","enum":["critical","high","medium","low"],"default":"medium"},"riskLevel":{"type":"string"},"category":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"requirementRef":{"type":"string"},"gherkin":{"type":"string"},"estimatedDuration":{"type":"string"}}},"PublicConversationTurn":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant"]},"content":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"testCaseCount":{"type":"integer"}}},"PublicSessionDetail":{"type":"object","properties":{"sessionId":{"type":"string"},"title":{"type":"string"},"status":{"type":"string"},"requirements":{"type":"string"},"scope":{"type":"string"},"format":{"type":"string"},"maxTestCases":{"type":"integer"},"uploadedFileName":{"type":"string"},"conversation":{"type":"array","items":{"$ref":"#/components/schemas/PublicConversationTurn"}},"testCases":{"type":"array","items":{"$ref":"#/components/schemas/PublicTestCase"}},"summary":{"type":"object"},"events":{"type":"array","items":{"type":"object"}},"totalTestCases":{"type":"integer"},"totalIterations":{"type":"integer"},"totalToolCalls":{"type":"integer"},"turnCount":{"type":"integer"},"latestExecutionId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"PublicStepResult":{"type":"object","properties":{"stepNumber":{"type":"integer"},"action":{"type":"string"},"status":{"type":"string","enum":["passed","failed","error","skipped"]},"durationMs":{"type":"integer"},"screenshotKey":{"type":"string","description":"S3 key of the post-step screenshot (use the parent case's screenshotUrls for signed URL)"},"error":{"type":"string"},"interpretedAction":{"type":"object","description":"The typed browser action Claude derived from the prose step.\nShape varies by action, examples below:\n","example":{"type":"click","selector":"button:has-text('Sign Up')"}}}},"TestCase":{"type":"object","properties":{"id":{"type":"string","example":"TC-001"},"title":{"type":"string","example":"Verify login with valid credentials"},"description":{"type":"string"},"preconditions":{"type":"array","items":{"type":"string"}},"steps":{"type":"array","items":{"type":"object","properties":{"stepNumber":{"type":"integer"},"action":{"type":"string"},"expectedResult":{"type":"string"},"testData":{"type":"string"}}}},"expectedResult":{"type":"string"},"priority":{"type":"string","enum":["critical","high","medium","low"]},"type":{"type":"string","enum":["functional","regression","integration","e2e","accessibility","security","performance","boundary","negative","smoke"]},"category":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"requirementRef":{"type":"string","description":"Source requirement ID for traceability"},"gherkin":{"type":"string","description":"Given/When/Then syntax (when format is gherkin)"},"estimatedDuration":{"type":"string","example":"5min"}}},"Requirement":{"type":"object","properties":{"id":{"type":"string","example":"REQ-001"},"statement":{"type":"string","example":"The system shall authenticate users via username and password"},"category":{"type":"string","enum":["functional","security","performance","accessibility","usability","reliability"]},"subcategory":{"type":"string"},"priority":{"type":"string","enum":["critical","high","medium","low"]},"testability":{"type":"string","enum":["high","medium","low"]},"testabilityNotes":{"type":"string"},"suggestedTestType":{"type":"string"},"acceptanceCriteria":{"type":"array","items":{"type":"string"}},"ambiguities":{"type":"array","items":{"type":"string"}},"dependencies":{"type":"array","items":{"type":"string"}},"source":{"type":"string"}}},"RfpAnalysisRequest":{"type":"object","required":["projectId"],"properties":{"projectId":{"type":"string","description":"Project containing RFP files"},"kbIds":{"type":"array","items":{"type":"string"},"description":"Knowledge base IDs for company context"}}},"RfpSection":{"type":"object","properties":{"sectionId":{"type":"string"},"title":{"type":"string"},"content":{"type":"string"},"order":{"type":"integer"},"status":{"type":"string","enum":["draft","generated","reviewed","final"]}}},"AgentChainRequest":{"type":"object","required":["projectId","organizationId"],"properties":{"projectId":{"type":"string"},"organizationId":{"type":"string"},"agents":{"type":"array","items":{"type":"string","enum":["analysis","assessment","research","win-themes","writer","qa"]},"description":"Agents to run (defaults to full chain)"},"companyKbIds":{"type":"array","items":{"type":"string"},"description":"Company knowledge base IDs for context"}}},"OpportunityScanRequest":{"type":"object","required":["filterId"],"properties":{"filterId":{"type":"string","description":"Search filter ID defining scan criteria"},"organizationId":{"type":"string"},"projectId":{"type":"string"}}},"Opportunity":{"type":"object","properties":{"opportunityId":{"type":"string"},"title":{"type":"string"},"agency":{"type":"string"},"postedDate":{"type":"string","format":"date"},"dueDate":{"type":"string","format":"date"},"estimatedValue":{"type":"number"},"naicsCode":{"type":"string"},"setAside":{"type":"string"},"sourceUrl":{"type":"string"},"qualificationScore":{"type":"number","format":"float"},"status":{"type":"string","enum":["new","qualified","reviewed","applied","won","lost"]}}},"NormalizedTicket":{"type":"object","properties":{"externalId":{"type":"string","description":"Platform-specific ID (e.g. PROJ-42 for Jira, gid for Asana)"},"platform":{"type":"string","enum":["asana","jira","linear","azure_devops"]},"url":{"type":"string","format":"uri"},"title":{"type":"string"},"description":{"type":"string"},"status":{"type":"string"},"priority":{"type":"string","enum":["critical","high","medium","low"]},"type":{"type":"string"},"assignee":{"type":"string"},"labels":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"parentId":{"type":"string"},"subtaskIds":{"type":"array","items":{"type":"string"}},"storyPoints":{"type":"integer"},"customFields":{"type":"object"}}},"GeneratedTicket":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["feature","bug","task","spike"]},"priority":{"type":"string","enum":["critical","high","medium","low"]},"acceptanceCriteria":{"type":"array","items":{"type":"string"}},"storyPoints":{"type":"integer"},"labels":{"type":"array","items":{"type":"string"}},"relatedTicketIds":{"type":"array","items":{"type":"string"}}}},"TicketSyncResult":{"type":"object","properties":{"integrationId":{"type":"string"},"platform":{"type":"string"},"totalFetched":{"type":"integer"},"newTickets":{"type":"integer"},"updatedTickets":{"type":"integer"},"errors":{"type":"array","items":{"type":"string"}},"syncedAt":{"type":"string","format":"date-time"}}},"VoiceCall":{"type":"object","properties":{"callId":{"type":"string"},"kbId":{"type":"string"},"direction":{"type":"string","enum":["inbound","outbound"]},"fromNumber":{"type":"string"},"toNumber":{"type":"string"},"status":{"type":"string","enum":["initiated","ringing","in-progress","completed","failed"]},"duration":{"type":"integer","description":"Call duration in seconds"},"transcript":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}}},"OutboundCallRequest":{"type":"object","required":["kbId","phoneNumber"],"properties":{"kbId":{"type":"string","format":"uuid","description":"Knowledge base ID (determines which voice agent handles the call)"},"phoneNumber":{"type":"string","description":"Phone number to call (E.164 format)","example":"+12125551234"},"metadata":{"type":"object","properties":{"contactName":{"type":"string"},"campaignId":{"type":"string"}}}}},"VoiceTool":{"type":"object","properties":{"toolId":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","enum":["lead-collection","search-faq","hubspot-meeting-booking","hubspot-meeting-availability","retrieve-kb-info","custom"]},"description":{"type":"string"},"config":{"type":"object"},"kbIds":{"type":"array","items":{"type":"string"}}}},"Campaign":{"type":"object","properties":{"campaignId":{"type":"string"},"name":{"type":"string"},"kbId":{"type":"string"},"status":{"type":"string","enum":["draft","active","paused","completed"]},"totalContacts":{"type":"integer"},"contactsCalled":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"}}}}},"paths":{"/api/projects/{id}/analyze-content-types":{"post":{"tags":["Content Type Analysis"],"summary":"Start content type analysis","description":"Triggers AI analysis of all indexed pages to recommend CMS content types\n(e.g., Drupal content types). Analyzes page structure, elements, and patterns\nto generate field mapping templates.\n\nThis is async - use the jobId to poll for results.\n","responses":{"200":{"description":"Analysis job started","content":{"application/json":{"schema":{"type":"object","properties":{"jobId":{"type":"string"},"status":{"type":"string"}}}}}}}}},"/api/projects/{id}/analyze-content-types/{jobId}":{"get":{"tags":["Content Type Analysis"],"summary":"Get content type analysis status/results","description":"Polls the async content type analysis job for completion and results.","responses":{"200":{"description":"Analysis results with recommended content types and field mappings"}}}},"/api/projects/{id}/content-type-config":{"get":{"tags":["Content Type Analysis"],"summary":"Get approved content type config","responses":{"200":{"description":"Content type configuration"}}},"post":{"tags":["Content Type Analysis"],"summary":"Save content type config","description":"Save the approved content type configuration for a migration project.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"contentTypes":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"machineName":{"type":"string"},"fields":{"type":"array","items":{"type":"object"}}}}}}}}}},"responses":{"200":{"description":"Config saved"}}}},"/api/projects/{id}/page-transformation-preview":{"post":{"tags":["Page Transformation"],"summary":"Preview page transformation","description":"Shows how a page will look after applying content type field mappings.\nMaps existing page elements to CMS fields. No AI calls - uses\npre-computed templates from content type analysis.\n","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["fileId"],"properties":{"fileId":{"type":"string"},"contentTypeId":{"type":"string"}}}}}},"responses":{"200":{"description":"Transformation preview"}}}},"/api/projects/{id}/page-migration-config":{"get":{"tags":["Page Transformation"],"summary":"Get page migration config","responses":{"200":{"description":"Page migration configuration"}}},"post":{"tags":["Page Transformation"],"summary":"Save page migration config","description":"Save per-page migration configurations (content type assignment, field overrides).","responses":{"200":{"description":"Config saved"}}}},"/api/projects/{id}/navigation-strategy":{"get":{"tags":["Page Transformation"],"summary":"Get navigation strategy","description":"Returns the AI-generated or manually configured navigation tree for site migration.","responses":{"200":{"description":"Navigation tree structure"}}},"post":{"tags":["Page Transformation"],"summary":"Save navigation strategy","description":"Save the approved navigation tree structure.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"tree":{"type":"array","description":"Navigation tree nodes"}}}}}},"responses":{"200":{"description":"Navigation saved"}}}},"/api/knowledge-bases/{id}/crawl":{"post":{"tags":["Website Crawling"],"summary":"Crawl and index a website","description":"Starts a full website crawl for a website-type knowledge base.\nThe crawler follows links up to the configured depth, extracts content\nfrom each page, runs Lighthouse analysis, and indexes everything.\n\nPipeline: Crawl → Extract → Lighthouse → Chunk → Embed → Index\n","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"maxDepth":{"type":"integer","default":3,"description":"Maximum link depth to follow"},"maxPages":{"type":"integer","default":100,"description":"Maximum pages to crawl"}}}}}},"responses":{"200":{"description":"Crawl started"}}}},"/api/knowledge-bases/{id}/reset-indexing":{"post":{"tags":["Website Crawling"],"summary":"Reset all indexing","description":"Completely resets a knowledge base's indexing. Deletes all files,\nclears S3 content, purges SQS queues, and resets counters.\nUse this for a clean re-crawl/re-index.\n","responses":{"200":{"description":"Indexing reset"}}}},"/api/knowledge-bases/{id}/pipeline-health":{"get":{"tags":["Website Crawling"],"summary":"Check pipeline health","description":"Checks the health of the indexing pipeline for a knowledge base.\nReports stuck files, failed jobs, and queue status.\nOptionally auto-fixes stuck files.\n","parameters":[{"name":"autoFix","in":"query","schema":{"type":"boolean","default":false},"description":"Automatically retry stuck files"}],"responses":{"200":{"description":"Pipeline health status","content":{"application/json":{"schema":{"type":"object","properties":{"healthy":{"type":"boolean"},"totalFiles":{"type":"integer"},"indexedFiles":{"type":"integer"},"processingFiles":{"type":"integer"},"errorFiles":{"type":"integer"},"stuckFiles":{"type":"integer"}}}}}}}}},"/api/knowledge-bases/{id}/analysis":{"get":{"tags":["Site Analysis"],"summary":"Get KB-level site analysis","description":"Returns aggregated analysis across all pages in a website knowledge base:\n- Average Lighthouse scores (performance, accessibility, SEO, best practices)\n- Page classification breakdown (by content type, design quality)\n- Navigation structure overview\n- Responsive design scores\n","responses":{"200":{"description":"Site analysis data","content":{"application/json":{"schema":{"type":"object","properties":{"lighthouseAverages":{"type":"object","properties":{"performance":{"type":"number"},"accessibility":{"type":"number"},"seo":{"type":"number"},"bestPractices":{"type":"number"}}},"pageCount":{"type":"integer"},"navigation":{"type":"object"}}}}}}}}},"/api/knowledge-bases/{id}/files-analysis":{"get":{"tags":["Site Analysis"],"summary":"Get per-page analysis","description":"Returns detailed analysis for every page in the knowledge base:\n- Lighthouse scores per page\n- Vision AI classification (page type, content intent)\n- Navigation structures per page\n- Content type mapping\n\nUse `includeDetails=true` for full S3 data including element-level details.\n","parameters":[{"name":"includeDetails","in":"query","schema":{"type":"boolean","default":false},"description":"Include full Vision AI and navigation details from S3"}],"responses":{"200":{"description":"Per-page analysis data"}}}},"/api/knowledge-bases/{id}/files/{fileId}/analysis":{"get":{"tags":["Site Analysis"],"summary":"Get single page analysis","description":"Full Vision AI + Lighthouse analysis for one page.","responses":{"200":{"description":"Page analysis data"}}}},"/api/knowledge-bases/{id}/lighthouse-details/{fileId}":{"get":{"tags":["Site Analysis"],"summary":"Get full Lighthouse report","description":"Returns the complete Lighthouse report for a page including:\n- **Performance**: LCP, FID, CLS, TTFB, speed index\n- **Accessibility**: Color contrast, ARIA, alt text, keyboard nav, WCAG compliance\n- **SEO**: Meta descriptions, titles, crawlability, structured data, canonical URLs\n- **Best Practices**: HTTPS, console errors, image optimization\n\nEach category includes specific audit items with pass/fail status and recommendations.\n","responses":{"200":{"description":"Full Lighthouse report","content":{"application/json":{"schema":{"type":"object","properties":{"performance":{"type":"object","properties":{"score":{"type":"number"},"insights":{"type":"array","items":{"type":"object"}}}},"accessibility":{"type":"object","properties":{"score":{"type":"number"},"insights":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"score":{"type":"number"}}}}}},"seo":{"type":"object"},"bestPractices":{"type":"object"}}}}}}}}},"/api/knowledge-bases/{id}/content-type-analysis":{"get":{"tags":["Content Type Analysis"],"summary":"Get content type analysis results","description":"Returns the AI-generated content type analysis from S3.","responses":{"200":{"description":"Content type analysis"}}}}}}