{"openapi":"3.1.0","info":{"title":"The Prospector","version":"4.160.0"},"paths":{"/v1/auth/login":{"post":{"tags":["auth"],"summary":"Login","operationId":"login_v1_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/refresh":{"post":{"tags":["auth"],"summary":"Refresh","operationId":"refresh_v1_auth_refresh_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/logout":{"post":{"tags":["auth"],"summary":"Logout","operationId":"logout_v1_auth_logout_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/auth/change-password":{"post":{"tags":["auth"],"summary":"Change Password","operationId":"change_password_v1_auth_change_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/forgot-password":{"post":{"tags":["auth"],"summary":"Forgot Password","operationId":"forgot_password_v1_auth_forgot_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgotPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/reset-password":{"post":{"tags":["auth"],"summary":"Reset Password","operationId":"reset_password_v1_auth_reset_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/accept-invitation":{"get":{"tags":["auth"],"summary":"Validate Invitation","description":"Validate an invitation token (used by the frontend page to show the form).","operationId":"validate_invitation_v1_auth_accept_invitation_get","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["auth"],"summary":"Accept Invitation","description":"Accept an invitation: set password and activate account.","operationId":"accept_invitation_v1_auth_accept_invitation_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptInvitationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/validate-magic-invite":{"get":{"tags":["auth"],"summary":"Validate Magic Invite","description":"Validate a magic invite token (frontend shows registration form).","operationId":"validate_magic_invite_v1_auth_validate_magic_invite_get","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/accept-magic-invite":{"post":{"tags":["auth"],"summary":"Accept Magic Invite Handler","description":"Accept a magic invite: create account with email + name + password.","operationId":"accept_magic_invite_handler_v1_auth_accept_magic_invite_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptMagicInviteRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/accept-tenant-invite":{"post":{"tags":["auth"],"summary":"Accept Tenant Invite Handler","description":"Accept a tenant invite: create account and join the specified org.","operationId":"accept_tenant_invite_handler_v1_auth_accept_tenant_invite_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptMagicInviteRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/accounts":{"get":{"tags":["accounts"],"summary":"List Accounts","operationId":"list_accounts_v1_accounts_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Per Page"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"sort_by","in":"query","required":false,"schema":{"type":"string","default":"last_scanned_at","title":"Sort By"}},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","default":"desc","title":"Sort Order"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/accounts/{account_id}":{"get":{"tags":["accounts"],"summary":"Get Account","operationId":"get_account_v1_accounts__account_id__get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/accounts/{account_id}/fields":{"patch":{"tags":["accounts"],"summary":"Edit Fields","operationId":"edit_fields_v1_accounts__account_id__fields_patch","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FieldEditBatchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/accounts/{account_id}/p8/lines":{"patch":{"tags":["accounts"],"summary":"Edit P8 Line","description":"Human entry for one P8 statement line (audit A7). The value is written\ninto the statement for that fiscal year (creating the statement when the\nscanners never had that FY), provenance-marked ``user_entry`` and\nrescan-proof (merge re-applies it; a disagreeing scan is recorded, never\nsilently applied). ``value=None`` clears the entry and restores what the\nscanners had.","operationId":"edit_p8_line_v1_accounts__account_id__p8_lines_patch","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/P8LineEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/accounts/{account_id}/fields/{panel_id}/{field_key}/stance":{"post":{"tags":["accounts"],"summary":"Set Field Stance","description":"Set/validate the political stance of a buying-committee contact (P5).\nStance is metadata ON the field (it doesn't replace the contact's value).\nA manual set marks it validated (no longer a hypothesis).","operationId":"set_field_stance_v1_accounts__account_id__fields__panel_id___field_key__stance_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"panel_id","in":"path","required":true,"schema":{"type":"string","title":"Panel Id"}},{"name":"field_key","in":"path","required":true,"schema":{"type":"string","title":"Field Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StanceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/accounts/{account_id}/entity":{"patch":{"tags":["accounts"],"summary":"Set Account Entity","description":"Pin (or change/clear) the account's legal entity. body = {entity_ref: {...}}\nor {entity_ref: null} to clear. The pinned country becomes authoritative so\nthe next scan anchors to the right entity (Increment 3).","operationId":"set_account_entity_v1_accounts__account_id__entity_patch","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/accounts/{account_id}/entity/candidates":{"get":{"tags":["accounts"],"summary":"Entity Candidates","description":"Candidate legal entities for resolving this account's identity — the\nhuman-in-the-loop picker behind the ``entity:resolve`` action. Merges\nGLEIF/SFC/NAIC candidates (each with strong anchors: lei / sfc_codigo /\nnaic_group); the picked candidate is applied via ``PATCH /{id}/entity``.\nRead-only; never auto-binds.","operationId":"entity_candidates_v1_accounts__account_id__entity_candidates_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Override query (defaults to the account name)","title":"Q"},"description":"Override query (defaults to the account name)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/accounts/{account_id}/history":{"get":{"tags":["accounts"],"summary":"Field History","operationId":"field_history_v1_accounts__account_id__history_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"panel_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Panel Id"}},{"name":"field_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Field Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/accounts/{account_id}/gate":{"get":{"tags":["accounts"],"summary":"Get Account Gate","description":"Current pipeline stage + the resolved closer_gate evaluated against the\naccount's fields. Drives the gate pills + advance button on the scan view.","operationId":"get_account_gate_v1_accounts__account_id__gate_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/accounts/{account_id}/stage":{"post":{"tags":["accounts"],"summary":"Advance Account Stage","description":"Advance an account to the next pipeline stage. Gated PROSPECTOR→CLOSER:\na hard_block gate returns 409 unless `override` is set. Overriding a blocked\ngate (unmet criteria or stale/conflicting critical data) is a privileged\naction: it requires a non-empty reason, the ``sdi.override_gate`` permission,\nand is audited (S4-3).","operationId":"advance_account_stage_v1_accounts__account_id__stage_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StageAdvanceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/accounts/{account_id}/stage-history":{"get":{"tags":["accounts"],"summary":"Stage History","description":"Append-only pipeline-stage transition history (mirror of field_history).","operationId":"stage_history_v1_accounts__account_id__stage_history_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/accounts/{account_id}/pending":{"post":{"tags":["accounts"],"summary":"Resolve Pending","description":"Resolve one or more pending_update proposals.\n\nActions:\n  - \"accept\" / \"keep\": targets list specifies which fields to act on.\n    accept → adopt pending value as current. keep → discard pending,\n    lock the existing value so future rescans don't propose it again.\n  - \"accept_all\" / \"dismiss_all\": apply the action to every field that\n    currently has a pending_update.","operationId":"resolve_pending_v1_accounts__account_id__pending_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PendingUpdateResolveRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/accounts/{account_id}/scans":{"get":{"tags":["accounts"],"summary":"Account Scans","operationId":"account_scans_v1_accounts__account_id__scans_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/accounts/{account_id}/trends":{"get":{"tags":["accounts"],"summary":"Account Trends","description":"Append-only observation time-series for an account (the G3 trends read).\n\nTwo modes:\n  - single key (via `key`, or `panel_id`+`field_key` → `{panel_id}.{field_key}`):\n    returns the full chronological point list + trend summary.\n  - no key: returns a per-key summary map, only for keys with ≥2 points\n    (single observations aren't trends).","operationId":"account_trends_v1_accounts__account_id__trends_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Canonical observation key, e.g. 'p1.size_gwp'","title":"Key"},"description":"Canonical observation key, e.g. 'p1.size_gwp'"},{"name":"panel_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Panel Id"}},{"name":"field_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Field Key"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":2,"default":60,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/accounts/{account_id}/fields/{panel_id}/{field_key}/candidates":{"get":{"tags":["accounts"],"summary":"Field Candidates","description":"Candidate values for a multi-source field, from the last scan's\nalready-persisted scanner_results. [] for single-source fields.","operationId":"field_candidates_v1_accounts__account_id__fields__panel_id___field_key__candidates_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"panel_id","in":"path","required":true,"schema":{"type":"string","title":"Panel Id"}},{"name":"field_key","in":"path","required":true,"schema":{"type":"string","title":"Field Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/accounts/{account_id}/fields/{panel_id}/{field_key}/select-source":{"post":{"tags":["accounts"],"summary":"Select Source","description":"Pin a field to a chosen candidate source. The field keeps the\nsource's badge/confidence but is marked user-selected + locked, so\nrescans propose changes via pending_update instead of overwriting.","operationId":"select_source_v1_accounts__account_id__fields__panel_id___field_key__select_source_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"panel_id","in":"path","required":true,"schema":{"type":"string","title":"Panel Id"}},{"name":"field_key","in":"path","required":true,"schema":{"type":"string","title":"Field Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SelectSourceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/accounts/{account_id}/fields/{panel_id}/{field_key}/reset":{"post":{"tags":["accounts"],"summary":"Reset Field To Default","description":"Undo a human override: restore the system-selected candidate with its\nOWN status/confidence/source (audit A8 — re-picking the original value used\nto stay 'Confirmed' forever; this clears user_override/locked/pin).","operationId":"reset_field_to_default_v1_accounts__account_id__fields__panel_id___field_key__reset_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"panel_id","in":"path","required":true,"schema":{"type":"string","title":"Panel Id"}},{"name":"field_key","in":"path","required":true,"schema":{"type":"string","title":"Field Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/accounts/{account_id}/fields/{panel_id}/{field_key}/refresh":{"post":{"tags":["accounts"],"summary":"Refresh Field Sources","description":"Fetch fresh: re-run the scanners feeding this field live, merge the\nnew outputs into the last scan, and return the recomputed candidates.\nBest-effort — falls back to existing candidates on timeout/error.","operationId":"refresh_field_sources_v1_accounts__account_id__fields__panel_id___field_key__refresh_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"panel_id","in":"path","required":true,"schema":{"type":"string","title":"Panel Id"}},{"name":"field_key","in":"path","required":true,"schema":{"type":"string","title":"Field Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sdi":{"get":{"tags":["sdi"],"summary":"Sdi Home","description":"Portfolio home — active accounts as tiles linking into the Prospector.\n\nThe SDI surface targets the insurance/Guidewire (tech_b2b) product. Other\nverticals (e.g. cybersec/Thales) bounce to the legacy dashboard so the\ndefault login redirect to /sdi is safe for every tenant.","operationId":"sdi_home_sdi_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/sdi/pipeline":{"get":{"tags":["sdi"],"summary":"Sdi Pipeline","description":"Manager multi-account roll-up (S5-2). One row per account: SDI state,\nreadiness, open/blocking actions, stale data, value, next action, owner, and\nprimary risk. Filterable by owner/stage/risk/overdue. Gated to managers via\nsdi.view_manager_rollup.","operationId":"sdi_pipeline_sdi_pipeline_get","parameters":[{"name":"owner","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner"}},{"name":"stage","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stage"}},{"name":"risk","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Risk"}},{"name":"overdue","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Overdue"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sdi/account/{account_id}":{"get":{"tags":["sdi"],"summary":"Sdi Prospector","description":"The Prospector view of one account (P1-P8 + KPIs + Account Compass).","operationId":"sdi_prospector_sdi_account__account_id__get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sdi/module/{key}":{"get":{"tags":["sdi"],"summary":"Sdi Module Teaser","description":"Teaser / upsell page for a module the tenant doesn't actively have. Owned\n+ built modules redirect to their real destination; locked (not in plan) and\ncoming-soon (in plan, not yet shipped) modules render a preview + brief +\nbenefits + a contact-sales CTA. Configurable per tenant via entitlements.","operationId":"sdi_module_teaser_sdi_module__key__get","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sdi/module/{key}/request-access":{"post":{"tags":["sdi"],"summary":"Sdi Module Request Access","description":"Tenant asks sales to unlock (or be notified about) a module. Notifies the\noperator inbox; best-effort (never fails the request on an email error).","operationId":"sdi_module_request_access_sdi_module__key__request_access_post","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sdi/sector-brief":{"get":{"tags":["sdi"],"summary":"Sdi Sector Brief","description":"Sector Brief — industry Library + Pulse + Ask. Cross-account, but filters\nrelevance by the active account when ``?account=<id>`` is given.","operationId":"sdi_sector_brief_sdi_sector_brief_get","parameters":[{"name":"account","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sdi/sector-brief/ask":{"post":{"tags":["sdi"],"summary":"Sdi Sector Ask","description":"Strict-RAG industry chat. body = {question, account_id?}. The answer cites\nonly the curated corpus; an unresolved citation is rejected upstream.","operationId":"sdi_sector_ask_sdi_sector_brief_ask_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sdi/sector-brief/integrate":{"post":{"tags":["sdi"],"summary":"Sdi Sector Integrate","description":"Stage an Ask answer for the Account Compass as a *proposal* (S3-2): the\nLLM-sourced insight never writes canonical state until a human approves it.\nReturns the pending ApprovalRequest; approval appends the Compass action with\nfull traceability back to the question + sources.","operationId":"sdi_sector_integrate_sdi_sector_brief_integrate_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sdi/account/{account_id}/closer":{"get":{"tags":["sdi"],"summary":"Sdi Closer","description":"The Closer view of one account (slice 1: gate + C1 Pain + C2 Power Map).\nInherits the Prospector's persisted fields — no re-fetch.","operationId":"sdi_closer_sdi_account__account_id__closer_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sdi/account/{account_id}/ask-guidewire/ask":{"post":{"tags":["sdi"],"summary":"Ask Guidewire Ask","description":"Strict-RAG vendor chat scoped to one account. body = {question}. The answer\ncites only the vendor corpus; an unresolved citation is rejected upstream.","operationId":"ask_guidewire_ask_sdi_account__account_id__ask_guidewire_ask_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sdi/account/{account_id}/ask-guidewire/integrate":{"post":{"tags":["sdi"],"summary":"Ask Guidewire Integrate","description":"Stage an Ask-Guidewire answer as a *proposal* (S3-2). target=c3 → a custom\nSKU; target=c5 → a framing note (no figures). The LLM-sourced content writes\ncanonical state only on approval; the proposal carries traceability back to\nthe question + sources.","operationId":"ask_guidewire_integrate_sdi_account__account_id__ask_guidewire_integrate_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sdi/account/{account_id}/closer/skus":{"post":{"tags":["sdi"],"summary":"Set Closer Skus","description":"Toggle a SKU's inclusion in the C3 intended solution. body =\n{sku_id, included}. The selection persists on the account\n(fields.closer.skus_selected); first toggle materialises the default set.","operationId":"set_closer_skus_sdi_account__account_id__closer_skus_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sdi/account/{account_id}/closer/items/{kind}":{"post":{"tags":["sdi"],"summary":"Add Closer Item","description":"Add a C6/C7 tracked item (kind = objections | risks | map).","operationId":"add_closer_item_sdi_account__account_id__closer_items__kind__post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"kind","in":"path","required":true,"schema":{"type":"string","title":"Kind"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sdi/account/{account_id}/closer/items/{kind}/{item_id}":{"patch":{"tags":["sdi"],"summary":"Update Closer Item","operationId":"update_closer_item_sdi_account__account_id__closer_items__kind___item_id__patch","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"kind","in":"path","required":true,"schema":{"type":"string","title":"Kind"}},{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["sdi"],"summary":"Delete Closer Item","operationId":"delete_closer_item_sdi_account__account_id__closer_items__kind___item_id__delete","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"kind","in":"path","required":true,"schema":{"type":"string","title":"Kind"}},{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sdi/account/{account_id}/closer/map/share":{"post":{"tags":["sdi"],"summary":"Record Map Share","description":"Log an offline share of the MAP with the client and mark the current\nversion as shared (brief 2.4.9).","operationId":"record_map_share_sdi_account__account_id__closer_map_share_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sdi/account/{account_id}/closer/map/business-case":{"post":{"tags":["sdi"],"summary":"Set Map Business Case","description":"Persist the seller's explicit choice on whether the client-facing MAP\nexport carries the business-case sentence (U2b). Until set, the export\ndefaults to including it only when the NPV is positive.","operationId":"set_map_business_case_sdi_account__account_id__closer_map_business_case_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sdi/account/{account_id}/closer/map/export":{"get":{"tags":["sdi"],"summary":"Export Map","description":"Client-facing Mutual Action Plan export (brief 2.4.9): deterministic,\nversioned template — header with both company names, executive summary\n(plain string templating, no LLM in the export path), milestones limited to\nvisible_in_pdf, proof points from the C3 selection, signature blocks, and a\nversion + non-binding-disclaimer footer. Rendered to PDF when weasyprint is\ninstalled; otherwise (or with ?format=html) the print-ready HTML downloads.","operationId":"export_map_sdi_account__account_id__closer_map_export_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","default":"pdf","title":"Format"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sdi/account/{account_id}/closer/custom-skus":{"post":{"tags":["sdi"],"summary":"Add Custom Sku","description":"Add a custom (non-catalog) SKU to C3 with provenance metadata (P1.2).","operationId":"add_custom_sku_sdi_account__account_id__closer_custom_skus_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sdi/account/{account_id}/closer/custom-skus/{sku_id}":{"patch":{"tags":["sdi"],"summary":"Update Custom Sku","operationId":"update_custom_sku_sdi_account__account_id__closer_custom_skus__sku_id__patch","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"sku_id","in":"path","required":true,"schema":{"type":"string","title":"Sku Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["sdi"],"summary":"Delete Custom Sku","operationId":"delete_custom_sku_sdi_account__account_id__closer_custom_skus__sku_id__delete","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"sku_id","in":"path","required":true,"schema":{"type":"string","title":"Sku Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sdi/account/{account_id}/p8-meta":{"post":{"tags":["sdi"],"summary":"Set P8 Meta","description":"Set the account-specific P8 presentation metadata (G11):\n``has_reinsurance_treaty`` adds the ceded/net-retained premium rows;\n``header_tag`` shows on the P8 card header (e.g. \"Grupo SURA consolidated ·\nCOP billions\"). Stored at fields_json['p8_meta'] — presentation flags only,\nnever financial figures.","operationId":"set_p8_meta_sdi_account__account_id__p8_meta_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sdi/account/{account_id}/value-modeler":{"get":{"tags":["sdi"],"summary":"Sdi Value Modeler","description":"The Value Modeler view of one account — the deterministic business case\n(CFG / COSTS / SKUs / LEV / Outputs). Inherits the Prospector's P8 + the\nCloser's selected SKUs; the engine never uses an LLM.","operationId":"sdi_value_modeler_sdi_account__account_id__value_modeler_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sdi/account/{account_id}/value-modeler/config":{"post":{"tags":["sdi"],"summary":"Save Value Modeler Config","description":"Persist the Value Modeler inputs the user changed (CFG controls, edited\ncost cells, pinned lever targets). The engine recomputes on the next GET —\nno figure is ever computed client-side. Returns the fresh headline.\n\nA fully-empty payload (e.g. ``{\"config\": {}}``) is an explicit reset (U3):\nthe saved model — including the generated proposal — is wiped back to\n\"not yet run\", so Deal Review no longer counts the VM as engaged.","operationId":"save_value_modeler_config_sdi_account__account_id__value_modeler_config_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sdi/account/{account_id}/value-modeler/proposal":{"post":{"tags":["sdi"],"summary":"Generate Value Proposal","description":"Generate the LLM stakeholder-framed proposal over the engine snapshot. The\nfigures come from the deterministic engine; the LLM only frames them and any\nungrounded number is rejected. Persisted on fields.value_modeler.proposal.","operationId":"generate_value_proposal_sdi_account__account_id__value_modeler_proposal_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sdi/account/{account_id}/deal-room":{"get":{"tags":["sdi"],"summary":"Sdi Deal Room","description":"Deal Room — the contract workspace (pilot slice): version history with a\nvisible human-approval bar. The LLM assists (compare/summary/risk flags); the\nhuman approves.","operationId":"sdi_deal_room_sdi_account__account_id__deal_room_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sdi/account/{account_id}/deal-room/versions":{"post":{"tags":["sdi"],"summary":"Add Deal Room Version","description":"Add a contract version (status starts at 'draft'). body =\n{version_label, title, body}.","operationId":"add_deal_room_version_sdi_account__account_id__deal_room_versions_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sdi/account/{account_id}/deal-room/versions/{version_id}/status":{"post":{"tags":["sdi"],"summary":"Set Deal Room Status","description":"Human approval bar: move a version to in_review / approved / rejected /\ndraft. Only a human does this — the LLM never sets a binding state.","operationId":"set_deal_room_status_sdi_account__account_id__deal_room_versions__version_id__status_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"version_id","in":"path","required":true,"schema":{"type":"string","title":"Version Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sdi/account/{account_id}/deal-room/compare":{"post":{"tags":["sdi"],"summary":"Compare Deal Room Versions","description":"LLM-assisted compare of two versions → change summary + risk-clause flags\n(advisory only). body = {old_id, new_id}.","operationId":"compare_deal_room_versions_sdi_account__account_id__deal_room_compare_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sdi/account/{account_id}/deal-review":{"get":{"tags":["sdi"],"summary":"Sdi Deal Review","description":"Deal Review — a read-only, stage-aware window over the live deal document\n(Prospector / Closer / Value Modeler snapshots). Reads the same fields_json;\nedits happen in the owning module via drill-down.","operationId":"sdi_deal_review_sdi_account__account_id__deal_review_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sdi/account/{account_id}/deal-review/stage":{"post":{"tags":["sdi"],"summary":"Set Deal Review Stage","description":"Override (or clear) the detected stage. body = {stage} where stage is one\nof Early/Mid/Late/Closing, or null to revert to auto-detection.","operationId":"set_deal_review_stage_sdi_account__account_id__deal_review_stage_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sdi/account/{account_id}/outcome":{"post":{"tags":["sdi"],"summary":"Capture Deal Outcome","description":"Close the deal: capture the canonical outcome (closure plan PR7).\n\nA human enters the outcome (won/lost/no_decision/deferred) and *why*; you\ncannot close without that minimal payload. We write the canonical\n``DealOutcome`` row (one per account — re-capturing replaces it), mirror a\ncompact blob into ``fields_json['deal_outcome']`` for the read-only views,\nand stamp the SDI workflow into its closed/archived state. The LLM never\ndecides this and never computes the amount.","operationId":"capture_deal_outcome_sdi_account__account_id__outcome_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sdi/account/{account_id}/crm-link":{"post":{"tags":["sdi"],"summary":"Link Crm","description":"Manual CRM-link placeholder (closure plan Fase 7) — no external integration.\n\nA human pastes the CRM identifiers + a read-only snapshot. We store them ONLY\nin ``fields_json['external_refs']`` and ``['crm_snapshot']`` — never in the\ncanonical panels/fields. SDI works fine without this; it just renders the\nexternal IDs and snapshot alongside the deal when present.","operationId":"link_crm_sdi_account__account_id__crm_link_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sdi/account/{account_id}/actions":{"get":{"tags":["sdi"],"summary":"List Account Actions","operationId":"list_account_actions_sdi_account__account_id__actions_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["sdi"],"summary":"Create Account Action","description":"Create a next-action on the account (owner, priority, due date, gate flag).","operationId":"create_account_action_sdi_account__account_id__actions_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sdi/account/{account_id}/actions/{action_id}":{"patch":{"tags":["sdi"],"summary":"Update Account Action","operationId":"update_account_action_sdi_account__account_id__actions__action_id__patch","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"action_id","in":"path","required":true,"schema":{"type":"integer","title":"Action Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["sdi"],"summary":"Delete Account Action","operationId":"delete_account_action_sdi_account__account_id__actions__action_id__delete","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"action_id","in":"path","required":true,"schema":{"type":"integer","title":"Action Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sdi/account/{account_id}/actions/generate":{"post":{"tags":["sdi"],"summary":"Generate Account Actions","description":"Derive next-actions from the Prospector state (unmet gate criteria +\nbuying-committee gaps) and materialize them idempotently (S2-3).","operationId":"generate_account_actions_sdi_account__account_id__actions_generate_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sdi/account/{account_id}/approvals":{"get":{"tags":["sdi"],"summary":"List Account Approvals","operationId":"list_account_approvals_sdi_account__account_id__approvals_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"pending","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Pending"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["sdi"],"summary":"Create Account Approval","description":"Stage a proposal for human validation (does not mutate canonical state).","operationId":"create_account_approval_sdi_account__account_id__approvals_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sdi/account/{account_id}/approvals/{approval_id}/decide":{"post":{"tags":["sdi"],"summary":"Decide Account Approval","description":"Approve / reject / needs_changes. Canonical write happens only on approve.\nThe required authority depends on what's being approved (S5-1): sector-brief\nintegrations are rep-level, value models need an SE/manager, contract changes\nneed a manager.","operationId":"decide_account_approval_sdi_account__account_id__approvals__approval_id__decide_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"approval_id","in":"path","required":true,"schema":{"type":"integer","title":"Approval Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sdi/account/{account_id}/compass/regenerate":{"post":{"tags":["sdi"],"summary":"Regenerate Compass","description":"Regenerate the Account Compass from the account's current fields (after the\nuser edited P1-P8 / set a stance). Same path as scan-time generation, with the\nper-tenant prompt. Failure keeps the existing Compass.","operationId":"regenerate_compass_sdi_account__account_id__compass_regenerate_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/users":{"get":{"tags":["admin"],"summary":"List Users","operationId":"list_users_v1_admin_users_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Per Page"}},{"name":"search","in":"query","required":false,"schema":{"type":"string","maxLength":100,"default":"","title":"Search"}},{"name":"org_filter","in":"query","required":false,"schema":{"type":"string","maxLength":36,"default":"","title":"Org Filter"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["admin"],"summary":"Create User","operationId":"create_user_v1_admin_users_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/users/{user_id}":{"patch":{"tags":["admin"],"summary":"Update User","operationId":"update_user_v1_admin_users__user_id__patch","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin"],"summary":"Delete User","operationId":"delete_user_v1_admin_users__user_id__delete","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/users/{user_id}/permanent":{"delete":{"tags":["admin"],"summary":"Permanent Delete User","description":"Permanently delete a user and all their data (scans, OTP codes).","operationId":"permanent_delete_user_v1_admin_users__user_id__permanent_delete","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/users/{user_id}/resend-invitation":{"post":{"tags":["admin"],"summary":"Resend Invitation","description":"Resend invitation email to an inactive user.","operationId":"resend_invitation_v1_admin_users__user_id__resend_invitation_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/users/magic-invite":{"post":{"tags":["admin"],"summary":"Create Magic Invite","description":"Generate a magic invite link. No email needed — share via WhatsApp etc.\n\nThe recipient opens the link and provides their own email + name + password.","operationId":"create_magic_invite_v1_admin_users_magic_invite_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/admin/team-tree":{"get":{"tags":["admin"],"summary":"Team Tree","description":"Return users structured as a hierarchy tree, scoped by permission.","operationId":"team_tree_v1_admin_team_tree_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/admin/scans/bulk":{"delete":{"tags":["admin"],"summary":"Bulk Delete Scans","description":"Bulk delete scans, scoped by permission.","operationId":"bulk_delete_scans_v1_admin_scans_bulk_delete","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/scans/rescan":{"post":{"tags":["admin"],"summary":"Rescan Scans","description":"Re-scan existing domains with fresh data. Creates new scans. Max 10.","operationId":"rescan_scans_v1_admin_scans_rescan_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/admin/scans/recalculate-plans":{"post":{"tags":["admin"],"summary":"Bulk Recalculate Plans","description":"Recalculate plan recommendations for completed scans, scoped by permission.","operationId":"bulk_recalculate_plans_v1_admin_scans_recalculate_plans_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/admin/dashboard":{"get":{"tags":["admin"],"summary":"Admin Dashboard","description":"Aggregated dashboard: per-user stats, API consumption, alerts.","operationId":"admin_dashboard_v1_admin_dashboard_get","parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"description":"Days to look back","default":30,"title":"Period"},"description":"Days to look back"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/scans/backfill-broken":{"post":{"tags":["admin"],"summary":"Admin Backfill Broken Scans","description":"Find v2 scans where subdomain_scan / buying_signals / key_contacts\nsilently failed (status=\"ok\" with 0 results — the Serper/Apollo quota\nbug) and mark them as \"degraded\" so POST /v1/scan/{id}/retry accepts them.\n\nPreserves scan id, owner, domain, created_at, started_at.\n\nDefault is dry-run; pass ?apply=true to persist. Returns the list of\naffected scans so you can retry them one by one.","operationId":"admin_backfill_broken_scans_v1_admin_scans_backfill_broken_post","parameters":[{"name":"apply","in":"query","required":false,"schema":{"type":"boolean","description":"Set true to actually patch the DB","default":false,"title":"Apply"},"description":"Set true to actually patch the DB"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/scans/strip-internal-notes":{"post":{"tags":["admin"],"summary":"Admin Strip Internal Notes","description":"Remove internal backfill markers from module_status notes that leaked\nto the user-facing UI (e.g. 'marked degraded by backfill — silent API\nfailure'). Keeps real notes like 'no subdomains found' untouched.","operationId":"admin_strip_internal_notes_v1_admin_scans_strip_internal_notes_post","parameters":[{"name":"apply","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Apply"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/scans/retry-still-degraded":{"post":{"tags":["admin"],"summary":"Admin Retry Still Degraded","description":"Find completed scans that still have a module in \"degraded\" state\n(typically buying_signals after a cancelled retry) and queue them for\nanother retry. Returns the list so the caller can POST /v1/scan/{id}/retry.","operationId":"admin_retry_still_degraded_v1_admin_scans_retry_still_degraded_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/admin/report-feedback":{"get":{"tags":["admin"],"summary":"Admin Report Feedback","description":"Report feedback inbox — thumbs up/down submissions with metadata.\n\nReturns items sorted newest-first plus aggregate stats for the\nrequested period (total, up-count, down-count, tag histogram).","operationId":"admin_report_feedback_v1_admin_report_feedback_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Per Page"}},{"name":"rating","in":"query","required":false,"schema":{"type":"string","maxLength":10,"description":"'up', 'down', or '' for all","default":"","title":"Rating"},"description":"'up', 'down', or '' for all"},{"name":"period","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":0,"description":"Days to look back (0=all)","default":0,"title":"Period"},"description":"Days to look back (0=all)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/active-probe-log":{"get":{"tags":["admin"],"summary":"Admin Active Probe Log","description":"Audit log of active WAF probes.\n\nEvery probe invocation (master switch on + no-WAF target) is persisted\nwith outcome. Useful for ROE review, rate-limit analysis, and\nconfirming we aren't probing hosts we shouldn't.","operationId":"admin_active_probe_log_v1_admin_active_probe_log_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"scan_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scan Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/llm-quota":{"get":{"tags":["admin"],"summary":"Admin Llm Quota","description":"Current OpenRouter weekly usage + limit.\n\nShows usage_weekly, limit, limit_remaining, and the band threshold\nbands configured for the alert (75% warn / 90% critical by default).\nReturns `null` quota + reason when check is disabled or the key is\nmissing / unreachable.","operationId":"admin_llm_quota_v1_admin_llm_quota_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/admin/alerts/test":{"post":{"tags":["admin"],"summary":"Admin Alerts Test","description":"Send a test alert to verify the admin email channel is wired up.\n\nTries Gmail SMTP first (if configured), falls back to Resend. Returns\nwhich channel succeeded so you can confirm the right path works before\nan actual incident.","operationId":"admin_alerts_test_v1_admin_alerts_test_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/admin/scan-errors":{"get":{"tags":["admin"],"summary":"Admin Scan Errors","description":"Recent scan errors with filtering.","operationId":"admin_scan_errors_v1_admin_scan_errors_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Per Page"}},{"name":"module","in":"query","required":false,"schema":{"type":"string","maxLength":50,"default":"","title":"Module"}},{"name":"severity","in":"query","required":false,"schema":{"type":"string","maxLength":20,"default":"","title":"Severity"}},{"name":"period","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":0,"description":"Days to look back (0=all)","default":0,"title":"Period"},"description":"Days to look back (0=all)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/plays":{"get":{"tags":["admin"],"summary":"List Plays","description":"List all sales plays.","operationId":"list_plays_v1_admin_plays_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["admin"],"summary":"Create Play","description":"Create a new play from JSON body.","operationId":"create_play_v1_admin_plays_post","responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/admin/plays/{play_id}":{"get":{"tags":["admin"],"summary":"Get Play","description":"Get a single play by ID.","operationId":"get_play_v1_admin_plays__play_id__get","parameters":[{"name":"play_id","in":"path","required":true,"schema":{"type":"string","title":"Play Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["admin"],"summary":"Update Play","description":"Update an existing play (full replace).","operationId":"update_play_v1_admin_plays__play_id__put","parameters":[{"name":"play_id","in":"path","required":true,"schema":{"type":"string","title":"Play Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin"],"summary":"Delete Play","description":"Delete a play.","operationId":"delete_play_v1_admin_plays__play_id__delete","parameters":[{"name":"play_id","in":"path","required":true,"schema":{"type":"string","title":"Play Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/outreach-prompts":{"get":{"tags":["admin"],"summary":"Get Outreach Prompts","description":"Get all outreach prompt configuration.","operationId":"get_outreach_prompts_v1_admin_outreach_prompts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"put":{"tags":["admin"],"summary":"Update Outreach Prompts","description":"Update outreach prompt configuration (full replace).","operationId":"update_outreach_prompts_v1_admin_outreach_prompts_put","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/admin/data-files":{"get":{"tags":["admin"],"summary":"List Data Files","description":"List all editable knowledge base data files.","operationId":"list_data_files_v1_admin_data_files_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/admin/data-files/{filename}":{"get":{"tags":["admin"],"summary":"Get Data File","description":"Read a knowledge base data file.","operationId":"get_data_file_v1_admin_data_files__filename__get","parameters":[{"name":"filename","in":"path","required":true,"schema":{"type":"string","title":"Filename"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["admin"],"summary":"Update Data File","description":"Update a knowledge base data file (full replace). Triggers RAG reindex.","operationId":"update_data_file_v1_admin_data_files__filename__put","parameters":[{"name":"filename","in":"path","required":true,"schema":{"type":"string","title":"Filename"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/catalog/products":{"get":{"tags":["admin"],"summary":"List Catalog Products","description":"List all products with plan and vendor metadata.","operationId":"list_catalog_products_v1_admin_catalog_products_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["admin"],"summary":"Create Catalog Product","description":"Create a new product.","operationId":"create_catalog_product_v1_admin_catalog_products_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/admin/catalog/products/{product_id}":{"get":{"tags":["admin"],"summary":"Get Catalog Product","description":"Get a single product by ID.","operationId":"get_catalog_product_v1_admin_catalog_products__product_id__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["admin"],"summary":"Update Catalog Product","description":"Update a product (full replace by ID).","operationId":"update_catalog_product_v1_admin_catalog_products__product_id__put","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin"],"summary":"Delete Catalog Product","description":"Delete a product by ID.","operationId":"delete_catalog_product_v1_admin_catalog_products__product_id__delete","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/differentiators":{"get":{"tags":["admin"],"summary":"List Differentiators","description":"List all differentiators.","operationId":"list_differentiators_v1_admin_differentiators_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["admin"],"summary":"Create Differentiator","description":"Create a new differentiator.","operationId":"create_differentiator_v1_admin_differentiators_post","responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/admin/differentiators/{diff_id}":{"get":{"tags":["admin"],"summary":"Get Differentiator","description":"Get a single differentiator by ID.","operationId":"get_differentiator_v1_admin_differentiators__diff_id__get","parameters":[{"name":"diff_id","in":"path","required":true,"schema":{"type":"string","title":"Diff Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["admin"],"summary":"Update Differentiator","description":"Update an existing differentiator (full replace).","operationId":"update_differentiator_v1_admin_differentiators__diff_id__put","parameters":[{"name":"diff_id","in":"path","required":true,"schema":{"type":"string","title":"Diff Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin"],"summary":"Delete Differentiator","description":"Delete a differentiator.","operationId":"delete_differentiator_v1_admin_differentiators__diff_id__delete","parameters":[{"name":"diff_id","in":"path","required":true,"schema":{"type":"string","title":"Diff Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/value-cards":{"get":{"tags":["admin"],"summary":"List Value Cards","description":"List all value driver cards.","operationId":"list_value_cards_v1_admin_value_cards_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/admin/value-cards/{driver_id}":{"get":{"tags":["admin"],"summary":"Get Value Card","description":"Get a single value driver card by ID.","operationId":"get_value_card_v1_admin_value_cards__driver_id__get","parameters":[{"name":"driver_id","in":"path","required":true,"schema":{"type":"string","title":"Driver Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["admin"],"summary":"Update Value Card","description":"Update an existing value driver card (full replace).","operationId":"update_value_card_v1_admin_value_cards__driver_id__put","parameters":[{"name":"driver_id","in":"path","required":true,"schema":{"type":"string","title":"Driver Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/content/competitors":{"get":{"tags":["admin"],"summary":"List Competitors","description":"List all competitor markdown files.","operationId":"list_competitors_v1_admin_content_competitors_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/admin/content/competitors/{competitor_id}":{"get":{"tags":["admin"],"summary":"Get Competitor Content","description":"Read a competitor markdown file.","operationId":"get_competitor_content_v1_admin_content_competitors__competitor_id__get","parameters":[{"name":"competitor_id","in":"path","required":true,"schema":{"type":"string","title":"Competitor Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["admin"],"summary":"Update Competitor Content","description":"Update a competitor markdown file.","operationId":"update_competitor_content_v1_admin_content_competitors__competitor_id__put","parameters":[{"name":"competitor_id","in":"path","required":true,"schema":{"type":"string","title":"Competitor Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/backup/categories":{"get":{"tags":["admin"],"summary":"Backup Categories","description":"List available backup categories with their files.","operationId":"backup_categories_v1_admin_backup_categories_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/admin/backup":{"post":{"tags":["admin"],"summary":"Create Backup","description":"Create a backup ZIP of selected categories/files. Database auto-included unless skip_database=true.","operationId":"create_backup_v1_admin_backup_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/admin/backups":{"get":{"tags":["admin"],"summary":"List Backups","description":"List all existing backups.","operationId":"list_backups_v1_admin_backups_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/admin/backup/{backup_id}":{"get":{"tags":["admin"],"summary":"Download Backup","description":"Download a backup ZIP.","operationId":"download_backup_v1_admin_backup__backup_id__get","parameters":[{"name":"backup_id","in":"path","required":true,"schema":{"type":"string","title":"Backup Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin"],"summary":"Delete Backup","description":"Delete a backup.","operationId":"delete_backup_v1_admin_backup__backup_id__delete","parameters":[{"name":"backup_id","in":"path","required":true,"schema":{"type":"string","title":"Backup Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/backup/{backup_id}/metadata":{"get":{"tags":["admin"],"summary":"Backup Metadata","description":"Read metadata from a backup ZIP.","operationId":"backup_metadata_v1_admin_backup__backup_id__metadata_get","parameters":[{"name":"backup_id","in":"path","required":true,"schema":{"type":"string","title":"Backup Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/backup/{backup_id}/verify":{"get":{"tags":["admin"],"summary":"Verify Backup Endpoint","description":"Verify integrity of a backup via SHA-256 checksums.","operationId":"verify_backup_endpoint_v1_admin_backup__backup_id__verify_get","parameters":[{"name":"backup_id","in":"path","required":true,"schema":{"type":"string","title":"Backup Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/backup/upload":{"post":{"tags":["admin"],"summary":"Upload Backup","description":"Upload an external backup ZIP.","operationId":"upload_backup_v1_admin_backup_upload_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/admin/restore/{backup_id}":{"post":{"tags":["admin"],"summary":"Restore Backup","description":"Restore files from a backup. Send dry_run=true to preview changes.","operationId":"restore_backup_v1_admin_restore__backup_id__post","parameters":[{"name":"backup_id","in":"path","required":true,"schema":{"type":"string","title":"Backup Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/roles":{"get":{"tags":["admin"],"summary":"List Roles","description":"List all roles with their permission grids + role definitions.","operationId":"list_roles_v1_admin_roles_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["admin"],"summary":"Create Role","description":"Create a custom role, optionally cloning permissions from an existing role.","operationId":"create_role_v1_admin_roles_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/admin/roles/{role}/permissions":{"put":{"tags":["admin"],"summary":"Update Role Permissions","description":"Update permissions for a role. Admin only.","operationId":"update_role_permissions_v1_admin_roles__role__permissions_put","parameters":[{"name":"role","in":"path","required":true,"schema":{"type":"string","title":"Role"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/roles/{role_name}":{"delete":{"tags":["admin"],"summary":"Delete Role","description":"Delete a custom role. System roles cannot be deleted.","operationId":"delete_role_v1_admin_roles__role_name__delete","parameters":[{"name":"role_name","in":"path","required":true,"schema":{"type":"string","title":"Role Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/telemetry/scans":{"get":{"tags":["admin"],"summary":"List Telemetry Scans","description":"Paginated list of scan telemetry rows with filters.","operationId":"list_telemetry_scans_v1_admin_telemetry_scans_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Per Page"}},{"name":"domain","in":"query","required":false,"schema":{"type":"string","maxLength":255,"title":"Domain"}},{"name":"user_id","in":"query","required":false,"schema":{"type":"string","maxLength":36,"title":"User Id"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","maxLength":20,"title":"Status"}},{"name":"flagged_only","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Flagged Only"}},{"name":"from_date","in":"query","required":false,"schema":{"type":"string","description":"ISO date (YYYY-MM-DD)","title":"From Date"},"description":"ISO date (YYYY-MM-DD)"},{"name":"to_date","in":"query","required":false,"schema":{"type":"string","description":"ISO date (YYYY-MM-DD)","title":"To Date"},"description":"ISO date (YYYY-MM-DD)"},{"name":"app_version","in":"query","required":false,"schema":{"type":"string","maxLength":20,"title":"App Version"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/telemetry/trends":{"get":{"tags":["admin"],"summary":"Telemetry Trends","description":"Time series for a single domain — subs_discovered, WAF detected,\nquality score, duration over N days. Useful to spot gradual drift.","operationId":"telemetry_trends_v1_admin_telemetry_trends_get","parameters":[{"name":"domain","in":"query","required":true,"schema":{"type":"string","maxLength":255,"title":"Domain"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":90,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/telemetry/diff":{"get":{"tags":["admin"],"summary":"Telemetry Diff","description":"Structured diff between two scans of the (usually same) domain.\nSurfaces: subdomain set additions/removals, main WAF change, counter\ndeltas. This is the query that would have immediately caught the\nbanreservas sub-ranking regression post-CT-log introduction.","operationId":"telemetry_diff_v1_admin_telemetry_diff_get","parameters":[{"name":"from_scan","in":"query","required":true,"schema":{"type":"string","maxLength":36,"title":"From Scan"}},{"name":"to_scan","in":"query","required":true,"schema":{"type":"string","maxLength":36,"title":"To Scan"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/telemetry/export.csv":{"get":{"tags":["admin"],"summary":"Telemetry Export Csv","description":"CSV export of telemetry rows in the last N days. Useful for pulling\na snapshot into a spreadsheet / R / etc. outside the app.","operationId":"telemetry_export_csv_v1_admin_telemetry_export_csv_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Days"}},{"name":"domain","in":"query","required":false,"schema":{"type":"string","maxLength":255,"title":"Domain"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/digest/send-now":{"post":{"tags":["admin"],"summary":"Digest Send Now","description":"Manually trigger the daily digest — useful for smoke testing the\nscheduler after a deploy or previewing current-day activity. Admin-only.","operationId":"digest_send_now_v1_admin_digest_send_now_post","parameters":[{"name":"window_hours","in":"query","required":false,"schema":{"type":"integer","maximum":168,"minimum":1,"default":24,"title":"Window Hours"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/digest/preview":{"get":{"tags":["admin"],"summary":"Digest Preview","description":"Preview the digest WITHOUT sending email. `format=html` returns\nthe rendered HTML directly (open in browser to see the final email\nlook). `format=json` returns subject + plaintext + HTML + raw data.","operationId":"digest_preview_v1_admin_digest_preview_get","parameters":[{"name":"window_hours","in":"query","required":false,"schema":{"type":"integer","maximum":168,"minimum":1,"default":24,"title":"Window Hours"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","pattern":"^(json|html)$","default":"json","title":"Format"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/telemetry/backfill":{"post":{"tags":["admin"],"summary":"Telemetry Backfill","description":"One-shot backfill — iterate historical scans with a results_json\npayload, re-extract telemetry, upsert into scan_telemetry tables.\nIdempotent: safe to re-run after an extractor tweak. Bounded by\n`limit` to make the endpoint safe to call on large datasets.","operationId":"telemetry_backfill_v1_admin_telemetry_backfill_post","parameters":[{"name":"domain","in":"query","required":false,"schema":{"type":"string","maxLength":255,"description":"Only backfill this domain","title":"Domain"},"description":"Only backfill this domain"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":5000,"minimum":0,"description":"Cap total scans (0 = all)","default":0,"title":"Limit"},"description":"Cap total scans (0 = all)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/telemetry/anomalies":{"get":{"tags":["admin"],"summary":"Telemetry Anomalies","description":"List telemetry rows flagged for review in the last N days.\nConvenience filter — equivalent to /scans?flagged_only=true&from_date=...","operationId":"telemetry_anomalies_v1_admin_telemetry_anomalies_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":60,"minimum":1,"default":7,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/api-health":{"get":{"tags":["admin"],"summary":"Get Api Health","description":"Per-service connectivity + quota (where available).\n5-minute cached unless force_refresh=true.","operationId":"get_api_health_v1_admin_api_health_get","parameters":[{"name":"force_refresh","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Force Refresh"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Api Health V1 Admin Api Health Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/audit":{"get":{"tags":["audit"],"summary":"List Audit Events","description":"Paginated, filtered audit log.","operationId":"list_audit_events_v1_admin_audit_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Page Size"}},{"name":"action_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action Type"}},{"name":"actor_email","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actor Email"}},{"name":"target_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Type"}},{"name":"target_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Id"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Since"}},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Until"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Audit Events V1 Admin Audit Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/audit/actions":{"get":{"tags":["audit"],"summary":"List Action Types","description":"Distinct action_type values present in the audit log — feeds the\nUI filter dropdown so operators don't have to memorize the\nconstants from `auth/audit.py`.","operationId":"list_action_types_v1_admin_audit_actions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response List Action Types V1 Admin Audit Actions Get"}}}}}}},"/v1/admin/audit/export.csv":{"get":{"tags":["audit"],"summary":"Export Audit Csv","description":"CSV dump of the audit log for spreadsheet review.","operationId":"export_audit_csv_v1_admin_audit_export_csv_get","parameters":[{"name":"action_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action Type"}},{"name":"actor_email","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actor Email"}},{"name":"target_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Type"}},{"name":"target_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Id"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Since"}},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Until"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100000,"minimum":1,"default":10000,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/feedback":{"get":{"tags":["feedback"],"summary":"List Feedback","operationId":"list_feedback_v1_feedback_get","parameters":[{"name":"type_filter","in":"query","required":false,"schema":{"anyOf":[{"enum":["bug","feature","comment"],"type":"string"},{"type":"null"}],"title":"Type Filter"}},{"name":"status_filter","in":"query","required":false,"schema":{"anyOf":[{"enum":["open","in_progress","done","declined"],"type":"string"},{"type":"null"}],"title":"Status Filter"}},{"name":"sort_by","in":"query","required":false,"schema":{"enum":["votes","date"],"type":"string","default":"votes","title":"Sort By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FeedbackItem"},"title":"Response List Feedback V1 Feedback Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["feedback"],"summary":"Create Feedback","operationId":"create_feedback_v1_feedback_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/feedback/{feedback_id}/vote":{"post":{"tags":["feedback"],"summary":"Toggle Vote","operationId":"toggle_vote_v1_feedback__feedback_id__vote_post","parameters":[{"name":"feedback_id","in":"path","required":true,"schema":{"type":"string","title":"Feedback Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackVoteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/feedback/{feedback_id}/status":{"patch":{"tags":["feedback"],"summary":"Update Status","operationId":"update_status_v1_feedback__feedback_id__status_patch","parameters":[{"name":"feedback_id","in":"path","required":true,"schema":{"type":"string","title":"Feedback Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackStatusUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/platform/organizations":{"get":{"tags":["platform-admin"],"summary":"List Organizations","operationId":"list_organizations_v1_platform_organizations_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["platform-admin"],"summary":"Create Organization","operationId":"create_organization_v1_platform_organizations_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrgRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/platform/organizations/{org_id}":{"get":{"tags":["platform-admin"],"summary":"Get Organization","operationId":"get_organization_v1_platform_organizations__org_id__get","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["platform-admin"],"summary":"Update Organization","operationId":"update_organization_v1_platform_organizations__org_id__patch","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrgRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/platform/organizations/{org_id}/archive":{"post":{"tags":["platform-admin"],"summary":"Archive Organization","operationId":"archive_organization_v1_platform_organizations__org_id__archive_post","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/platform/organizations/{org_id}/users":{"get":{"tags":["platform-admin"],"summary":"List Org Users","operationId":"list_org_users_v1_platform_organizations__org_id__users_get","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["platform-admin"],"summary":"Add User To Org","operationId":"add_user_to_org_v1_platform_organizations__org_id__users_post","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteUserRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/platform/organizations/{org_id}/users/{user_id}":{"patch":{"tags":["platform-admin"],"summary":"Update Org User","operationId":"update_org_user_v1_platform_organizations__org_id__users__user_id__patch","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMemberRoleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/platform/organizations/{org_id}/config":{"get":{"tags":["platform-admin"],"summary":"Get Org Config","operationId":"get_org_config_v1_platform_organizations__org_id__config_get","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["platform-admin"],"summary":"Update Org Config","operationId":"update_org_config_v1_platform_organizations__org_id__config_put","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTenantConfigRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/platform/analytics":{"get":{"tags":["platform-admin"],"summary":"Platform Analytics","operationId":"platform_analytics_v1_platform_analytics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/platform/switch-tenant":{"post":{"tags":["platform-admin"],"summary":"Switch Tenant","description":"Switch the platform admin's active tenant context. Returns a new access token.","operationId":"switch_tenant_v1_platform_switch_tenant_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SwitchTenantRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/platform/organizations/{org_id}/invite":{"post":{"tags":["platform-admin"],"summary":"Invite To Org","description":"Generate a tenant invite link. Recipient creates account in the specified org.","operationId":"invite_to_org_v1_platform_organizations__org_id__invite_post","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/prospector__admin__platform_router__TenantInviteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/platform/impersonate/start":{"post":{"tags":["platform-admin"],"summary":"Start Impersonation","operationId":"start_impersonation_v1_platform_impersonate_start_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartImpersonationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/platform/impersonate/stop":{"post":{"tags":["platform-admin"],"summary":"Stop Impersonation","operationId":"stop_impersonation_v1_platform_impersonate_stop_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/tenant/settings":{"get":{"tags":["tenant-admin"],"summary":"Get Tenant Settings","operationId":"get_tenant_settings_v1_tenant_settings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/tenant/settings/branding":{"patch":{"tags":["tenant-admin"],"summary":"Update Branding","operationId":"update_branding_v1_tenant_settings_branding_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBrandingRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenant/settings/features":{"patch":{"tags":["tenant-admin"],"summary":"Update Features","operationId":"update_features_v1_tenant_settings_features_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFeaturesRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenant/users":{"get":{"tags":["tenant-admin"],"summary":"List Tenant Users","operationId":"list_tenant_users_v1_tenant_users_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/tenant/users/invite":{"post":{"tags":["tenant-admin"],"summary":"Invite Tenant User","operationId":"invite_tenant_user_v1_tenant_users_invite_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/prospector__admin__tenant_router__TenantInviteRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenant/users/{user_id}/role":{"patch":{"tags":["tenant-admin"],"summary":"Update Tenant User Role","operationId":"update_tenant_user_role_v1_tenant_users__user_id__role_patch","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantUpdateRoleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenant/analytics":{"get":{"tags":["tenant-admin"],"summary":"Tenant Analytics","operationId":"tenant_analytics_v1_tenant_analytics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/tenant/config/{namespace}":{"get":{"tags":["tenant-admin"],"summary":"Get Tenant Config Document","description":"Effective document for a namespace (tenant override or platform default)\nplus the override's version for optimistic-lock on save.","operationId":"get_tenant_config_document_v1_tenant_config__namespace__get","parameters":[{"name":"namespace","in":"path","required":true,"schema":{"type":"string","title":"Namespace"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["tenant-admin"],"summary":"Put Tenant Config Document","description":"Create/replace the tenant's document for a namespace (optimistic-lock).","operationId":"put_tenant_config_document_v1_tenant_config__namespace__put","parameters":[{"name":"namespace","in":"path","required":true,"schema":{"type":"string","title":"Namespace"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutConfigRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenant/entitlements":{"get":{"tags":["tenant-admin"],"summary":"Get Tenant Entitlements","operationId":"get_tenant_entitlements_v1_tenant_entitlements_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"patch":{"tags":["tenant-admin"],"summary":"Update Tenant Entitlements","description":"Set the org's module entitlement overlay (add/remove on top of plan).\nChanging the base plan itself is a platform_admin action.","operationId":"update_tenant_entitlements_v1_tenant_entitlements_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntitlementsUpdateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/health":{"get":{"summary":"Health Check","operationId":"health_check_v1_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}},"/v1/verticals":{"get":{"summary":"List Verticals Api","description":"List registered prospecting verticals. Used by the dashboard\ndropdown so new verticals appear without UI changes.","operationId":"list_verticals_api_v1_verticals_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/catalog":{"get":{"summary":"Get Catalog","operationId":"get_catalog_v1_catalog_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/competitors":{"get":{"summary":"List Competitors","description":"List all available competitors for battle card comparison.","operationId":"list_competitors_v1_competitors_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/insurance/brokers":{"get":{"summary":"List Insurance Brokers","description":"List all fictional broker battle cards for the insurance vertical.\n\nOptional `incumbent` query param: a name string from\n`broker_incumbent_infer.inferred_broker`. When provided, the\nresponse includes `incumbent_match`: the broker_id of the card\nthat best matches, or `null` when no fictional card matches the\nreal-world incumbent name. The UI uses this to pre-select the\nincumbent for comparison.\n\nData is loaded from `verticals/insurance/data/brokers.json` — the\nsame file the admin panel CRUDs. Categories are returned as\nstructured objects (id, label, description) so the UI doesn't have\nto hardcode the dimension set.","operationId":"list_insurance_brokers_v1_insurance_brokers_get","parameters":[{"name":"incumbent","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Incumbent"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/insurance/brokers":{"get":{"summary":"Admin Get Insurance Brokers","description":"Admin: return the full broker catalog including operational notes\n(which are stripped from the public /v1/insurance/brokers endpoint).\nUsed by the admin panel to render the editable form.","operationId":"admin_get_insurance_brokers_v1_admin_insurance_brokers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"put":{"summary":"Admin Update Insurance Brokers","description":"Admin: overwrite brokers.json with the supplied catalog. Validates\nshape via `_load_catalog` then atomically writes to disk + invalidates\nthe in-memory cache.","operationId":"admin_update_insurance_brokers_v1_admin_insurance_brokers_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/_BrokersCatalogUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scan":{"post":{"summary":"Create Scan","operationId":"create_scan_v1_scan_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScanRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScanResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scan/batch":{"post":{"summary":"Create Batch Scan","description":"Create scans for multiple domains. Admin only. Max 20 domains. Skips invalid domains.\n\nA batch scan is the same scan as ``POST /v1/scan``, just repeated — so it\nmust resolve the tenant's vertical and attach each scan to its Account\nexactly like the single endpoint. It used to hardcode ``cybersec`` and\nleave ``account_id`` null, which meant a batch launched from a tech_b2b\norg silently produced dormant-vertical output (dns/waf/fingerprint, no\nfinancials) that never merged into the account it was meant to refresh.","operationId":"create_batch_scan_v1_scan_batch_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchScanRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchScanResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scan/{scan_id}":{"get":{"summary":"Get Scan","operationId":"get_scan_v1_scan__scan_id__get","parameters":[{"name":"scan_id","in":"path","required":true,"schema":{"type":"string","title":"Scan Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScanDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Scan","operationId":"delete_scan_v1_scan__scan_id__delete","parameters":[{"name":"scan_id","in":"path","required":true,"schema":{"type":"string","title":"Scan Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/account-overview/{domain}":{"get":{"summary":"Get Account Overview Legacy","description":"Domain-only Account-Overview endpoint — kept for back-compat with\nSprint 1+2 UI. New callers should use /v1/account-overview with\nquery params (see Sprint 3).","operationId":"get_account_overview_legacy_v1_account_overview__domain__get","parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string","title":"Domain"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/account-overview":{"get":{"summary":"Get Account Overview","description":"Account-Overview snapshot — supports DOMAIN and FISCAL_ID subjects.\n\nUsage:\n    /v1/account-overview?subject_type=domain&identifier=acme.com\n    /v1/account-overview?subject_type=fiscal_id&identifier=BBV840731LJ7\n                          &country=mx&name=BBVA+Bancomer\n\n`name` is required for FISCAL_ID subjects when DENUE / GLEIF / Apollo\nenrichment is desired — none of those APIs accept an RFC directly.\n\nReturns a single JSON payload combining all enabled scanners' output.\nIndependent of the persisted scan pipeline (no scan record is created).","operationId":"get_account_overview_v1_account_overview_get","parameters":[{"name":"subject_type","in":"query","required":false,"schema":{"type":"string","default":"domain","title":"Subject Type"}},{"name":"identifier","in":"query","required":false,"schema":{"type":"string","default":"","title":"Identifier"}},{"name":"country","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/account-overview":{"get":{"summary":"Account Overview Page","description":"Standalone Account-Overview page — takes ?domain= as query param.\n\nRETIRED for SDI tenants (admin gap analysis S3): it re-fetched data the\nscan persists and asked the user to type the domain twice (the VISION.md\nantipattern). Its unique blocks (OFAC / SAT 69-69-B) are P1 fields on the\naccount page now. Non-SDI verticals keep it as a lookup utility.","operationId":"account_overview_page_account_overview_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/v1/search/companies":{"get":{"summary":"Search Companies","description":"Typeahead company search for the scan form.\n\nSearches EDGAR tickers (US public companies) by name and the user's\npast scan history. Returns a list of suggestions with domain hints.","operationId":"search_companies_v1_search_companies_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":8,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/me/permissions":{"get":{"summary":"Get My Permissions","description":"Return the current user's role metadata and scan scope.","operationId":"get_my_permissions_v1_me_permissions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/entities/search":{"get":{"summary":"Search Entities Endpoint","description":"Entity autocomplete for the SDI 'Start a new account' form. Merges\nGLEIF (global) + SFC (Colombia) + NAIC (US) so the SDR pins the right legal\nentity (e.g. AXA global vs AXA Colpatria) instead of relying on brand match.\n``domain`` (the form's website field) feeds the duplicate-account check;\n``existing_account`` is returned when the org already has this account.","operationId":"search_entities_endpoint_v1_entities_search_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","title":"Q"}},{"name":"country","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/me/tenant":{"get":{"summary":"Get My Tenant","description":"Return the current user's tenant context (org, vertical, methodology, branding).","operationId":"get_my_tenant_v1_me_tenant_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/engagement-process":{"get":{"summary":"Get Engagement Process","description":"Resolved Customer Engagement Process for the current user's org + vertical\n(tenant override → platform default). Read-only; available to any member so a\nrep can see the playbook (the admin editor under /admin/tenant-config edits it).","operationId":"get_engagement_process_v1_engagement_process_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/me/modules":{"get":{"summary":"Get My Modules","description":"SDI product map for the current org: plan + per-module state\n(active / coming_soon / locked). Drives the nav module map.","operationId":"get_my_modules_v1_me_modules_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/releases":{"get":{"summary":"List Releases","description":"Return all release notes sorted newest-first.","operationId":"list_releases_v1_releases_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/releases/unseen":{"get":{"summary":"Get Unseen Releases","description":"Return releases the current user hasn't acknowledged yet.","operationId":"get_unseen_releases_v1_releases_unseen_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/releases/ack":{"post":{"summary":"Ack Release","description":"Mark a release version as seen by the current user.","operationId":"ack_release_v1_releases_ack_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/_AckReleaseRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scan/{scan_id}/feedback":{"post":{"summary":"Submit Report Feedback","description":"Record a user's rating/comment for a specific scan report.\n\nRating or a comment (one of the two) must be present. Metadata like\napp_version, report_version, llm_model, url_path, user_agent are\ncaptured server-side for later investigation.","operationId":"submit_report_feedback_v1_scan__scan_id__feedback_post","parameters":[{"name":"scan_id","in":"path","required":true,"schema":{"type":"string","title":"Scan Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/_ReportFeedbackRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/team-members":{"get":{"summary":"Get Team Members","description":"Return team members visible to the current user (for team filter dropdown).","operationId":"get_team_members_v1_team_members_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/scans":{"get":{"summary":"List Scans","operationId":"list_scans_v1_scans_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Per Page"}},{"name":"search","in":"query","required":false,"schema":{"type":"string","maxLength":100,"default":"","title":"Search"}},{"name":"status_filter","in":"query","required":false,"schema":{"type":"string","maxLength":20,"default":"","title":"Status Filter"}},{"name":"sort_by","in":"query","required":false,"schema":{"type":"string","pattern":"^(created_at|domain|status)$","default":"created_at","title":"Sort By"}},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","default":"desc","title":"Sort Order"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":100,"default":"","title":"Cursor"}},{"name":"scope","in":"query","required":false,"schema":{"type":"string","pattern":"^(own|team)$","default":"own","title":"Scope"}},{"name":"user_ids","in":"query","required":false,"schema":{"type":"string","maxLength":2000,"default":"","title":"User Ids"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scans/cleanup":{"delete":{"summary":"Cleanup Scans","operationId":"cleanup_scans_v1_scans_cleanup_delete","parameters":[{"name":"older_than_days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Older Than Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scan/{scan_id}/retry":{"post":{"summary":"Retry Scan Modules","operationId":"retry_scan_modules_v1_scan__scan_id__retry_post","parameters":[{"name":"scan_id","in":"path","required":true,"schema":{"type":"string","title":"Scan Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RetryModulesRequest"},{"type":"null"}],"title":"Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetryModulesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scan/{scan_id}/refresh-report":{"post":{"summary":"Refresh Report","description":"Regenerate report using stored results_json with the latest template.","operationId":"refresh_report_v1_scan__scan_id__refresh_report_post","parameters":[{"name":"scan_id","in":"path","required":true,"schema":{"type":"string","title":"Scan Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scan/{scan_id}/recalculate-plan":{"post":{"summary":"Recalculate Plan","description":"Recalculate plan recommendation using latest catalog plan_driving_triggers.\n\nAlso re-runs LLM-based financial institution classification to detect\nbanks that keyword matching missed (e.g. chase.com, bofa.com).","operationId":"recalculate_plan_v1_scan__scan_id__recalculate_plan_post","parameters":[{"name":"scan_id","in":"path","required":true,"schema":{"type":"string","title":"Scan Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scan/{scan_id}/download":{"get":{"summary":"Download Report","operationId":"download_report_v1_scan__scan_id__download_get","parameters":[{"name":"scan_id","in":"path","required":true,"schema":{"type":"string","title":"Scan Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scan/{scan_id}/pdf":{"get":{"summary":"Download Scan Pdf","description":"Generate and download a PDF report for a completed scan.","operationId":"download_scan_pdf_v1_scan__scan_id__pdf_get","parameters":[{"name":"scan_id","in":"path","required":true,"schema":{"type":"string","title":"Scan Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scan/{scan_id}/deal-context":{"put":{"summary":"Update Deal Context","description":"Update deal context (competitors, notes, stage) for a scan.","operationId":"update_deal_context_v1_scan__scan_id__deal_context_put","parameters":[{"name":"scan_id","in":"path","required":true,"schema":{"type":"string","title":"Scan Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealContextUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"Get Deal Context","description":"Get deal context for a scan.","operationId":"get_deal_context_v1_scan__scan_id__deal_context_get","parameters":[{"name":"scan_id","in":"path","required":true,"schema":{"type":"string","title":"Scan Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scan/{scan_id}/briefing":{"post":{"summary":"Generate Briefing","description":"Generate a pre-call briefing from scan intelligence + deal context.\n\nDispatches by vertical:\n- cybersec → Force Management CoM-framework briefing (trap questions,\n  value drivers, proof points). Reads `modules.com_framework` etc.\n- tech_b2b → Engineering-peer briefing built from the persisted\n  executive_brief + locked categories + Apollo decision-makers.\n  No \"trap question\" / \"value driver\" language — US tech buyers\n  read that as SaaS-cliché bullshit. Honors the operator's lock-in.\n- Other verticals (insurance, etc.) → 400 (not wired yet).","operationId":"generate_briefing_v1_scan__scan_id__briefing_post","parameters":[{"name":"scan_id","in":"path","required":true,"schema":{"type":"string","title":"Scan Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scan/{scan_id}/regenerate-brief":{"post":{"summary":"Regenerate Executive Brief","description":"Re-run the tech_b2b executive brief honoring the operator's\ndeal_context lock-in. The original brief written at scan time is\nauto-ranked (no lock-in yet); this endpoint lets the SDR refresh\nthe brief after picking a focus on the Conversation tab.\n\nPersists the new brief into `results_json.executive_brief` so the\nnext page load shows the updated talking_points + priority_action\nanchored on the locked categories.","operationId":"regenerate_executive_brief_v1_scan__scan_id__regenerate_brief_post","parameters":[{"name":"scan_id","in":"path","required":true,"schema":{"type":"string","title":"Scan Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scan/{scan_id}/coaching":{"post":{"summary":"Generate Coaching","description":"Generate deal coaching based on rep's notes + scan intelligence.\n\nDispatches by vertical:\n- cybersec → Force Management CoM coaching (value driver, trap\n  question, proof point). Reads `modules.com_framework`.\n- tech_b2b → Engineering-peer coaching (decision-makers + locked\n  categories + signals). NO trap-question / value-driver language.\n- Other verticals → 400.\n\nSecurity: previously used raw `select(Scan).where(...)` which\nbypassed the role-permission scope check — any authenticated user\ncould request coaching for anyone's scan. Now uses\n`get_scan_for_user` to enforce the same RBAC scope as other\nscan-bound endpoints.","operationId":"generate_coaching_v1_scan__scan_id__coaching_post","parameters":[{"name":"scan_id","in":"path","required":true,"schema":{"type":"string","title":"Scan Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scan/{scan_id}/compare":{"post":{"summary":"Compare Competitors","description":"Generate battle card comparisons for selected competitors.","operationId":"compare_competitors_v1_scan__scan_id__compare_post","parameters":[{"name":"scan_id","in":"path","required":true,"schema":{"type":"string","title":"Scan Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompareRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/scan/{scan_id}/outreach":{"post":{"summary":"Generate Outreach","operationId":"generate_outreach_v1_scan__scan_id__outreach_post","parameters":[{"name":"scan_id","in":"path","required":true,"schema":{"type":"string","title":"Scan Id"}},{"name":"outreach_type","in":"query","required":false,"schema":{"type":"string","pattern":"^(whatsapp|email_single|email_sequence|whatsapp_executive|email_formal|email_sequence_technical|linkedin_message|technical_email|executive_email|technical_email_sequence|security_email)$","default":"whatsapp","title":"Outreach Type"}},{"name":"language","in":"query","required":false,"schema":{"type":"string","pattern":"^(auto|es|en|pt)$","default":"auto","title":"Language"}},{"name":"tone","in":"query","required":false,"schema":{"type":"string","pattern":"^(formal|conversational|direct)$","default":"formal","title":"Tone"}},{"name":"play_id","in":"query","required":false,"schema":{"type":"string","title":"Play Id"}},{"name":"buyer_role","in":"query","required":false,"schema":{"type":"string","pattern":"^(INSURANCE_OWNER|RISK|CFO|CEO|CHRO|COO|GC|PROCUREMENT|OTHER|CTO|VP_ENG|CISO|CIO|REVOPS)$","title":"Buyer Role"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/":{"get":{"summary":"Index","operationId":"index__get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/login":{"get":{"summary":"Login Page","operationId":"login_page_login_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/forgot-password":{"get":{"summary":"Forgot Password Page","operationId":"forgot_password_page_forgot_password_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/change-password":{"get":{"summary":"Change Password Page","operationId":"change_password_page_change_password_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/dashboard":{"get":{"summary":"Dashboard Page","operationId":"dashboard_page_dashboard_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/scan/{scan_id}":{"get":{"summary":"Scan Result Page","operationId":"scan_result_page_scan__scan_id__get","parameters":[{"name":"scan_id","in":"path","required":true,"schema":{"type":"string","title":"Scan Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accept-invitation":{"get":{"summary":"Accept Invitation Page","operationId":"accept_invitation_page_accept_invitation_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/magic-invite":{"get":{"summary":"Magic Invite Page","operationId":"magic_invite_page_magic_invite_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/tenant-invite":{"get":{"summary":"Tenant Invite Page","operationId":"tenant_invite_page_tenant_invite_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/feedback":{"get":{"summary":"Feedback Page","operationId":"feedback_page_feedback_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/engagement-process":{"get":{"summary":"Engagement Process Page","description":"Read-only playbook view of the tenant's configured engagement process.","operationId":"engagement_process_page_engagement_process_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/releases":{"get":{"summary":"Releases Page","operationId":"releases_page_releases_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/platform":{"get":{"summary":"Platform Page","operationId":"platform_page_platform_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/platform/organizations/{slug}":{"get":{"summary":"Platform Org Detail Page","operationId":"platform_org_detail_page_platform_organizations__slug__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/tenant":{"get":{"summary":"Tenant Settings Page","operationId":"tenant_settings_page_admin_tenant_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/admin/dashboard":{"get":{"summary":"Admin Dashboard Page","operationId":"admin_dashboard_page_admin_dashboard_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/admin/users":{"get":{"summary":"Admin Users Page","operationId":"admin_users_page_admin_users_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/admin/report-feedback":{"get":{"summary":"Admin Report Feedback Page","operationId":"admin_report_feedback_page_admin_report_feedback_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/admin/plays":{"get":{"summary":"Admin Plays Page","operationId":"admin_plays_page_admin_plays_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/admin/outreach-prompts":{"get":{"summary":"Admin Outreach Prompts Page","operationId":"admin_outreach_prompts_page_admin_outreach_prompts_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/admin/knowledge-base":{"get":{"summary":"Admin Knowledge Base Page","operationId":"admin_knowledge_base_page_admin_knowledge_base_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/admin/catalog":{"get":{"summary":"Admin Catalog Page","operationId":"admin_catalog_page_admin_catalog_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/admin/differentiators":{"get":{"summary":"Admin Differentiators Page","operationId":"admin_differentiators_page_admin_differentiators_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/admin/tenant-config":{"get":{"summary":"Admin Tenant Config Page","operationId":"admin_tenant_config_page_admin_tenant_config_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/admin/value-cards":{"get":{"summary":"Admin Value Cards Page","operationId":"admin_value_cards_page_admin_value_cards_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/admin/backups":{"get":{"summary":"Admin Backups Page","operationId":"admin_backups_page_admin_backups_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/admin/roles":{"get":{"summary":"Admin Roles Page","operationId":"admin_roles_page_admin_roles_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/admin/audit":{"get":{"summary":"Admin Audit Page","operationId":"admin_audit_page_admin_audit_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}}},"components":{"schemas":{"AcceptInvitationRequest":{"properties":{"token":{"type":"string","minLength":10,"title":"Token"},"password":{"type":"string","maxLength":128,"minLength":8,"title":"Password"}},"type":"object","required":["token","password"],"title":"AcceptInvitationRequest"},"AcceptMagicInviteRequest":{"properties":{"token":{"type":"string","minLength":10,"title":"Token"},"email":{"type":"string","format":"email","title":"Email"},"full_name":{"type":"string","maxLength":255,"minLength":1,"title":"Full Name"},"password":{"type":"string","maxLength":128,"minLength":8,"title":"Password"}},"type":"object","required":["token","email","full_name","password"],"title":"AcceptMagicInviteRequest"},"BatchScanRequest":{"properties":{"domains":{"items":{"type":"string"},"type":"array","maxItems":20,"minItems":1,"title":"Domains"},"include_buying_signals":{"type":"boolean","title":"Include Buying Signals","default":true}},"type":"object","required":["domains"],"title":"BatchScanRequest"},"BatchScanResponse":{"properties":{"scans":{"items":{"$ref":"#/components/schemas/ScanResponse"},"type":"array","title":"Scans"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["scans","count"],"title":"BatchScanResponse"},"BulkDeleteRequest":{"properties":{"scan_ids":{"items":{"type":"string"},"type":"array","maxItems":100,"minItems":1,"title":"Scan Ids"}},"type":"object","required":["scan_ids"],"title":"BulkDeleteRequest"},"ChangePasswordRequest":{"properties":{"current_password":{"type":"string","maxLength":128,"minLength":1,"title":"Current Password"},"new_password":{"type":"string","maxLength":128,"minLength":8,"title":"New Password"}},"type":"object","required":["current_password","new_password"],"title":"ChangePasswordRequest"},"CompareRequest":{"properties":{"competitor_ids":{"items":{"type":"string"},"type":"array","maxItems":6,"minItems":1,"title":"Competitor Ids"},"product_filter":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Product Filter"},"enrich_with_llm":{"type":"boolean","title":"Enrich With Llm","default":false}},"type":"object","required":["competitor_ids"],"title":"CompareRequest"},"CreateOrgRequest":{"properties":{"slug":{"type":"string","maxLength":50,"minLength":2,"pattern":"^[a-z0-9\\-]+$","title":"Slug"},"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"vertical_id":{"type":"string","maxLength":50,"minLength":1,"title":"Vertical Id"},"methodology_id":{"type":"string","maxLength":50,"minLength":1,"title":"Methodology Id"},"plan":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Plan"}},"type":"object","required":["slug","name","vertical_id","methodology_id"],"title":"CreateOrgRequest"},"CreateUserRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"full_name":{"type":"string","maxLength":255,"minLength":1,"title":"Full Name"},"password":{"anyOf":[{"type":"string","maxLength":128,"minLength":8},{"type":"null"}],"title":"Password"},"role":{"type":"string","maxLength":30,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Role","default":"sales_rep"},"supervisor_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supervisor Id"}},"type":"object","required":["email","full_name"],"title":"CreateUserRequest"},"DealContextUpdate":{"properties":{"competitors":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Competitors"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"stage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stage"},"selected_recommendation_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Selected Recommendation Ids"}},"type":"object","title":"DealContextUpdate"},"EntitlementsUpdateRequest":{"properties":{"add":{"items":{"type":"string"},"type":"array","title":"Add"},"remove":{"items":{"type":"string"},"type":"array","title":"Remove"}},"type":"object","title":"EntitlementsUpdateRequest"},"FeedbackCreate":{"properties":{"title":{"type":"string","maxLength":255,"title":"Title"},"description":{"type":"string","maxLength":2000,"title":"Description"},"type":{"type":"string","enum":["bug","feature","comment"],"title":"Type"}},"type":"object","required":["title","description","type"],"title":"FeedbackCreate"},"FeedbackItem":{"properties":{"id":{"type":"string","title":"Id"},"title":{"type":"string","title":"Title"},"description":{"type":"string","title":"Description"},"type":{"type":"string","title":"Type"},"status":{"type":"string","title":"Status"},"votes_count":{"type":"integer","title":"Votes Count"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"user_voted":{"type":"boolean","title":"User Voted"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"user_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Email"}},"type":"object","required":["id","title","description","type","status","votes_count","created_at","user_voted"],"title":"FeedbackItem"},"FeedbackStatusUpdate":{"properties":{"status":{"type":"string","enum":["open","in_progress","done","declined"],"title":"Status"}},"type":"object","required":["status"],"title":"FeedbackStatusUpdate"},"FeedbackVoteResponse":{"properties":{"voted":{"type":"boolean","title":"Voted"},"votes_count":{"type":"integer","title":"Votes Count"}},"type":"object","required":["voted","votes_count"],"title":"FeedbackVoteResponse"},"FieldEditBatchRequest":{"properties":{"edits":{"items":{"$ref":"#/components/schemas/FieldEditRequest"},"type":"array","title":"Edits"}},"type":"object","required":["edits"],"title":"FieldEditBatchRequest"},"FieldEditRequest":{"properties":{"panel_id":{"type":"string","title":"Panel Id"},"field_key":{"type":"string","title":"Field Key"},"value":{"title":"Value"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"locked":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Locked"}},"type":"object","required":["panel_id","field_key","value"],"title":"FieldEditRequest"},"ForgotPasswordRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"ForgotPasswordRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthResponse":{"properties":{"status":{"type":"string","title":"Status"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"db_ok":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Db Ok"},"dns_ok":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Dns Ok"}},"type":"object","required":["status"],"title":"HealthResponse"},"InviteUserRequest":{"properties":{"email":{"type":"string","title":"Email"},"full_name":{"type":"string","title":"Full Name"},"role":{"type":"string","title":"Role","default":"sales_rep"}},"type":"object","required":["email","full_name"],"title":"InviteUserRequest"},"LoginRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","maxLength":128,"minLength":1,"title":"Password"}},"type":"object","required":["email","password"],"title":"LoginRequest"},"P8LineEditRequest":{"properties":{"fy":{"type":"integer","title":"Fy"},"line_key":{"type":"string","title":"Line Key"},"value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"source_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Note"}},"type":"object","required":["fy","line_key"],"title":"P8LineEditRequest","description":"Human entry for one P8 statement line (audit A7). ``value`` is in\nabsolute statement-currency units; ``None`` clears the user entry and\nrestores whatever the scanners had.\n\n``source_note`` is where the figure came from — \"the CFO said so on the\n12-Jun call\", \"page 34 of the 2024 annual report\". It is REQUIRED when\nsetting a value (`G3.7`) and ignored when clearing. The reason it is\nmandatory rather than encouraged: an AE-entered figure outranks a located\ndocument in this product's precedence order, and the AE is not neutral\nabout the numbers that underpin their own business case. Evidence that\ncannot be checked is not evidence, so an unattributable figure is refused\nrather than stored and quietly trusted."},"PaginatedResponse":{"properties":{"items":{"items":{},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"per_page":{"type":"integer","title":"Per Page"},"pages":{"type":"integer","title":"Pages"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"has_more":{"type":"boolean","title":"Has More","default":false}},"type":"object","required":["items","total","page","per_page","pages"],"title":"PaginatedResponse"},"PendingUpdateResolveRequest":{"properties":{"action":{"type":"string","title":"Action"},"edits":{"items":{"$ref":"#/components/schemas/PendingUpdateTarget"},"type":"array","title":"Edits"}},"type":"object","required":["action"],"title":"PendingUpdateResolveRequest"},"PendingUpdateTarget":{"properties":{"panel_id":{"type":"string","title":"Panel Id"},"field_key":{"type":"string","title":"Field Key"}},"type":"object","required":["panel_id","field_key"],"title":"PendingUpdateTarget"},"PutConfigRequest":{"properties":{"payload":{"additionalProperties":true,"type":"object","title":"Payload"},"expected_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expected Version"}},"type":"object","required":["payload"],"title":"PutConfigRequest"},"RefreshRequest":{"properties":{"refresh_token":{"type":"string","title":"Refresh Token"}},"type":"object","required":["refresh_token"],"title":"RefreshRequest"},"RefreshResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"refresh_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refresh Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"},"expires_in":{"type":"integer","title":"Expires In"}},"type":"object","required":["access_token","expires_in"],"title":"RefreshResponse"},"ResetPasswordRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"otp_code":{"type":"string","maxLength":6,"minLength":6,"pattern":"^\\d{6}$","title":"Otp Code"},"new_password":{"type":"string","maxLength":128,"minLength":8,"title":"New Password"}},"type":"object","required":["email","otp_code","new_password"],"title":"ResetPasswordRequest"},"RetryModulesRequest":{"properties":{"modules":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Modules"}},"type":"object","title":"RetryModulesRequest"},"RetryModulesResponse":{"properties":{"scan_id":{"type":"string","title":"Scan Id"},"status":{"type":"string","title":"Status"},"retrying_modules":{"items":{"type":"string"},"type":"array","title":"Retrying Modules"}},"type":"object","required":["scan_id","status","retrying_modules"],"title":"RetryModulesResponse"},"ScanDetailResponse":{"properties":{"id":{"type":"string","title":"Id"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain"},"status":{"type":"string","title":"Status"},"results_json":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Results Json"},"report_md":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Report Md"},"report_version":{"type":"integer","title":"Report Version","default":1},"deal_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deal Context"},"progress_step":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Progress Step"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Id"},"account_fields":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Fields"},"pending_corrections":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Pending Corrections","default":[]}},"type":"object","required":["id","status","started_at","created_at"],"title":"ScanDetailResponse"},"ScanRequest":{"properties":{"subject_type":{"anyOf":[{"$ref":"#/components/schemas/SubjectType"},{"type":"null"}]},"subject_identifier":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"null"}],"title":"Subject Identifier"},"country":{"anyOf":[{"type":"string","maxLength":2,"minLength":2},{"type":"null"}],"title":"Country"},"vertical":{"anyOf":[{"type":"string","maxLength":40,"minLength":1},{"type":"null"}],"title":"Vertical"},"domain":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"null"}],"title":"Domain"},"include_buying_signals":{"type":"boolean","title":"Include Buying Signals","default":true},"allow_direct_probe":{"type":"boolean","title":"Allow Direct Probe","default":false},"rescan_existing":{"type":"boolean","title":"Rescan Existing","default":false},"deal_type":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Deal Type"},"role_owner":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Role Owner"},"account_name":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Account Name"},"entity_ref":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Entity Ref"}},"type":"object","title":"ScanRequest"},"ScanResponse":{"properties":{"scan_id":{"type":"string","title":"Scan Id"},"status":{"type":"string","title":"Status"},"account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Id"},"account_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Name"},"is_rescan":{"type":"boolean","title":"Is Rescan","default":false}},"type":"object","required":["scan_id","status"],"title":"ScanResponse"},"SelectSourceRequest":{"properties":{"source":{"type":"string","title":"Source"}},"type":"object","required":["source"],"title":"SelectSourceRequest"},"StageAdvanceRequest":{"properties":{"to_stage":{"type":"string","title":"To Stage"},"override":{"type":"boolean","title":"Override","default":false},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["to_stage"],"title":"StageAdvanceRequest"},"StanceRequest":{"properties":{"stance":{"type":"string","title":"Stance"},"validated":{"type":"boolean","title":"Validated","default":true}},"type":"object","required":["stance"],"title":"StanceRequest"},"StartImpersonationRequest":{"properties":{"user_id":{"type":"string","title":"User Id"},"reason":{"type":"string","maxLength":500,"minLength":5,"title":"Reason"}},"type":"object","required":["user_id","reason"],"title":"StartImpersonationRequest"},"SubjectType":{"type":"string","enum":["domain","fiscal_id","person","policy"],"title":"SubjectType"},"SwitchTenantRequest":{"properties":{"org_id":{"type":"string","title":"Org Id"}},"type":"object","required":["org_id"],"title":"SwitchTenantRequest"},"TenantUpdateRoleRequest":{"properties":{"role":{"type":"string","title":"Role"}},"type":"object","required":["role"],"title":"TenantUpdateRoleRequest"},"TokenResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"refresh_token":{"type":"string","title":"Refresh Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"},"expires_in":{"type":"integer","title":"Expires In"}},"type":"object","required":["access_token","refresh_token","expires_in"],"title":"TokenResponse"},"UpdateBrandingRequest":{"properties":{"app_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"App Name"},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Url"},"primary_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Color"}},"type":"object","title":"UpdateBrandingRequest"},"UpdateFeaturesRequest":{"properties":{"enable_outreach":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enable Outreach"},"enable_coaching":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enable Coaching"},"max_scans_per_day":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Scans Per Day"},"debug_provenance":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Debug Provenance"},"entity_pin_strict":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Entity Pin Strict"}},"type":"object","title":"UpdateFeaturesRequest"},"UpdateMemberRoleRequest":{"properties":{"role":{"type":"string","title":"Role"}},"type":"object","required":["role"],"title":"UpdateMemberRoleRequest"},"UpdateOrgRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"vertical_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vertical Id"},"methodology_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Methodology Id"},"plan":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Plan"}},"type":"object","title":"UpdateOrgRequest"},"UpdateTenantConfigRequest":{"properties":{"branding":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Branding"},"feature_flags":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Feature Flags"},"catalog_overrides":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Catalog Overrides"},"prompt_overrides":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Prompt Overrides"}},"type":"object","title":"UpdateTenantConfigRequest"},"UpdateUserRequest":{"properties":{"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"role":{"anyOf":[{"type":"string","maxLength":30,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$"},{"type":"null"}],"title":"Role"},"full_name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Full Name"},"supervisor_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supervisor Id"}},"type":"object","title":"UpdateUserRequest"},"UserResponse":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"full_name":{"type":"string","title":"Full Name"},"role":{"type":"string","title":"Role"},"is_active":{"type":"boolean","title":"Is Active"},"is_platform_admin":{"type":"boolean","title":"Is Platform Admin","default":false},"supervisor_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supervisor Id"},"supervisor_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supervisor Name"},"organizations":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Organizations"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_login":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Login"}},"type":"object","required":["id","email","full_name","role","is_active","created_at"],"title":"UserResponse"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"_AckReleaseRequest":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"}},"type":"object","title":"_AckReleaseRequest"},"_BrokersCatalogUpdate":{"properties":{"categories":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Categories"},"brokers":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Brokers"}},"type":"object","required":["categories","brokers"],"title":"_BrokersCatalogUpdate"},"_ReportFeedbackRequest":{"properties":{"rating":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Rating"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"comment":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Comment"},"report_section":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Report Section"}},"type":"object","title":"_ReportFeedbackRequest"},"prospector__admin__platform_router__TenantInviteRequest":{"properties":{"email":{"type":"string","title":"Email"},"role":{"type":"string","title":"Role","default":"tenant_admin"}},"type":"object","required":["email"],"title":"TenantInviteRequest"},"prospector__admin__tenant_router__TenantInviteRequest":{"properties":{"email":{"type":"string","title":"Email"},"full_name":{"type":"string","title":"Full Name"},"role":{"type":"string","title":"Role","default":"sales_rep"}},"type":"object","required":["email","full_name"],"title":"TenantInviteRequest"}}}}