{"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":"QA Setup","description":"QA onboarding wizard - readiness checks and setup status"},{"name":"QA Test Cases","description":"Generate and export test cases from project requirements"},{"name":"QA Requirements","description":"Extract testable requirements from uploaded documents"}],"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/pm/stories/{storyId}/generate-tests":{"post":{"tags":["PM Stories","QA Test Cases"],"summary":"Generate test cases from story","description":"Generates ISTQB-aligned test cases using the story as test basis.\nAcceptance criteria become test conditions. Generated test case IDs\nare automatically bound to the story.\n","operationId":"generateTestsFromStory","parameters":[{"name":"storyId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"scope":{"type":"string","enum":["full","user-stories","api","security","performance"],"default":"user-stories"},"format":{"type":"string","enum":["standard","gherkin","bdd"],"default":"standard"},"maxTestCases":{"type":"integer","default":20}}}}}},"responses":{"200":{"description":"Generated test cases bound to the story"}}}},"/api/qa/setup":{"get":{"tags":["QA Setup"],"summary":"QA readiness check, shows quick-start and advanced paths","description":"Returns two paths to test case generation:\n\n**Quick Start (zero setup):** POST requirements text directly to `/api/qa/test-cases/generate`.\nNo organization, project, or knowledge base needed.\n\n**Advanced:** Full project + knowledge base setup for richer context,\nsemantic search over indexed documents, and persistent test artifacts.\n\nMethodology: ISTQB CTFL with EP, BVA, Decision Tables, State Transition, Use Case testing.\n","parameters":[{"name":"organizationId","in":"query","schema":{"type":"string","format":"uuid"},"description":"Organization ID (defaults to session org)"},{"name":"projectId","in":"query","schema":{"type":"string","format":"uuid"},"description":"Project ID to check advanced setup for"}],"responses":{"200":{"description":"Setup status with quick-start example and advanced readiness","content":{"application/json":{"schema":{"type":"object","properties":{"quickStart":{"type":"object","properties":{"ready":{"type":"boolean","example":true},"description":{"type":"string"},"example":{"type":"object"}}},"advancedSetup":{"type":"object","properties":{"ready":{"type":"boolean"},"steps":{"type":"array","items":{"type":"object"}}}},"methodology":{"type":"string","example":"ISTQB CTFL, EP, BVA, Decision Tables, State Transition, Use Case Testing"},"capabilities":{"type":"object"}}}}}}}}},"/api/qa/test-cases":{"get":{"tags":["QA Test Cases"],"summary":"List persisted test cases for a project or story","description":"Retrieve stored test cases. Generated test cases are auto-persisted\nwhen projectId and organizationId are provided during generation.\nFilter by project (required) and optionally by story.\n","operationId":"listTestCases","parameters":[{"name":"projectId","in":"query","required":true,"schema":{"type":"string","format":"uuid"},"description":"Project to list test cases for"},{"name":"storyId","in":"query","schema":{"type":"string"},"description":"Filter to test cases linked to this story"}],"responses":{"200":{"description":"List of test cases","content":{"application/json":{"schema":{"type":"object","properties":{"testCases":{"type":"array","items":{"type":"object","properties":{"testCaseId":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"priority":{"type":"string"},"type":{"type":"string"},"status":{"type":"string"},"steps":{"type":"array","items":{"type":"object","properties":{"stepNumber":{"type":"integer"},"action":{"type":"string"},"expectedResult":{"type":"string"}}}},"storyId":{"type":"string"},"createdAt":{"type":"string"}}}},"total":{"type":"integer"},"projectId":{"type":"string"}}}}}}}},"post":{"tags":["QA Test Cases"],"summary":"Create a test case manually","description":"Create a single test case manually (not AI-generated).\nLinked to a project and optionally to a story.\n","operationId":"createTestCase","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["projectId","organizationId","title"],"properties":{"projectId":{"type":"string","format":"uuid"},"organizationId":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":3},"description":{"type":"string"},"preconditions":{"type":"string"},"priority":{"type":"string","enum":["critical","high","medium","low"]},"type":{"type":"string","enum":["functional","security","performance","usability","api","integration","regression","smoke"]},"steps":{"type":"array","items":{"type":"object","properties":{"stepNumber":{"type":"integer"},"action":{"type":"string"},"expectedResult":{"type":"string"},"testData":{"type":"string"}}}},"storyId":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}}}}}}},"responses":{"201":{"description":"Test case created"}}}},"/api/qa/test-cases/generate":{"post":{"tags":["QA Test Cases"],"summary":"Generate ISTQB-aligned test cases","description":"Generate structured test cases using ISTQB methodology.\n\n**Three ways to provide input (simplest first):**\n1. `requirements`, paste your requirements text directly (no setup needed)\n2. `projectId`, uses the project's linked knowledge base\n3. `knowledgeBaseId`, searches a specific indexed KB\n\nAll three can be combined for richer context.\n\n**ISTQB Design Techniques Applied:**\n- Equivalence Partitioning (EP)\n- Boundary Value Analysis (BVA)\n- Decision Table Testing\n- State Transition Testing\n- Use Case Testing\n\n**Export formats:** JSON, CSV, Gherkin, Jira Xray, TestRail, Azure DevOps\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"requirements":{"type":"string","description":"Requirements text, the simplest input, no project or KB needed","example":"REQ-001: The system shall allow users to register with email and password. Password must be at least 8 characters with uppercase, lowercase, number, and special character."},"projectId":{"type":"string","format":"uuid","description":"Optional, project with linked knowledge bases"},"knowledgeBaseId":{"type":"string","format":"uuid","description":"Optional, specific KB to search for requirements"},"scope":{"type":"string","enum":["full","requirements","user-stories","api","accessibility","security","performance"],"default":"full"},"testTypes":{"type":"array","items":{"type":"string","enum":["functional","regression","integration","e2e","accessibility","security","performance","boundary","negative","smoke"]}},"priority":{"type":"string","enum":["all","critical","high","medium","low"],"default":"all"},"format":{"type":"string","enum":["standard","gherkin","bdd"],"default":"standard"},"maxTestCases":{"type":"integer","minimum":1,"maximum":500,"default":50},"context":{"type":"string","description":"Additional context about the system under test"},"includeTraceability":{"type":"boolean","default":true}}},"examples":{"directText":{"summary":"Quick start, just paste requirements","value":{"requirements":"The system shall allow users to register with email and password. Failed login attempts are limited to 5 per 15-minute window.","scope":"full","maxTestCases":20}},"withProject":{"summary":"Advanced, with project and KB","value":{"projectId":"550e8400-e29b-41d4-a716-446655440000","scope":"full","format":"gherkin","maxTestCases":50}}}}}},"responses":{"200":{"description":"Generated test cases with ISTQB metadata","content":{"application/json":{"schema":{"type":"object","properties":{"testCases":{"type":"array","items":{"$ref":"#/components/schemas/TestCase"}},"summary":{"type":"object","properties":{"total":{"type":"integer"},"byPriority":{"type":"object"},"byType":{"type":"object"},"byLevel":{"type":"object"},"byTechnique":{"type":"object"},"coverage":{"type":"string"},"riskAssessment":{"type":"string"}}},"metadata":{"type":"object","properties":{"methodology":{"type":"string","example":"ISTQB CTFL"},"generatedAt":{"type":"string","format":"date-time"}}},"export":{"type":"object","description":"Instructions for exporting in different formats"}}}}}},"422":{"description":"No requirements provided, include requirements text, projectId, or knowledgeBaseId"}}}},"/api/qa/test-cases/export":{"post":{"tags":["QA Test Cases"],"summary":"Export test cases in tool-compatible formats","description":"Takes generated test cases and exports them in formats compatible\nwith major test management tools.\n\n**Supported Formats:**\n- `json`, Standard JSON with full metadata\n- `csv`, Spreadsheet-compatible CSV\n- `gherkin`, Cucumber/BDD .feature file format\n- `jira-xray`, Jira Xray test case import format\n- `testrail`, TestRail API import format\n- `azure-devops`, Azure DevOps Test Case work items\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["testCases","format"],"properties":{"testCases":{"type":"array","items":{"$ref":"#/components/schemas/TestCase"},"description":"Test cases from /generate response"},"format":{"type":"string","enum":["json","csv","gherkin","jira-xray","testrail","azure-devops"]},"projectName":{"type":"string","description":"Project name for file naming"}}}}}},"responses":{"200":{"description":"Exported file (Content-Disposition attachment)","content":{"application/json":{"schema":{"type":"object"}},"text/csv":{"schema":{"type":"string"}},"text/plain":{"schema":{"type":"string"}}}}}}},"/api/qa/requirements/extract":{"post":{"tags":["QA Requirements"],"summary":"Extract testable requirements from text or KB","description":"Analyzes content to extract structured, testable requirements\nusing ISTQB requirement analysis standards.\n\n**Two ways to provide input:**\n1. `content`, paste your requirements/spec text directly (no KB needed)\n2. `knowledgeBaseId` + `organizationId`, search an indexed KB\n\nBoth can be combined.\n\nEach requirement includes testability assessment, suggested ISTQB\ndesign technique, and acceptance criteria in Given/When/Then format.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","description":"Requirements text, the simplest input, no KB needed","example":"The checkout shall support Visa, Mastercard, and PayPal. All payment data must be PCI-DSS compliant."},"knowledgeBaseId":{"type":"string","format":"uuid","description":"Optional, KB with indexed requirements documents"},"organizationId":{"type":"string","format":"uuid","description":"Required when using knowledgeBaseId"},"scope":{"type":"string","enum":["all","functional","non-functional","security","performance","accessibility"],"default":"all"},"includeTestability":{"type":"boolean","default":true}}},"examples":{"directText":{"summary":"Quick, paste requirements text","value":{"content":"The system shall allow users to register with email and password. Failed attempts limited to 5 per 15 minutes.","scope":"all"}},"withKB":{"summary":"From indexed knowledge base","value":{"knowledgeBaseId":"550e8400-e29b-41d4-a716-446655440000","organizationId":"660e8400-e29b-41d4-a716-446655440000","scope":"functional"}}}}}},"responses":{"200":{"description":"Extracted requirements with ISTQB analysis","content":{"application/json":{"schema":{"type":"object","properties":{"requirements":{"type":"array","items":{"$ref":"#/components/schemas/Requirement"}},"summary":{"type":"object","properties":{"total":{"type":"integer"},"byCategory":{"type":"object"},"byTestability":{"type":"object"},"gaps":{"type":"array","items":{"type":"string"}},"recommendations":{"type":"array","items":{"type":"string"}}}},"nextStep":{"type":"object","description":"How to use these requirements for test generation"}}}}}},"422":{"description":"No content provided, include content text or knowledgeBaseId"}}}}}}