{"openapi":"3.1.0","info":{"title":"Funding OS API","version":"0.1.0","description":"Tenant-bound canonical funding operations. Cookie sessions; every POST requires exact Origin and x-csrf-token from funding_csrf cookie. No external send endpoint is enabled. Append-only, revision-CAS startup questionnaire drafts and saved search policies/runs are available with strict tenant RLS. Saved drafts cannot promote canonical facts, and read-only search runs cannot send external communications. Full production authorization and release remain incomplete."},"servers":[{"url":"http://localhost:3417/api"}],"security":[{"session":[]}],"components":{"securitySchemes":{"session":{"type":"apiKey","in":"cookie","name":"funding_session"},"automationMachine":{"type":"http","scheme":"bearer","description":"Tenant scoped, revocable FundingOS machine token; requires x-funding-tenant-id. NOT n8n admin API key."}},"schemas":{"Error":{"type":"object","required":["error","code","correlationId"],"properties":{"error":{"type":"string"},"code":{"type":"string","pattern":"^HTTP_[45][0-9]{2}$"},"correlationId":{"type":"string","format":"uuid"}}},"Project":{"type":"object","required":["name","stage"],"properties":{"name":{"type":"string","minLength":2,"maxLength":150},"stage":{"enum":["IDEA","PRE_SEED","SEED","GROWTH"]}}},"Fact":{"type":"object","required":["key","type","value","evidence"],"properties":{"key":{"type":"string","pattern":"^[a-z][a-z0-9_]{1,63}$"},"type":{"enum":["string","number","boolean"]},"value":{"type":["string","number","boolean"]},"status":{"const":"USER_CONFIRMED"},"evidence":{"type":"string","minLength":3},"sourceUrl":{"type":"string","format":"uri"},"confidence":{"type":"number","minimum":0,"maximum":1},"freshUntil":{"type":"string","format":"date-time"}}},"Requirement":{"type":"object","required":["key","kind","operator","value"],"properties":{"key":{"type":"string"},"kind":{"enum":["HARD","CONDITIONAL","SOFT"]},"operator":{"enum":["eq","gte","in"]},"value":{"type":["string","number","boolean","array"]},"weight":{"type":"number","minimum":0,"maximum":100}}},"ProfileDraftWrite":{"oneOf":[{"type":"object","properties":{"projectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"key":{"type":"string","minLength":2,"maxLength":64},"expectedRevision":{"type":"integer","minimum":0,"maximum":999999},"state":{"type":"string","const":"ANSWERED"},"value":{"anyOf":[{"type":"string","minLength":1,"maxLength":5000},{"type":"number"},{"type":"boolean"}]}},"required":["projectId","key","expectedRevision","state","value"],"additionalProperties":false},{"type":"object","properties":{"projectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"key":{"type":"string","minLength":2,"maxLength":64},"expectedRevision":{"type":"integer","minimum":0,"maximum":999999},"state":{"type":"string","const":"SKIPPED"},"skipReason":{"type":"string","enum":["NOT_APPLICABLE","NOT_MEASURED","NEEDS_EVIDENCE","UNKNOWN","DECLINED"]}},"required":["projectId","key","expectedRevision","state","skipReason"],"additionalProperties":false}]},"SavedSearchCreate":{"type":"object","properties":{"name":{"type":"string","minLength":3,"maxLength":80},"policy":{"type":"object","properties":{"projectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"policyVersion":{"type":"string","const":"search-v1"},"join":{"default":"AND","type":"string","enum":["AND","OR"]},"groups":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"object","properties":{"join":{"default":"AND","type":"string","enum":["AND","OR"]},"clauses":{"minItems":1,"maxItems":12,"type":"array","items":{"type":"object","properties":{"operator":{"type":"string","enum":["MUST","PREFER","ALLOW","EXCLUDE"]},"field":{"type":"string","enum":["stage","sector","geography","ticketMin","ticketMax","status","deadline","freshness","conflict"]},"test":{"type":"string","enum":["eq","gte","lte","missing"]},"value":{"anyOf":[{"type":"string","minLength":1,"maxLength":100,"pattern":"^[\\p{L}\\p{N} _.,/+:-]+$"},{"type":"number","minimum":0,"maximum":1000000000000}]}},"required":["operator","field","test"],"additionalProperties":false}}},"required":["clauses"],"additionalProperties":false}},"unknowns":{"default":"include","type":"string","enum":["include","exclude"]},"includeDemo":{"default":false,"type":"boolean"},"limit":{"default":25,"type":"integer","minimum":1,"maximum":100},"offset":{"default":0,"type":"integer","minimum":0,"maximum":400}},"required":["projectId","policyVersion","groups"],"additionalProperties":false}},"required":["name","policy"],"additionalProperties":false},"SavedSearchRevise":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","minimum":1,"maximum":999999},"policy":{"type":"object","properties":{"projectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"policyVersion":{"type":"string","const":"search-v1"},"join":{"default":"AND","type":"string","enum":["AND","OR"]},"groups":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"object","properties":{"join":{"default":"AND","type":"string","enum":["AND","OR"]},"clauses":{"minItems":1,"maxItems":12,"type":"array","items":{"type":"object","properties":{"operator":{"type":"string","enum":["MUST","PREFER","ALLOW","EXCLUDE"]},"field":{"type":"string","enum":["stage","sector","geography","ticketMin","ticketMax","status","deadline","freshness","conflict"]},"test":{"type":"string","enum":["eq","gte","lte","missing"]},"value":{"anyOf":[{"type":"string","minLength":1,"maxLength":100,"pattern":"^[\\p{L}\\p{N} _.,/+:-]+$"},{"type":"number","minimum":0,"maximum":1000000000000}]}},"required":["operator","field","test"],"additionalProperties":false}}},"required":["clauses"],"additionalProperties":false}},"unknowns":{"default":"include","type":"string","enum":["include","exclude"]},"includeDemo":{"default":false,"type":"boolean"},"limit":{"default":25,"type":"integer","minimum":1,"maximum":100},"offset":{"default":0,"type":"integer","minimum":0,"maximum":400}},"required":["projectId","policyVersion","groups"],"additionalProperties":false}},"required":["id","expectedRevision","policy"],"additionalProperties":false},"SavedSearchRun":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"revision":{"type":"integer","minimum":1,"maximum":1000000},"requestKey":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["id","revision","requestKey"],"additionalProperties":false},"AdvancedSearchPolicy":{"type":"object","properties":{"projectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"policyVersion":{"type":"string","const":"search-v1"},"join":{"default":"AND","type":"string","enum":["AND","OR"]},"groups":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"object","properties":{"join":{"default":"AND","type":"string","enum":["AND","OR"]},"clauses":{"minItems":1,"maxItems":12,"type":"array","items":{"type":"object","properties":{"operator":{"type":"string","enum":["MUST","PREFER","ALLOW","EXCLUDE"]},"field":{"type":"string","enum":["stage","sector","geography","ticketMin","ticketMax","status","deadline","freshness","conflict"]},"test":{"type":"string","enum":["eq","gte","lte","missing"]},"value":{"anyOf":[{"type":"string","minLength":1,"maxLength":100,"pattern":"^[\\p{L}\\p{N} _.,/+:-]+$"},{"type":"number","minimum":0,"maximum":1000000000000}]}},"required":["operator","field","test"],"additionalProperties":false}}},"required":["clauses"],"additionalProperties":false}},"unknowns":{"default":"include","type":"string","enum":["include","exclude"]},"includeDemo":{"default":false,"type":"boolean"},"limit":{"default":25,"type":"integer","minimum":1,"maximum":100},"offset":{"default":0,"type":"integer","minimum":0,"maximum":400}},"required":["projectId","policyVersion","groups"],"additionalProperties":false},"ProfileDraftRead":{"type":"object","required":["projectId","authority","items"],"properties":{"projectId":{"type":"string","format":"uuid"},"authority":{"type":"string","const":"DRAFT_ONLY_NOT_CANONICAL"},"items":{"type":"array","items":{"type":"object"}}}},"SavedSearchList":{"type":"object","required":["projectId","authority","items"],"properties":{"projectId":{"type":"string","format":"uuid"},"authority":{"type":"string","const":"SAVED_SEARCH_ONLY"},"items":{"type":"array","items":{"type":"object"}}}},"SearchRunReceipt":{"type":"object","required":["id","revision","replay","policyHash","resultHash","summary","authority"],"properties":{"id":{"type":"string","format":"uuid"},"revision":{"type":"integer"},"replay":{"type":"boolean"},"policyHash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"resultHash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"summary":{"type":"object"},"authority":{"type":"string","const":"READ_ONLY_MATCHING"}}}},"headers":{"CorrelationId":{"description":"Server-generated request identifier; returned on all catch-all API responses.","schema":{"type":"string","format":"uuid"}}}},"paths":{"/auth/register":{"post":{"security":[],"summary":"Create user, organization and owner membership atomically","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email","password","organization"],"properties":{"email":{"type":"string","format":"email"},"password":{"type":"string","minLength":12,"maxLength":128},"organization":{"type":"string","minLength":2}}}}}},"responses":{"201":{"description":"Session and CSRF cookies issued","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"409":{"description":"Already registered","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}}}}},"/auth/login":{"post":{"security":[],"summary":"Authenticate; session expires in 12 hours","responses":{"201":{"description":"Authenticated","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"401":{"description":"Invalid credentials","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}}}}},"/auth/me":{"get":{"summary":"Current user, tenant and role","responses":{"200":{"description":"Actor","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"401":{"description":"No valid session","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}}}}},"/auth/logout":{"post":{"summary":"Revoke session and expire cookies","responses":{"200":{"description":"Logged out","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}}}}},"/auth/workspace":{"post":{"summary":"Switch to tenant only after membership check","responses":{"200":{"description":"Switched","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"403":{"description":"No membership","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}}}}},"/projects":{"get":{"summary":"Tenant projects","responses":{"200":{"description":"Project array","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}}}},"post":{"summary":"Create project: owner/admin/member","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}},"responses":{"201":{"description":"Project created","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}}}}},"/projects/{id}/facts":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"summary":"All immutable fact revisions","responses":{"200":{"description":"Fact revisions","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"404":{"description":"Project not visible","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}}}},"post":{"summary":"Append user-confirmed revision; verified fact replacement forbidden","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Fact"}}}},"responses":{"201":{"description":"Revision created","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"409":{"description":"Protected fact","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}}}}},"/projects/{id}/rounds":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"summary":"Funding rounds","responses":{"200":{"description":"Rounds","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}}}},"post":{"summary":"Create funding round","responses":{"201":{"description":"Created","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}}}}},"/opportunities":{"get":{"summary":"Search tenant opportunities","parameters":[{"name":"q","in":"query","schema":{"type":"string"}},{"name":"stage","in":"query","schema":{"type":"string"}},{"name":"geography","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Imported opportunities; not automatically verified","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}}}},"post":{"summary":"Import HTTPS provenance and typed requirements; deduplicate URL","responses":{"201":{"description":"Hierarchy and opportunity created","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"409":{"description":"Duplicate source","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}}}}},"/matching":{"get":{"summary":"Eligibility gate and deterministic weighted ranking","parameters":[{"name":"projectId","in":"query","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Explained PASS/CONDITIONAL/UNCLEAR/FAIL; FAIL has score 0","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}}}}},"/drafts":{"get":{"summary":"Tenant drafts","responses":{"200":{"description":"Draft array with hash and stage","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}}}},"post":{"summary":"Compile keys from supported canonical facts for eligible opportunity","responses":{"201":{"description":"Immutable initial snapshot created","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"409":{"description":"Gate blocks active application","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}}}}},"/drafts/{id}/{action}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"action","in":"path","required":true,"schema":{"enum":["edit","review","approve","prepare","submit","preview","history"]}}],"post":{"summary":"Draft lifecycle; edit requires expectedHash and keys, approve requires hash, prepare requires idempotencyKey","description":"Edit resets approval; REVIEW required before approval. Approve rejects withheld answers. Prepare revalidates facts, eligibility and hash and writes a unique ledger row, without sending. Submit always returns 403. Preview records adapter-blocked task. History returns immutable snapshots for comparison.","responses":{"200":{"description":"State transition or history","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"201":{"description":"Preview request recorded","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"403":{"description":"Role denied or external send disabled","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"409":{"description":"Stale hash, stale evidence, invalid stage or replay","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}}}}},"/audit":{"get":{"summary":"Append-only tenant audit; owner/admin/reviewer","responses":{"200":{"description":"Latest 100 events","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}}}}},"/crm":{"get":{"summary":"Internal contacts","responses":{"200":{"description":"Contacts","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}}}},"post":{"summary":"Create internal contact; never sends email","responses":{"201":{"description":"Created","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}}}}},"/watches":{"get":{"summary":"Paused source watches","responses":{"200":{"description":"Watches","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}}}},"post":{"summary":"Record paused watch, no network activity","responses":{"201":{"description":"Created paused","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}}}}},"/invites":{"post":{"summary":"Owner/admin generates single-use token; manual delivery only","responses":{"201":{"description":"Token returned once, stored as hash, expires in 24h","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}}}}},"/invites/accept":{"post":{"summary":"Accept matching-email token with target tenantId","responses":{"200":{"description":"Membership created","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"404":{"description":"Invalid, replayed or expired token","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}}}}},"/build":{"get":{"security":[],"summary":"Shared phase manifest with observed DB health","responses":{"200":{"description":"Six delivery phases and real evidence","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}}}}},"/health":{"get":{"security":[],"summary":"Database readiness probe","responses":{"200":{"description":"Reachable","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"503":{"description":"Database unavailable","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}}}}},"/openapi":{"get":{"security":[],"summary":"This specification","responses":{"200":{"description":"OpenAPI 3.1","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}}}}},"/projects/{id}/questions":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"summary":"Stage-aware canonical question templates for this tenant project","responses":{"200":{"description":"Question keys, Azerbaijani labels, answer types and required flags","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"404":{"description":"Project not visible","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}}}}},"/api/discovery/sources":{"get":{"summary":"Official source policy and tenant cache status","responses":{"200":{"description":"Success","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"400":{"description":"Invalid typed request","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"401":{"description":"Session required","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"403":{"description":"Tenant role, origin or CSRF denied","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"429":{"description":"Tenant request budget exceeded","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"503":{"description":"Disabled or source unavailable","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}}}}},"/api/discovery/preview":{"post":{"summary":"Bounded official public preview; no opportunity persistence","responses":{"200":{"description":"Success","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"400":{"description":"Invalid typed request","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"401":{"description":"Session required","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"403":{"description":"Tenant role, origin or CSRF denied","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"429":{"description":"Tenant request budget exceeded","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"503":{"description":"Disabled or source unavailable","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}}}}},"/api/discovery/import":{"post":{"summary":"Explicit approval imports an unexpired tenant preview as UNVERIFIED","responses":{"200":{"description":"Success","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"400":{"description":"Invalid typed request","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"401":{"description":"Session required","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"403":{"description":"Tenant role, origin or CSRF denied","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"429":{"description":"Tenant request budget exceeded","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"503":{"description":"Disabled or source unavailable","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}}}}},"/api/discovery/watch":{"post":{"summary":"Register tenant source query watch; no notifications","responses":{"200":{"description":"Success","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"400":{"description":"Invalid typed request","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"401":{"description":"Session required","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"403":{"description":"Tenant role, origin or CSRF denied","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"429":{"description":"Tenant request budget exceeded","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"503":{"description":"Disabled or source unavailable","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}}}}},"/api/discovery/refresh":{"post":{"summary":"Process at most two due tenant watches; no external sends","responses":{"200":{"description":"Success","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"400":{"description":"Invalid typed request","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"401":{"description":"Session required","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"403":{"description":"Tenant role, origin or CSRF denied","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"429":{"description":"Tenant request budget exceeded","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"503":{"description":"Disabled or source unavailable","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}}}}},"/api/discovery/events":{"get":{"summary":"Read tenant diff events","responses":{"200":{"description":"Success","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"400":{"description":"Invalid typed request","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"401":{"description":"Session required","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"403":{"description":"Tenant role, origin or CSRF denied","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"429":{"description":"Tenant request budget exceeded","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"503":{"description":"Disabled or source unavailable","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}}}}},"/api/agents/status":{"get":{"summary":"Non-secret enablement and key presence; no paid invocation","responses":{"200":{"description":"Success","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"400":{"description":"Invalid typed request","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"401":{"description":"Session required","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"403":{"description":"Tenant role, origin or CSRF denied","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"429":{"description":"Tenant request budget exceeded","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"503":{"description":"Disabled or source unavailable","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}}}}},"/api/agents/run":{"post":{"summary":"Tenant-scoped bounded paid specialist; explicit user approval, UUID replay key and committed monthly AI budget reservation required","responses":{"200":{"description":"Paid call completed; tenant reservation settled before response","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["results","authority","requestKey","spendAuthority"],"properties":{"results":{"type":"array","minItems":1,"maxItems":1,"items":{"type":"object","additionalProperties":true}},"authority":{"type":"string","const":"SUGGESTION_ONLY"},"requestKey":{"type":"string","format":"uuid"},"spendAuthority":{"type":"string","const":"COMMITTED_RESERVATION_SETTLED"}}}}}},"400":{"description":"Invalid typed request","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"401":{"description":"Session required","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"403":{"description":"Tenant role, origin or CSRF denied","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"409":{"description":"Duplicate reserved paid operation, monthly cap or provider settlement conflict"},"429":{"description":"Tenant request budget exceeded","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"503":{"description":"AI provider disabled or not configured; no paid call authorized","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["projectId","requestKey","specialist","approvedPaidCall"],"properties":{"projectId":{"type":"string","format":"uuid"},"requestKey":{"type":"string","format":"uuid","description":"Caller-supplied idempotency key, never reused for new paid calls"},"specialist":{"type":"string","enum":["SCOUT","COUNTERPARTY_RESEARCH","REQUIREMENT_PARSER","DATA_STEWARD","APPLICATION_QA"]},"approvedPaidCall":{"type":"boolean","const":true}}}}}}}},"/api/projects/{projectId}/evidence":{"get":{"summary":"Private canonical evidence get","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"description":"Session and tenant/project authority required. Mutations require OWNER/ADMIN/MEMBER, same Origin and X-CSRF-Token. No external submission. See PRIVATE_EVIDENCE.md.","responses":{"200":{"description":"Tenant-scoped result","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"400":{"description":"Invalid input or checksum","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"401":{"description":"Session required","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"403":{"description":"Role, CSRF or origin denied","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"404":{"description":"Scoped resource not found","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"409":{"description":"Immutable version/idempotency conflict","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"503":{"description":"Storage configuration unavailable","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}}}},"post":{"summary":"Private canonical evidence post","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"description":"Session and tenant/project authority required. Mutations require OWNER/ADMIN/MEMBER, same Origin and X-CSRF-Token. No external submission. See PRIVATE_EVIDENCE.md.","responses":{"200":{"description":"Tenant-scoped result","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"400":{"description":"Invalid input or checksum","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"401":{"description":"Session required","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"403":{"description":"Role, CSRF or origin denied","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"404":{"description":"Scoped resource not found","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"409":{"description":"Immutable version/idempotency conflict","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"503":{"description":"Storage configuration unavailable","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["requestKey","filename","mime","size","sha256","sourceRef"],"properties":{"requestKey":{"type":"string","format":"uuid"},"filename":{"type":"string","maxLength":120},"mime":{"enum":["text/plain","text/csv","application/pdf","image/png","image/jpeg"]},"size":{"type":"integer","minimum":1,"maximum":5242880},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"sourceRef":{"type":"string","maxLength":500}}}}}}}},"/api/projects/{projectId}/evidence/{evidenceId}/content":{"get":{"summary":"Private canonical evidence get","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"evidenceId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"description":"Session and tenant/project authority required. Mutations require OWNER/ADMIN/MEMBER, same Origin and X-CSRF-Token. No external submission. See PRIVATE_EVIDENCE.md.","responses":{"200":{"description":"Tenant-scoped result","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"400":{"description":"Invalid input or checksum","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"401":{"description":"Session required","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"403":{"description":"Role, CSRF or origin denied","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"404":{"description":"Scoped resource not found","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"409":{"description":"Immutable version/idempotency conflict","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"503":{"description":"Storage configuration unavailable","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}}}},"post":{"summary":"Private canonical evidence post","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"evidenceId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"description":"Session and tenant/project authority required. Mutations require OWNER/ADMIN/MEMBER, same Origin and X-CSRF-Token. No external submission. See PRIVATE_EVIDENCE.md.","responses":{"200":{"description":"Tenant-scoped result","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"400":{"description":"Invalid input or checksum","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"401":{"description":"Session required","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"403":{"description":"Role, CSRF or origin denied","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"404":{"description":"Scoped resource not found","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"409":{"description":"Immutable version/idempotency conflict","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"503":{"description":"Storage configuration unavailable","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}}},"requestBody":{"required":true,"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary","maxLength":5242880}}}}}},"/api/projects/{projectId}/retrieval":{"get":{"summary":"Private canonical evidence get","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}}],"description":"Session and tenant/project authority required. Mutations require OWNER/ADMIN/MEMBER, same Origin and X-CSRF-Token. No external submission. See PRIVATE_EVIDENCE.md.","responses":{"200":{"description":"Tenant-scoped result","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"400":{"description":"Invalid input or checksum","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"401":{"description":"Session required","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"403":{"description":"Role, CSRF or origin denied","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"404":{"description":"Scoped resource not found","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"409":{"description":"Immutable version/idempotency conflict","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"503":{"description":"Storage configuration unavailable","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}}}}},"/api/projects/{projectId}/portal-previews":{"get":{"summary":"Durable read-only portal preview job get","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"description":"Session and tenant/project authority required. Mutations require OWNER/ADMIN/MEMBER, same Origin and X-CSRF-Token. No external submission. See PRIVATE_EVIDENCE.md.","responses":{"200":{"description":"Tenant-scoped result","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"400":{"description":"Invalid input or checksum","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"401":{"description":"Session required","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"403":{"description":"Role, CSRF or origin denied","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"404":{"description":"Scoped resource not found","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"409":{"description":"Immutable version/idempotency conflict","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"503":{"description":"Storage configuration unavailable","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}}}},"post":{"summary":"Durable read-only portal preview job post","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"description":"Session and tenant/project authority required. Mutations require OWNER/ADMIN/MEMBER, same Origin and X-CSRF-Token. No external submission. See PRIVATE_EVIDENCE.md.","responses":{"200":{"description":"Tenant-scoped result","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"400":{"description":"Invalid input or checksum","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"401":{"description":"Session required","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"403":{"description":"Role, CSRF or origin denied","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"404":{"description":"Scoped resource not found","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"409":{"description":"Immutable version/idempotency conflict","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"503":{"description":"Storage configuration unavailable","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["requestKey","draftId","url"],"properties":{"requestKey":{"type":"string","format":"uuid"},"draftId":{"type":"string","format":"uuid"},"url":{"type":"string","format":"uri"}}}}}}}},"/privacy/export/dry-run":{"post":{"summary":"Owner/admin: enqueue counts-only project export dry-run; requestKey, correlationId, projectId UUIDs; CSRF required","responses":{"202":{"description":"Durable dry-run job accepted","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"403":{"description":"Denied","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"409":{"description":"Idempotency conflict","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}}}}},"/jobs/{id}":{"get":{"summary":"Owner/admin: tenant-scoped dry-run job status","responses":{"200":{"description":"Authorized result","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"403":{"description":"Denied","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}}}}},"/usage":{"get":{"summary":"Owner/admin: local entitlements and lifetime usage; billing disabled","responses":{"200":{"description":"Authorized result","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}},"403":{"description":"Denied","headers":{"x-correlation-id":{"$ref":"#/components/headers/CorrelationId"}}}}}},"/profile/answers":{"get":{"summary":"Read latest questionnaire drafts only; not canonical facts","security":[{"session":[]}],"parameters":[{"name":"projectId","in":"query","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Tenant-bound no-store result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileDraftRead"}}}},"400":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Append-only answer or explicit skip reason; revision CAS, no fact promotion","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileDraftWrite"}}}},"responses":{"201":{"description":"Created tenant-scoped resource (or idempotent replay)","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/profile/answers/history":{"get":{"summary":"Immutable draft question revision history","security":[{"session":[]}],"parameters":[{"name":"projectId","in":"query","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"key","in":"query","required":true,"schema":{"type":"string","maxLength":64}}],"responses":{"200":{"description":"Tenant-bound no-store result","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/opportunities/saved-searches":{"get":{"summary":"List tenant/project saved search policies","security":[{"session":[]}],"parameters":[{"name":"projectId","in":"query","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Tenant-bound no-store result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedSearchList"}}}},"400":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Save strict advanced search policy v1","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedSearchCreate"}}}},"responses":{"201":{"description":"Created tenant-scoped resource (or idempotent replay)","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/opportunities/saved-searches/revise":{"post":{"summary":"Create new immutable policy version with CAS","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedSearchRevise"}}}},"responses":{"201":{"description":"Created tenant-scoped resource (or idempotent replay)","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/opportunities/saved-searches/history":{"get":{"summary":"Read prior versions and SHA-256 policy hashes","security":[{"session":[]}],"parameters":[{"name":"id","in":"query","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Tenant-bound no-store result","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/opportunities/saved-searches/run":{"post":{"summary":"Bounded read-only local execution; immutable receipt, no external side effects","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedSearchRun"}}}},"responses":{"201":{"description":"Created tenant-scoped resource (or idempotent replay)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchRunReceipt"}}}},"400":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/opportunities/saved-searches/runs":{"get":{"summary":"List tenant-scoped read-only search execution receipts","security":[{"session":[]}],"parameters":[{"name":"id","in":"query","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Tenant-bound no-store result","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error; no side effects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}