{"openapi":"3.1.0","info":{"title":"Dueback API","description":"Dueback strategist service. The server holds all negotiation playbooks and emits narrow instruction packets; playbook text, trap rationales, module names, and the category map NEVER cross this API.","version":"0.1.3"},"paths":{"/v1/cases":{"post":{"summary":"Create Case","operationId":"create_case_v1_cases_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseIntakeRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseResponse"}}}},"401":{"description":"Missing or invalid API key."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"List Cases","description":"Owner-scoped case list, newest first. Soft-deleted cases are\nomitted. Summaries carry the public category label only — the\ninternal module taxonomy never crosses this surface.\n\nPagination (audit fix pass): keyset cursor over (created_at, id);\n``limit`` keeps its historical meaning and default, and the\nresponse's ``next_cursor`` is null on the last page, so existing\nclients see exactly the page they always saw.","operationId":"list_cases_v1_cases_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseList"}}}},"401":{"description":"Missing or invalid API key."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/cases/{id}":{"get":{"summary":"Get Case","operationId":"get_case_v1_cases__id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseResponse"}}}},"401":{"description":"Missing or invalid API key."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Case","operationId":"delete_case_v1_cases__id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Missing or invalid API key."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/cases/{id}/handoff":{"post":{"summary":"Handoff","description":"Human handoff approval (SPEC.md §2.1 exit gate).\n\napproved=false → FAILED (handoff_declined). approved=true → QUALIFYING,\nwhere the three gates run in order: automatic-change screen → $10 fee\nfloor → unit-economics screen (with the exploration override). A failed\ngate → FAILED with the honest fail_reason; the thin skill surfaces the\nmessage to the human.","operationId":"handoff_v1_cases__id__handoff_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandoffRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseResponse"}}}},"401":{"description":"Missing or invalid API key."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/cases/{id}/next-step":{"get":{"summary":"Next Step","operationId":"next_step_v1_cases__id__next_step_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstructionPacketResponse"}}}},"401":{"description":"Missing or invalid API key."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/cases/{id}/step-result":{"post":{"summary":"Step Result","operationId":"step_result_v1_cases__id__step_result_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StepResultRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StepResultResponse"}}}},"401":{"description":"Missing or invalid API key."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/cases/{id}/evidence":{"post":{"summary":"Submit Evidence","operationId":"submit_evidence_v1_cases__id__evidence_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvidenceRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Missing or invalid API key."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/cases/{id}/report":{"get":{"summary":"Get Report","operationId":"get_report_v1_cases__id__report_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerificationReport"}}}},"401":{"description":"Missing or invalid API key."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/cases/{id}/receipt":{"get":{"summary":"Get Receipt","description":"The shareable proof for a verified case: baseline vs verified\ncharge, savings, and the fee taken — plus the tokenized public\nreceipt URL. Only exists once savings are verified; before that\nthere is nothing to receipt.","operationId":"get_receipt_v1_cases__id__receipt_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseReceipt"}}}},"401":{"description":"Missing or invalid API key."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/cases/{id}/review":{"post":{"summary":"Submit Review","operationId":"submit_review_v1_cases__id__review_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewInput"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Review"}}}},"401":{"description":"Missing or invalid API key."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"Get Case Review","operationId":"get_case_review_v1_cases__id__review_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Review"}}}},"401":{"description":"Missing or invalid API key."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/cases/{id}/reengagement":{"post":{"summary":"Mark Reengagement","operationId":"mark_reengagement_v1_cases__id__reengagement_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReengagementMarkRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Missing or invalid API key."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/case-setup/{token}/funnel":{"post":{"summary":"Funnel Beacon","description":"Page-side funnel beacon (round-2 item 7): the two setup steps\nonly a browser can observe — the page rendering and the Stripe.js\ncard confirm succeeding. Accepts PAGE_STEPS only; every backend\ntransition is recorded server-side, never taken from the page. The\nevent key is the session's stored token hash.","operationId":"funnel_beacon_v1_case_setup__token__funnel_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunnelBeaconRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/case-setup/{token}/savings-scan-consent":{"post":{"summary":"Setup Scan Consent","description":"Record the setup page's scan-consent answer (completed sessions\nonly). Granting runs the first scan immediately so findings are\nwaiting when the user returns to chat.","operationId":"setup_scan_consent_v1_case_setup__token__savings_scan_consent_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScanConsentRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/case-setup/{token}":{"get":{"summary":"Get Setup","operationId":"get_setup_v1_case_setup__token__get","parameters":[{"name":"token","in":"path","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/case-setup/{token}/intent":{"post":{"summary":"Create Setup Intent","operationId":"create_setup_intent_v1_case_setup__token__intent_post","parameters":[{"name":"token","in":"path","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/case-setup/{token}/plaid-link-token":{"post":{"summary":"Create Setup Plaid Link Token","operationId":"create_setup_plaid_link_token_v1_case_setup__token__plaid_link_token_post","parameters":[{"name":"token","in":"path","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/case-setup/{token}/plaid-exchange":{"post":{"summary":"Exchange Setup Bank","description":"Bank-only late connect: exchange a Link public_token for the\nsession's preset case and mark the link used.","operationId":"exchange_setup_bank_v1_case_setup__token__plaid_exchange_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankExchangeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/cases/{case_id}/bank-connect-link":{"post":{"summary":"Create Bank Connect Link","description":"Mint a durable bank-only connect link for a case whose bank was\nskipped (or never offered in-flow). Agent-callable with the user's\nown credentials; the link itself is token-auth like setup links.","operationId":"create_bank_connect_link_v1_cases__case_id__bank_connect_link_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Case Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/case-setup/{token}/complete":{"post":{"summary":"Complete Setup","operationId":"complete_setup_v1_case_setup__token__complete_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/internal/category-economics":{"get":{"tags":["internal"],"summary":"Per-category expected-vs-actual economics (internal)","description":"Aggregate learning-loop rollup keyed by PUBLIC label.\n\nInternal operator surface (operator-token gated, non-public). Reads the\ncategory_economics rollup + 90 days of category_economics_snapshots via\nthe OWNER session (RLS has no permissive policies on these tables).","operationId":"category_economics_v1_internal_category_economics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryEconomicsPage"}}}},"401":{"description":"Missing or invalid credential."},"403":{"description":"Operator access required."}},"security":[{"HTTPBearer":[]}]}},"/v1/internal/demand-signals":{"get":{"tags":["internal"],"summary":"Demand telemetry: what the market wants negotiated (internal)","description":"Aggregate demand-signal rollup keyed by PUBLIC category label.\n\nInternal operator surface (operator-token gated, non-public). Reads demand_signals\nvia the OWNER session (RLS has no permissive policies on this table).\nShows what agents/users are asking Dueback to negotiate, by channel —\nthe product-discovery feed: build where the demand is.","operationId":"demand_signals_v1_internal_demand_signals_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":90,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Missing or invalid credential."},"403":{"description":"Operator access required."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/internal/funnel":{"get":{"tags":["internal"],"summary":"Setup funnel: anonymous step counts + drop-off (internal)","description":"Setup-funnel aggregates (round-2 item 7).\n\nInternal operator surface (operator-token gated, non-public). Events are\nkeyed by setup-session token HASH and carry no user identity —\nthis endpoint returns counts and conversion percentages only.","operationId":"funnel_v1_internal_funnel_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Missing or invalid credential."},"403":{"description":"Operator access required."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/internal/promo-codes":{"get":{"tags":["internal"],"summary":"List Promo Codes","description":"List promo codes with use counts (operator only).","operationId":"list_promo_codes_v1_internal_promo_codes_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Missing or invalid credential."},"403":{"description":"Operator access required."}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["internal"],"summary":"Create Promo Code","description":"Create a fee-waiver promo code (operator only).","operationId":"create_promo_code_v1_internal_promo_codes_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/_PromoCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Missing or invalid credential."},"403":{"description":"Operator access required."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/internal/health/deep":{"get":{"tags":["internal"],"summary":"Deep Health","description":"Deep health (audit §3.4): DB round-trip + latest sweep outcomes.\n\nUnlike /healthz (deliberately shallow for load balancers), this\nanswers \"is the system actually working\": the database answers,\nand every background sweep's most recent recorded run is visible.\nAuth is this router's internal-token gate, same as every other\nendpoint here.","operationId":"deep_health_v1_internal_health_deep_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Missing or invalid credential."},"403":{"description":"Operator access required."}},"security":[{"HTTPBearer":[]}]}},"/v1/reengagement":{"get":{"summary":"List Reengagement","operationId":"list_reengagement_v1_reengagement_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReengagementPage"}}}},"401":{"description":"Missing or invalid API key."}},"security":[{"HTTPBearer":[]}]}},"/v1/reviews":{"get":{"summary":"List Reviews","description":"Paginated, newest first, published reviews only, anonymized (no user\nids/names; month-precision dates are inherent — created_at stays full\nprecision server-side but only month-level claims are cited).","operationId":"list_reviews_v1_reviews_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/stats":{"get":{"summary":"Get Stats","description":"Latest daily snapshot. Falls back to a live computation when no\nsnapshot exists yet (pre-Phase-3); the snapshot job remains the\nauthoritative writer.","operationId":"get_stats_v1_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicStats"}}}}}}},"/v1/reports/{public_id}":{"get":{"summary":"Get Redacted Report","description":"Unguessable-URL public version of a verification report: amounts and\ncategory only. No account numbers, institutions, raw transactions, user\nidentity, or internal module info.","operationId":"get_redacted_report_v1_reports__public_id__get","parameters":[{"name":"public_id","in":"path","required":true,"schema":{"type":"string","title":"Public Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedactedReport"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/legal/documents":{"get":{"summary":"List Documents","operationId":"list_documents_v1_legal_documents_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/legal/accept":{"post":{"summary":"Accept Document","operationId":"accept_document_v1_legal_accept_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/legal/status":{"get":{"summary":"Acceptance Status","operationId":"acceptance_status_v1_legal_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/webhooks/stripe":{"post":{"summary":"Stripe Webhook","operationId":"stripe_webhook_v1_webhooks_stripe_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/webhooks/plaid":{"post":{"summary":"Plaid Webhook","operationId":"plaid_webhook_v1_webhooks_plaid_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/plaid/link-token":{"post":{"tags":["plaid"],"summary":"Create Link Token","description":"Create a Plaid Link token (Transactions + Auth products).\n\nThe agent/human opens Plaid Link with this token; on success Link\nreturns a public_token, exchanged via POST /v1/plaid/items.\nRequires production Plaid credentials (plaid_env=production).","operationId":"create_link_token_v1_plaid_link_token_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Missing or invalid API key."}},"security":[{"HTTPBearer":[]}]}},"/v1/plaid/items":{"post":{"tags":["plaid"],"summary":"Exchange Item","description":"Exchange a Link public_token for a stored Plaid Item on a case.\n\nThe access token is encrypted (Fernet) before storage; the raw token\nnever touches the DB or logs.","operationId":"exchange_item_v1_plaid_items_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangeRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Missing or invalid API key."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/detect":{"post":{"summary":"Detect","description":"Thin negotiability check for agents.\n\nClassifies the bill server-side and returns a human/agent-readable pitch.\nThe internal module key is never exposed — only the coarse public label.\nEvery call logs a demand signal (product-discovery telemetry).","operationId":"detect_v1_detect_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetectRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/offer-check":{"post":{"summary":"Offer Check","description":"Judge an offer the customer already received. Keyless.\n\nClassification reuses the detect internals; the verdict compares\nthe offered discount with the category's typical negotiated\nrange. No module key crosses the API — only the public label.","operationId":"offer_check_v1_offer_check_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfferCheckRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfferCheckResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oauth/register":{"post":{"tags":["oauth"],"summary":"Register Client","operationId":"register_client_oauth_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oauth/authorize":{"get":{"tags":["oauth"],"summary":"Authorize Page","operationId":"authorize_page_oauth_authorize_get","parameters":[{"name":"client_id","in":"query","required":true,"schema":{"type":"string","title":"Client Id"}},{"name":"redirect_uri","in":"query","required":true,"schema":{"type":"string","title":"Redirect Uri"}},{"name":"response_type","in":"query","required":true,"schema":{"type":"string","title":"Response Type"}},{"name":"code_challenge","in":"query","required":true,"schema":{"type":"string","title":"Code Challenge"}},{"name":"code_challenge_method","in":"query","required":false,"schema":{"type":"string","default":"S256","title":"Code Challenge Method"}},{"name":"state","in":"query","required":false,"schema":{"type":"string","default":"","title":"State"}},{"name":"scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope"}},{"name":"prompt","in":"query","required":false,"schema":{"type":"string","default":"","title":"Prompt"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["oauth"],"summary":"Authorize Submit","operationId":"authorize_submit_oauth_authorize_post","requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_authorize_submit_oauth_authorize_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oauth/authorize/signin":{"post":{"tags":["oauth"],"summary":"Authorize Signin","description":"Create a pending authorization and email its sign-in link.\n\nMirrors the signup endpoints' anti-enumeration posture: the response\nis the same \"check your email\" page whether the address is new,\nknown, disposable (suppressed silently), or malformed-domain.","operationId":"authorize_signin_oauth_authorize_signin_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_authorize_signin_oauth_authorize_signin_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oauth/authorize/password":{"post":{"tags":["oauth"],"summary":"Authorize Password","description":"Authenticate a pending authorization with a reviewer password.\n\nOne generic error for every failure (unknown email, unflagged\naccount, no hash on file, wrong password) — the response never\nreveals which condition failed, and the pending row stays\nunauthenticated to expire on the normal TTL.","operationId":"authorize_password_oauth_authorize_password_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_authorize_password_oauth_authorize_password_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oauth/authorize/resume":{"get":{"tags":["oauth"],"summary":"Authorize Resume","description":"The emailed link: authenticate the pending authorization and\nrender the consent page. Opening the link never approves anything —\napproval is the CSRF-bound POST that follows.","operationId":"authorize_resume_oauth_authorize_resume_get","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","minLength":16,"maxLength":256,"title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oauth/authorize/approve":{"post":{"tags":["oauth"],"summary":"Authorize Approve","description":"Approve or deny an authenticated pending authorization.\n\nEverything about the grant — client, redirect, challenge, state,\nuser — comes from the pending row; posted fields can only carry the\ntoken, the CSRF proof, the decision, and legal-acceptance flags.","operationId":"authorize_approve_oauth_authorize_approve_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_authorize_approve_oauth_authorize_approve_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oauth/token":{"post":{"tags":["oauth"],"summary":"Token","operationId":"token_oauth_token_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_token_oauth_token_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oauth/revoke":{"post":{"tags":["oauth"],"summary":"Revoke","description":"Revoke a token. Always answers 200: the response never reveals\nwhether the token existed or belonged to the calling client.\n\nA refresh token revokes its whole family (every token from that\nauthorization) — revoking every refresh token for an account is\nsign-out for that account. Access tokens are stateless JWTs and\ncannot be revoked; presenting one still answers 200. The\ntoken_type_hint is advisory: the refresh-token table is consulted\nregardless of the hint.\n\nFreeze patch H-G1 (spec §6 \"The cookie\"): revoking the agent's\naccess also ends the web sessions that agent's browser joins\ncreated for this user — a joined browser MUST stop acting for the\naccount when the User disconnects the Personal Agent. Only sessions\ncarrying that client's PAP provenance are touched; ordinary web\nsessions (pap_client_id NULL) are never auto-revoked.","operationId":"revoke_oauth_revoke_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_revoke_oauth_revoke_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/savings-scan":{"get":{"tags":["savings-scan"],"summary":"Get Scan State","operationId":"get_scan_state_v1_savings_scan_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScanState"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/savings-scan/consent":{"post":{"tags":["savings-scan"],"summary":"Post Consent","description":"Record the user's scan-consent answer. Granting runs the first\nscan immediately (design §1: findings arrive \"shortly after setup\"\n— with a synchronous run they are already there at the first\nstatus check). Revoke deletes unactioned candidates.","operationId":"post_consent_v1_savings_scan_consent_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsentRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScanState"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/savings-scan/run":{"post":{"tags":["savings-scan"],"summary":"Post Run","description":"On-demand re-run (e.g. right after a new bank link — the blanket\nconsent covers it automatically, Zach decision 4). Honors the\nper-item rerun cadence inside run_scan.","operationId":"post_run_v1_savings_scan_run_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScanState"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/savings-scan/{candidate_id}/decision":{"post":{"tags":["savings-scan"],"summary":"Post Decision","operationId":"post_decision_v1_savings_scan__candidate_id__decision_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"candidate_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Candidate Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecisionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Post Decision V1 Savings Scan  Candidate Id  Decision Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/signup/request":{"post":{"summary":"Request Signup","operationId":"request_signup_v1_signup_request_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/signup/verify":{"get":{"summary":"Verify Signup","operationId":"verify_signup_v1_signup_verify_get","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","minLength":16,"maxLength":256,"title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/signup/complete":{"post":{"summary":"Complete Signup","operationId":"complete_signup_v1_signup_complete_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupCompleteRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/web/session/verify":{"post":{"tags":["web"],"summary":"Verify Web Session","operationId":"verify_web_session_v1_web_session_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebSessionVerifyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/web/me":{"get":{"tags":["web"],"summary":"Web Me","operationId":"web_me_v1_web_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/web/logout":{"post":{"tags":["web"],"summary":"Web Logout","operationId":"web_logout_v1_web_logout_post","parameters":[{"name":"X-CSRF-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Csrf-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/web/cases/start":{"post":{"tags":["web"],"summary":"Web Cases Start","operationId":"web_cases_start_v1_web_cases_start_post","parameters":[{"name":"X-CSRF-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Csrf-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentStartRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/web/cases":{"get":{"tags":["web"],"summary":"Web Cases List","operationId":"web_cases_list_v1_web_cases_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/web/watching":{"get":{"tags":["web"],"summary":"Web Watching","description":"Web surface for the standing savings scan (the backend engine\nis cases/scan.py; findings reuse its offered-candidate store and\npayload, never a fork). Without granted consent there are no\nfindings — the UI explains the opt-in instead.","operationId":"web_watching_v1_web_watching_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/web/cases/{case_id}":{"get":{"tags":["web"],"summary":"Web Case Detail","operationId":"web_case_detail_v1_web_cases__case_id__get","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Case Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/web/cases/{case_id}/documents":{"post":{"tags":["web"],"summary":"Web Upload Document","operationId":"web_upload_document_v1_web_cases__case_id__documents_post","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Case Id"}},{"name":"X-CSRF-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Csrf-Token"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_web_upload_document_v1_web_cases__case_id__documents_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/web/cases/{case_id}/documents/{document_id}":{"get":{"tags":["web"],"summary":"Web Download Document","operationId":"web_download_document_v1_web_cases__case_id__documents__document_id__get","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Case Id"}},{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["web"],"summary":"Web Delete Document","operationId":"web_delete_document_v1_web_cases__case_id__documents__document_id__delete","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Case Id"}},{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}},{"name":"X-CSRF-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Csrf-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/web/intake-documents":{"post":{"tags":["web"],"summary":"Web Upload Intake Document","operationId":"web_upload_intake_document_v1_web_intake_documents_post","parameters":[{"name":"X-CSRF-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Csrf-Token"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_web_upload_intake_document_v1_web_intake_documents_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["web"],"summary":"Web List Intake Documents","description":"Held intake documents (any source) not yet attached to a case.","operationId":"web_list_intake_documents_v1_web_intake_documents_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/web/intake-documents/{doc_id}":{"get":{"tags":["web"],"summary":"Web Get Intake Document","operationId":"web_get_intake_document_v1_web_intake_documents__doc_id__get","parameters":[{"name":"doc_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Doc Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["web"],"summary":"Web Delete Intake Document","operationId":"web_delete_intake_document_v1_web_intake_documents__doc_id__delete","parameters":[{"name":"doc_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Doc Id"}},{"name":"X-CSRF-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Csrf-Token"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/web/actions":{"get":{"tags":["web"],"summary":"Web Actions List","description":"Pending actions across the user's cases, plus recently resolved\nones (last 20) so the UI can show what already happened.","operationId":"web_actions_list_v1_web_actions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/web/actions/{action_id}/respond":{"post":{"tags":["web"],"summary":"Web Action Respond","operationId":"web_action_respond_v1_web_actions__action_id__respond_post","parameters":[{"name":"action_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Action Id"}},{"name":"X-CSRF-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Csrf-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionRespondRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/web/cases/{case_id}/correspondence":{"post":{"tags":["web"],"summary":"Web Add Correspondence","operationId":"web_add_correspondence_v1_web_cases__case_id__correspondence_post","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Case Id"}},{"name":"X-CSRF-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Csrf-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CorrespondenceRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/web/cases/{case_id}/helpers":{"post":{"tags":["web"],"summary":"Web Invite Helper","operationId":"web_invite_helper_v1_web_cases__case_id__helpers_post","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Case Id"}},{"name":"X-CSRF-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Csrf-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HelperInviteRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["web"],"summary":"Web List Helpers","operationId":"web_list_helpers_v1_web_cases__case_id__helpers_get","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Case Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/web/cases/{case_id}/helpers/{helper_id}":{"delete":{"tags":["web"],"summary":"Web Revoke Helper","operationId":"web_revoke_helper_v1_web_cases__case_id__helpers__helper_id__delete","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Case Id"}},{"name":"helper_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Helper Id"}},{"name":"X-CSRF-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Csrf-Token"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/inbound/email":{"post":{"tags":["inbound"],"summary":"Inbound Email","operationId":"inbound_email_v1_inbound_email_post","parameters":[{"name":"X-Dueback-Inbound-Secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dueback-Inbound-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/poppy/tasks":{"get":{"summary":"Get Tasks","description":"Tasks endpoint (spec 9): excluded tasks + feedback endpoint.\n\nThe session is verified by the dependency; the response itself does\nnot depend on the account, so `session` is otherwise unused.","operationId":"get_tasks_poppy_tasks_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/poppy/feedback":{"post":{"summary":"Post Feedback","description":"Feedback endpoint (spec 9.3): store one report, answer 202 empty.\n\nA missing/invalid Session is rejected by the dependency (400\n{\"error\": \"invalid_session\"} — the app maps pap_session's exception\nto that shape). A malformed body is 400 {\"error\": \"invalid_request\"}.\nA valid report is stored with the Session it was attributed to and\nthe client IP, and never echoed back. An identical report inside\nthe window is an idempotent retry: 202 with no second row (L1).\nOver the 10/min per-sid/per-IP cap: 429 + Retry-After with an\nempty body (spec §5.6; the custom `rate_limited` body was removed\nin the 1.0 freeze patch). Both caps are DB counts, so they bind\nacross workers (R4).","operationId":"post_feedback_poppy_feedback_post","responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/me/home-link":{"get":{"tags":["home"],"summary":"My Home Link","operationId":"my_home_link_v1_me_home_link_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response My Home Link V1 Me Home Link Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/me/home-link/regenerate":{"post":{"tags":["home"],"summary":"Regenerate Home Link","description":"Revoke every previously sent home link and mint a new one.","operationId":"regenerate_home_link_v1_me_home_link_regenerate_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Regenerate Home Link V1 Me Home Link Regenerate Post"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/home/{token}":{"get":{"tags":["home"],"summary":"Home Page Data","operationId":"home_page_data_v1_home__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Home Page Data V1 Home  Token  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/home/{token}/bank-connect-link":{"post":{"tags":["home"],"summary":"Home Bank Connect Link","operationId":"home_bank_connect_link_v1_home__token__bank_connect_link_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankConnectLinkIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Home Bank Connect Link V1 Home  Token  Bank Connect Link Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/home/{token}/scan-decision":{"post":{"tags":["home"],"summary":"Home Scan Decision","operationId":"home_scan_decision_v1_home__token__scan_decision_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HomeScanDecisionIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Home Scan Decision V1 Home  Token  Scan Decision Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/me/export":{"get":{"tags":["me"],"summary":"Export My Data","description":"Everything we hold about the caller, in one JSON bundle.\n\nScoped session (RLS) + explicit owner filters: another user's rows\ncannot appear here even if a query is wrong.","operationId":"export_my_data_v1_me_export_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/me/delete-account":{"post":{"tags":["me"],"summary":"Delete My Account","description":"Delete/anonymize the caller's account per the retention policy.\n\nFinancial and audit records (billing, verifications, disputes,\naudit log, consent records) are RETAINED for the policy's 7-year\nschedule, attached to the anonymized user row; everything that\nidentifies the person or carries their content is purged.","operationId":"delete_my_account_v1_me_delete_account_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteAccountRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}}},"components":{"schemas":{"AcceptRequest":{"properties":{"document":{"type":"string","maxLength":32,"title":"Document"},"version":{"type":"string","maxLength":64,"title":"Version"}},"type":"object","required":["document","version"],"title":"AcceptRequest"},"ActionRespondRequest":{"properties":{"answers":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Answers"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outcome"},"edited_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Edited Text"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"offer_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Offer Text"},"amount_cents":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Amount Cents"},"quick_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quick Status"}},"type":"object","title":"ActionRespondRequest"},"AgentStartRequest":{"properties":{"expense_description":{"type":"string","maxLength":2000,"title":"Expense Description"},"counterparty":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Counterparty"},"amount_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Amount Cents"},"billing_period":{"type":"string","enum":["monthly","annual","one_off","unknown"],"title":"Billing Period","default":"unknown"},"currency":{"type":"string","maxLength":8,"title":"Currency","default":"USD"},"observed_signals":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Observed Signals"},"automatic_change":{"type":"boolean","title":"Automatic Change","default":false},"promo_code":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Promo Code"},"approval":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Approval"},"intake_document_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Intake Document Id"}},"type":"object","required":["expense_description"],"title":"AgentStartRequest"},"BankConnectLinkIn":{"properties":{"case_id":{"type":"string","format":"uuid","title":"Case Id"}},"type":"object","required":["case_id"],"title":"BankConnectLinkIn"},"BankExchangeRequest":{"properties":{"public_token":{"type":"string","maxLength":512,"minLength":1,"title":"Public Token"},"institution_name":{"type":"string","maxLength":200,"title":"Institution Name","default":""}},"type":"object","required":["public_token"],"title":"BankExchangeRequest"},"BankPrompt":{"properties":{"connect_link_outstanding":{"type":"boolean","title":"Connect Link Outstanding","default":false}},"type":"object","title":"BankPrompt","description":"Bank-connection prompt payload (added 2026-10-21).\n\nPresent on the case-status surface only while a charge-track case\nhas no connected bank: verification then falls back to manual\nevidence. Carries no URL — setup tokens are hash-at-rest — so the\nagent surface mints a durable connect link via\nPOST /v1/cases/{id}/bank-connect-link when none is outstanding and\npresents it once (the review prompt's once-only discipline)."},"BaselinePointSchema":{"properties":{"amount_cents":{"type":"integer","title":"Amount Cents"},"posted_at":{"type":"string","title":"Posted At"},"source":{"type":"string","enum":["plaid","manual"],"title":"Source"}},"type":"object","required":["amount_cents","posted_at","source"],"title":"BaselinePointSchema"},"BaselineSchema":{"properties":{"method":{"type":"string","enum":["mean","median","annual_pair","document"],"title":"Method"},"data_points":{"items":{"$ref":"#/components/schemas/BaselinePointSchema"},"type":"array","title":"Data Points"},"baseline_cents":{"type":"integer","title":"Baseline Cents"}},"type":"object","required":["method","data_points","baseline_cents"],"title":"BaselineSchema"},"Body_authorize_approve_oauth_authorize_approve_post":{"properties":{"pending_token":{"type":"string","title":"Pending Token"},"csrf_token":{"type":"string","title":"Csrf Token"},"decision":{"type":"string","title":"Decision"},"accept_terms":{"type":"boolean","title":"Accept Terms","default":false},"accept_privacy":{"type":"boolean","title":"Accept Privacy","default":false}},"type":"object","required":["pending_token","csrf_token","decision"],"title":"Body_authorize_approve_oauth_authorize_approve_post"},"Body_authorize_password_oauth_authorize_password_post":{"properties":{"client_id":{"type":"string","title":"Client Id"},"redirect_uri":{"type":"string","title":"Redirect Uri"},"state":{"type":"string","title":"State","default":""},"code_challenge":{"type":"string","title":"Code Challenge"},"scope":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope"},"email":{"type":"string","title":"Email"},"password":{"type":"string","title":"Password"}},"type":"object","required":["client_id","redirect_uri","code_challenge","email","password"],"title":"Body_authorize_password_oauth_authorize_password_post"},"Body_authorize_signin_oauth_authorize_signin_post":{"properties":{"client_id":{"type":"string","title":"Client Id"},"redirect_uri":{"type":"string","title":"Redirect Uri"},"state":{"type":"string","title":"State","default":""},"code_challenge":{"type":"string","title":"Code Challenge"},"scope":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope"},"email":{"type":"string","title":"Email"}},"type":"object","required":["client_id","redirect_uri","code_challenge","email"],"title":"Body_authorize_signin_oauth_authorize_signin_post"},"Body_authorize_submit_oauth_authorize_post":{"properties":{"client_id":{"type":"string","title":"Client Id"},"redirect_uri":{"type":"string","title":"Redirect Uri"},"state":{"type":"string","title":"State","default":""},"code_challenge":{"type":"string","title":"Code Challenge"},"scope":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope"},"api_key":{"type":"string","title":"Api Key","default":""},"decision":{"type":"string","title":"Decision"}},"type":"object","required":["client_id","redirect_uri","code_challenge","decision"],"title":"Body_authorize_submit_oauth_authorize_post"},"Body_revoke_oauth_revoke_post":{"properties":{"token":{"type":"string","title":"Token"},"token_type_hint":{"type":"string","title":"Token Type Hint","default":""},"client_id":{"type":"string","title":"Client Id"},"client_assertion":{"type":"string","title":"Client Assertion","default":""},"client_assertion_type":{"type":"string","title":"Client Assertion Type","default":""}},"type":"object","required":["token","client_id"],"title":"Body_revoke_oauth_revoke_post"},"Body_token_oauth_token_post":{"properties":{"grant_type":{"type":"string","title":"Grant Type"},"code":{"type":"string","title":"Code","default":""},"redirect_uri":{"type":"string","title":"Redirect Uri","default":""},"client_id":{"type":"string","title":"Client Id"},"code_verifier":{"type":"string","title":"Code Verifier","default":""},"refresh_token":{"type":"string","title":"Refresh Token","default":""},"scope":{"type":"string","title":"Scope","default":""},"resource":{"type":"string","title":"Resource","default":""},"client_assertion":{"type":"string","title":"Client Assertion","default":""},"client_assertion_type":{"type":"string","title":"Client Assertion Type","default":""}},"type":"object","required":["grant_type","client_id"],"title":"Body_token_oauth_token_post"},"Body_web_upload_document_v1_web_cases__case_id__documents_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_web_upload_document_v1_web_cases__case_id__documents_post"},"Body_web_upload_intake_document_v1_web_intake_documents_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_web_upload_intake_document_v1_web_intake_documents_post"},"CaseIntakeRequest":{"properties":{"expense_description":{"type":"string","maxLength":2000,"title":"Expense Description"},"counterparty":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Counterparty"},"amount_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Amount Cents"},"billing_period":{"type":"string","enum":["monthly","annual","one_off","unknown"],"title":"Billing Period","default":"unknown"},"currency":{"type":"string","maxLength":8,"title":"Currency","default":"USD"},"observed_signals":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Observed Signals"},"consent_version":{"type":"string","maxLength":64,"title":"Consent Version"},"stripe_setup_intent_id":{"type":"string","maxLength":255,"title":"Stripe Setup Intent Id"},"automatic_change":{"type":"boolean","title":"Automatic Change","default":false},"promo_code":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Promo Code"}},"type":"object","required":["expense_description","consent_version","stripe_setup_intent_id"],"title":"CaseIntakeRequest"},"CaseList":{"properties":{"cases":{"items":{"$ref":"#/components/schemas/CaseSummary"},"type":"array","title":"Cases"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["cases"],"title":"CaseList"},"CaseReceipt":{"properties":{"case_id":{"type":"string","format":"uuid","title":"Case Id"},"public_category_label":{"type":"string","title":"Public Category Label"},"counterparty":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Counterparty"},"baseline_cents":{"type":"integer","title":"Baseline Cents"},"verified_charge_cents":{"type":"integer","title":"Verified Charge Cents"},"savings_cents":{"type":"integer","title":"Savings Cents"},"savings_basis":{"type":"string","title":"Savings Basis"},"fee_cents":{"type":"integer","title":"Fee Cents"},"verified_at":{"type":"string","format":"date-time","title":"Verified At"},"verification_track":{"type":"string","enum":["charge","document"],"title":"Verification Track"},"evidence_strength":{"type":"string","enum":["plaid","manual","mixed"],"title":"Evidence Strength"},"receipt_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Receipt Url"}},"type":"object","required":["case_id","public_category_label","baseline_cents","verified_charge_cents","savings_cents","savings_basis","fee_cents","verified_at","verification_track","evidence_strength"],"title":"CaseReceipt","description":"Owner-scoped verified-savings receipt (GET /v1/cases/{id}/receipt).\n\nThe same redacted data the tokenized receipt page renders: public\ncategory label, counterparty, baseline vs verified amounts, savings,\nfee, verification date/track. No user identity, no module_key."},"CaseResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"status":{"type":"string","enum":["intake","qualifying","strategy_loop","executed","verifying","verified","collecting","collected","monitoring","closed","refunded","expired","failed","deleted"],"title":"Status"},"tier":{"type":"string","enum":["everyday","big_ticket"],"title":"Tier"},"target_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Target Cents"},"monitoring_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Monitoring Until"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"verification_mode":{"type":"string","enum":["charge","document"],"title":"Verification Mode","default":"charge"},"first_packet_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Packet At"},"payment_status":{"type":"string","enum":["none","pending","succeeded","failed","disputed"],"title":"Payment Status","default":"none"},"steps_taken":{"type":"integer","title":"Steps Taken","default":0},"fail_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fail Reason"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"review_prompt":{"anyOf":[{"$ref":"#/components/schemas/ReviewPrompt"},{"type":"null"}]},"bank_status":{"type":"string","enum":["connected","pending","not_applicable"],"title":"Bank Status","default":"not_applicable"},"bank_prompt":{"anyOf":[{"$ref":"#/components/schemas/BankPrompt"},{"type":"null"}]},"savings_scan":{"anyOf":[{"$ref":"#/components/schemas/SavingsScan"},{"type":"null"}]}},"type":"object","required":["id","status","tier","created_at","updated_at"],"title":"CaseResponse"},"CaseSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"status":{"type":"string","enum":["intake","qualifying","strategy_loop","executed","verifying","verified","collecting","collected","monitoring","closed","refunded","expired","failed","deleted"],"title":"Status"},"category_label":{"type":"string","title":"Category Label"},"counterparty":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Counterparty"},"amount_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Amount Cents"},"target_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Target Cents"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","status","category_label","created_at","updated_at"],"title":"CaseSummary","description":"One row of GET /v1/cases — the owner-scoped case list.\n\nSummaries only: public category label (mapped server-side from the\ninternal module), counterparty, status, amounts. module_key and all\nother internal taxonomy never appear."},"CaseUpdate":{"properties":{"case_id":{"type":"string","format":"uuid","title":"Case Id"},"kind":{"type":"string","title":"Kind"},"public_category_label":{"type":"string","title":"Public Category Label"},"counterparty":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Counterparty"},"occurred_at":{"type":"string","format":"date-time","title":"Occurred At"}},"type":"object","required":["case_id","kind","public_category_label","occurred_at"],"title":"CaseUpdate","description":"One meaningful case transition for the agent to voice\n(round-2 #5). Sourced from the audit log's transition rows (plus\nthe revocation-grace event), served exactly once per user via the\nuser_reengagement_state watermark. Public labels only."},"CategoryEconomicsPage":{"properties":{"categories":{"items":{"$ref":"#/components/schemas/CategoryEconomicsRow"},"type":"array","title":"Categories"},"inference_actual_cents":{"type":"integer","title":"Inference Actual Cents","default":0},"inference_estimate_cents":{"type":"integer","title":"Inference Estimate Cents","default":0},"inference_measured_calls":{"type":"integer","title":"Inference Measured Calls","default":0},"inference_estimated_calls":{"type":"integer","title":"Inference Estimated Calls","default":0}},"type":"object","required":["categories"],"title":"CategoryEconomicsPage"},"CategoryEconomicsRow":{"properties":{"label":{"type":"string","title":"Label"},"attempts":{"type":"integer","title":"Attempts"},"verifies":{"type":"integer","title":"Verifies"},"verify_rate":{"type":"number","title":"Verify Rate"},"total_expected_fee_cents":{"type":"integer","title":"Total Expected Fee Cents"},"total_actual_fee_cents":{"type":"integer","title":"Total Actual Fee Cents"},"total_actual_cost_cents":{"type":"integer","title":"Total Actual Cost Cents"},"ev_per_attempt_cents":{"type":"integer","title":"Ev Per Attempt Cents"},"exploration_attempts":{"type":"integer","title":"Exploration Attempts"},"exploration_verifies":{"type":"integer","title":"Exploration Verifies"},"trend":{"items":{"$ref":"#/components/schemas/CategoryEconomicsTrendPoint"},"type":"array","title":"Trend"}},"type":"object","required":["label","attempts","verifies","verify_rate","total_expected_fee_cents","total_actual_fee_cents","total_actual_cost_cents","ev_per_attempt_cents","exploration_attempts","exploration_verifies","trend"],"title":"CategoryEconomicsRow"},"CategoryEconomicsTrendPoint":{"properties":{"date":{"type":"string","title":"Date"},"ev_per_attempt_cents":{"type":"integer","title":"Ev Per Attempt Cents"}},"type":"object","required":["date","ev_per_attempt_cents"],"title":"CategoryEconomicsTrendPoint"},"CompleteRequest":{"properties":{"accept_terms":{"type":"boolean","title":"Accept Terms","default":false},"accept_privacy":{"type":"boolean","title":"Accept Privacy","default":false},"plaid_public_token":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Plaid Public Token"},"plaid_institution_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Plaid Institution Name"},"bank_skipped":{"type":"boolean","title":"Bank Skipped","default":false}},"type":"object","title":"CompleteRequest"},"ConsentRequest":{"properties":{"decision":{"type":"string","enum":["grant","decline","revoke"],"title":"Decision"},"source":{"type":"string","enum":["setup_page","agent_chat"],"title":"Source","default":"agent_chat"}},"type":"object","required":["decision"],"title":"ConsentRequest"},"CorrespondenceRequest":{"properties":{"text":{"type":"string","maxLength":100000,"minLength":1,"title":"Text"},"received_via":{"type":"string","pattern":"^(email|call_notes)$","title":"Received Via"}},"type":"object","required":["text","received_via"],"title":"CorrespondenceRequest"},"DecisionRequest":{"properties":{"decision":{"type":"string","enum":["open","dismiss"],"title":"Decision"},"approval":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Approval"}},"type":"object","required":["decision"],"title":"DecisionRequest"},"DeleteAccountRequest":{"properties":{"confirm":{"type":"string","maxLength":16,"title":"Confirm"}},"type":"object","required":["confirm"],"title":"DeleteAccountRequest"},"DetectRequest":{"properties":{"expense_description":{"type":"string","maxLength":2000,"title":"Expense Description"},"counterparty":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Counterparty"},"amount_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Amount Cents"},"observed_signals":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Observed Signals"}},"type":"object","required":["expense_description"],"title":"DetectRequest"},"DetectResponse":{"properties":{"negotiable":{"type":"boolean","title":"Negotiable"},"category_label":{"type":"string","title":"Category Label"},"pitch":{"type":"string","title":"Pitch"}},"type":"object","required":["negotiable","category_label","pitch"],"title":"DetectResponse"},"EvidenceRequest":{"properties":{"merchant":{"type":"string","maxLength":200,"title":"Merchant"},"amount_cents":{"type":"integer","title":"Amount Cents"},"billing_period_start":{"type":"string","maxLength":32,"title":"Billing Period Start"},"billing_period_end":{"type":"string","maxLength":32,"title":"Billing Period End"},"document_reference":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Document Reference"}},"type":"object","required":["merchant","amount_cents","billing_period_start","billing_period_end"],"title":"EvidenceRequest"},"ExchangeRequest":{"properties":{"public_token":{"type":"string","maxLength":512,"minLength":1,"title":"Public Token"},"case_id":{"type":"string","format":"uuid","title":"Case Id"},"institution_name":{"type":"string","maxLength":200,"title":"Institution Name","default":""}},"type":"object","required":["public_token","case_id"],"title":"ExchangeRequest"},"FeeSchema":{"properties":{"rate_bps":{"type":"integer","title":"Rate Bps"},"cap_cents":{"type":"integer","title":"Cap Cents"},"fee_cents":{"type":"integer","title":"Fee Cents"},"tier":{"type":"string","enum":["everyday","big_ticket"],"title":"Tier"},"beta_pricing":{"type":"boolean","title":"Beta Pricing"}},"type":"object","required":["rate_bps","cap_cents","fee_cents","tier","beta_pricing"],"title":"FeeSchema"},"FunnelBeaconRequest":{"properties":{"step":{"type":"string","maxLength":64,"title":"Step"}},"type":"object","required":["step"],"title":"FunnelBeaconRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HandoffRequest":{"properties":{"approved":{"type":"boolean","title":"Approved"}},"type":"object","required":["approved"],"title":"HandoffRequest"},"HelperInviteRequest":{"properties":{"email":{"type":"string","maxLength":320,"title":"Email"}},"type":"object","required":["email"],"title":"HelperInviteRequest"},"HomeScanDecisionIn":{"properties":{"candidate_id":{"type":"string","format":"uuid","title":"Candidate Id"},"decision":{"type":"string","enum":["open","dismiss"],"title":"Decision"}},"type":"object","required":["candidate_id","decision"],"title":"HomeScanDecisionIn"},"InstructionPacketResponse":{"properties":{"case_id":{"type":"string","format":"uuid","title":"Case Id"},"step_number":{"type":"integer","title":"Step Number"},"step_type":{"type":"string","enum":["gather_facts","draft_outreach","revise_outreach","record_outcome","submit_evidence","await_external","close_step"],"title":"Step Type"},"instruction":{"type":"string","maxLength":500,"title":"Instruction"},"params":{"additionalProperties":true,"type":"object","title":"Params"},"expected_output_schema":{"additionalProperties":true,"type":"object","title":"Expected Output Schema"},"human_approval_required":{"type":"boolean","title":"Human Approval Required"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"}},"type":"object","required":["case_id","step_number","step_type","instruction","params","expected_output_schema","human_approval_required","expires_at"],"title":"InstructionPacketResponse"},"OfferCheckRequest":{"properties":{"counterparty":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Counterparty"},"amount_cents":{"type":"integer","exclusiveMinimum":0.0,"title":"Amount Cents"},"offer_cents":{"type":"integer","exclusiveMinimum":0.0,"title":"Offer Cents"},"billing_period":{"type":"string","maxLength":32,"title":"Billing Period"}},"type":"object","required":["amount_cents","offer_cents","billing_period"],"title":"OfferCheckRequest"},"OfferCheckResponse":{"properties":{"verdict":{"type":"string","title":"Verdict"},"headline":{"type":"string","title":"Headline"},"detail":{"type":"string","title":"Detail"},"offer_savings_pct":{"type":"integer","title":"Offer Savings Pct"},"typical_range_pct":{"items":{"type":"integer"},"type":"array","title":"Typical Range Pct"}},"type":"object","required":["verdict","headline","detail","offer_savings_pct","typical_range_pct"],"title":"OfferCheckResponse"},"PublicStats":{"properties":{"computed_at":{"type":"string","format":"date-time","title":"Computed At"},"total_verified_cases":{"type":"integer","title":"Total Verified Cases"},"total_savings_cents":{"type":"integer","title":"Total Savings Cents"},"median_savings_cents":{"type":"integer","title":"Median Savings Cents"},"verify_rate":{"type":"number","title":"Verify Rate"},"avg_days_to_verify":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Days To Verify"},"by_category":{"items":{"$ref":"#/components/schemas/PublicStatsByCategory"},"type":"array","title":"By Category"}},"type":"object","required":["computed_at","total_verified_cases","total_savings_cents","median_savings_cents","verify_rate"],"title":"PublicStats"},"PublicStatsByCategory":{"properties":{"label":{"type":"string","title":"Label"},"cases":{"type":"integer","title":"Cases"},"median_savings_cents":{"type":"integer","title":"Median Savings Cents"}},"type":"object","required":["label","cases","median_savings_cents"],"title":"PublicStatsByCategory"},"RedactedReport":{"properties":{"public_category_label":{"type":"string","title":"Public Category Label"},"baseline_cents":{"type":"integer","title":"Baseline Cents"},"target_cents":{"type":"integer","title":"Target Cents"},"verified_charge_cents":{"type":"integer","title":"Verified Charge Cents"},"verified_month":{"type":"string","title":"Verified Month"},"savings_cents":{"type":"integer","title":"Savings Cents"},"savings_basis":{"type":"string","title":"Savings Basis"},"fee_cents":{"type":"integer","title":"Fee Cents"},"evidence_strength":{"type":"string","enum":["plaid","manual","document","mixed"],"title":"Evidence Strength"}},"type":"object","required":["public_category_label","baseline_cents","target_cents","verified_charge_cents","verified_month","savings_cents","savings_basis","fee_cents","evidence_strength"],"title":"RedactedReport"},"ReengagementItem":{"properties":{"case_id":{"type":"string","format":"uuid","title":"Case Id"},"kind":{"type":"string","enum":["decay_due","winback_offer"],"title":"Kind"},"public_category_label":{"type":"string","title":"Public Category Label"},"savings_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Savings Cents"},"expected_decay_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expected Decay At"},"refunded_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Refunded At"}},"type":"object","required":["case_id","kind","public_category_label"],"title":"ReengagementItem"},"ReengagementMarkRequest":{"properties":{"surfaced":{"type":"boolean","const":true,"title":"Surfaced"}},"type":"object","required":["surfaced"],"title":"ReengagementMarkRequest"},"ReengagementPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ReengagementItem"},"type":"array","title":"Items"},"scan_candidates":{"items":{"$ref":"#/components/schemas/ScanCandidateOut"},"type":"array","title":"Scan Candidates"},"case_updates":{"items":{"$ref":"#/components/schemas/CaseUpdate"},"type":"array","title":"Case Updates"}},"type":"object","required":["items"],"title":"ReengagementPage"},"RegisterRequest":{"properties":{"redirect_uris":{"items":{"type":"string"},"type":"array","title":"Redirect Uris"},"client_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Name"}},"type":"object","required":["redirect_uris"],"title":"RegisterRequest"},"Review":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"rating":{"type":"integer","title":"Rating"},"public_category_label":{"type":"string","title":"Public Category Label"},"savings_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Savings Cents"},"negotiated_savings_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Negotiated Savings Cents"},"verified_savings_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Verified Savings Cents"},"verification_status":{"type":"string","enum":["pending","verified","withdrawn"],"title":"Verification Status","default":"pending"},"days_to_verify":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Days To Verify"},"evidence_strength":{"anyOf":[{"type":"string","enum":["plaid","manual"]},{"type":"null"}],"title":"Evidence Strength"},"review_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Review Text"},"verified_badge":{"type":"boolean","title":"Verified Badge","default":false},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","rating","public_category_label","created_at"],"title":"Review"},"ReviewInput":{"properties":{"rating":{"type":"integer","maximum":5.0,"minimum":1.0,"title":"Rating"},"review_text":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Review Text"}},"type":"object","required":["rating"],"title":"ReviewInput"},"ReviewPage":{"properties":{"reviews":{"items":{"$ref":"#/components/schemas/Review"},"type":"array","title":"Reviews"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["reviews"],"title":"ReviewPage"},"ReviewPrompt":{"properties":{"suggested_text":{"type":"string","title":"Suggested Text"},"suggested_rating":{"type":"integer","title":"Suggested Rating","default":5},"category_label":{"type":"string","title":"Category Label"},"savings_display":{"type":"string","title":"Savings Display"},"submit_via":{"type":"string","title":"Submit Via"}},"type":"object","required":["suggested_text","category_label","savings_display","submit_via"],"title":"ReviewPrompt","description":"In-chat review prompt payload (reputation-system.md §2, amended\n2026-10-21). Present on the case-status surface only when a successful\nnegotiation has been recorded and no review exists yet. The suggested\ntext and 5-star rating are prefilled suggestions — editable by the\nuser; nothing submits without their explicit Publish action."},"SavingsScan":{"properties":{"status":{"type":"string","enum":["offered","pending","ready"],"title":"Status"},"fresh":{"type":"boolean","title":"Fresh","default":false},"candidate_count":{"type":"integer","title":"Candidate Count","default":0},"candidates":{"items":{"$ref":"#/components/schemas/ScanCandidateOut"},"type":"array","title":"Candidates","default":[]},"consent_via":{"type":"string","title":"Consent Via","default":"/v1/savings-scan/consent"},"respond_via":{"type":"string","title":"Respond Via","default":"/v1/savings-scan"}},"type":"object","required":["status"],"title":"SavingsScan","description":"Savings-scan payload on the case-status surface\n(savings-scan-design.md §3). Mirrors the *_prompt discipline,\nadjusted for Zach's 2026-10-22 reprompt decision: the consent ask\nand the candidate list re-surface at natural moments (setup end,\ncase completion) — ``fresh`` is true only when this serving is a\nnew natural-moment presentation the agent should voice.\n\n  offered -> no consent on file; the agent may ask (this moment)\n  pending -> consent granted, scan has not produced findings yet\n  ready   -> candidates are waiting for the user's pick"},"SavingsSchema":{"properties":{"basis":{"type":"string","enum":["first_year","persistent_5yr","timeshare_5yr","tax_res","plan_401k","one_off"],"title":"Basis"},"savings_cents":{"type":"integer","title":"Savings Cents"},"detail":{"additionalProperties":true,"type":"object","title":"Detail"}},"type":"object","required":["basis","savings_cents"],"title":"SavingsSchema"},"ScanCandidateOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"merchant_display":{"type":"string","title":"Merchant Display"},"category_label":{"type":"string","title":"Category Label"},"current_spend":{"type":"string","title":"Current Spend"},"cadence":{"type":"string","title":"Cadence"},"avg_amount_cents":{"type":"integer","title":"Avg Amount Cents"},"decision_via":{"type":"string","title":"Decision Via"}},"type":"object","required":["id","merchant_display","category_label","current_spend","cadence","avg_amount_cents","decision_via"],"title":"ScanCandidateOut","description":"One savings-scan candidate as served to agents/users\n(savings-scan-design.md §3). Summary only: merchant display,\ncurrent spend, cadence, public category label. Never a promised\nsaving, never module_key, never raw transaction data."},"ScanConsentRequest":{"properties":{"decision":{"type":"string","enum":["grant","decline"],"title":"Decision"}},"type":"object","required":["decision"],"title":"ScanConsentRequest"},"ScanState":{"properties":{"consent_status":{"type":"string","title":"Consent Status"},"consent_copy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Consent Copy"},"candidates":{"items":{"$ref":"#/components/schemas/ScanCandidateOut"},"type":"array","title":"Candidates","default":[]},"last_run":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Last Run"}},"type":"object","required":["consent_status"],"title":"ScanState"},"SignupCompleteRequest":{"properties":{"accept_terms":{"type":"boolean","title":"Accept Terms","default":false},"terms_version":{"type":"string","maxLength":64,"title":"Terms Version","default":""},"accept_privacy":{"type":"boolean","title":"Accept Privacy","default":false},"privacy_version":{"type":"string","maxLength":64,"title":"Privacy Version","default":""}},"type":"object","title":"SignupCompleteRequest"},"SignupRequest":{"properties":{"email":{"type":"string","maxLength":320,"title":"Email"},"destination":{"type":"string","enum":["api_key","web"],"title":"Destination","default":"api_key"},"accepted_terms":{"type":"boolean","title":"Accepted Terms","default":false}},"type":"object","required":["email"],"title":"SignupRequest"},"StepResultRequest":{"properties":{"step_number":{"type":"integer","title":"Step Number"},"step_type":{"type":"string","maxLength":64,"title":"Step Type"},"result":{"additionalProperties":true,"type":"object","title":"Result"},"human_approved":{"type":"boolean","title":"Human Approved","default":false},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Notes"},"idempotency_key":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Idempotency Key"}},"type":"object","required":["step_number","step_type","result"],"title":"StepResultRequest"},"StepResultResponse":{"properties":{"steps_taken":{"type":"integer","title":"Steps Taken"},"status":{"type":"string","enum":["intake","qualifying","strategy_loop","executed","verifying","verified","collecting","collected","monitoring","closed","refunded","expired","failed","deleted"],"title":"Status"},"more_steps_expected":{"type":"boolean","title":"More Steps Expected"}},"type":"object","required":["steps_taken","status","more_steps_expected"],"title":"StepResultResponse"},"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"},"VerificationReport":{"properties":{"case_id":{"type":"string","format":"uuid","title":"Case Id"},"baseline":{"$ref":"#/components/schemas/BaselineSchema"},"target_cents":{"type":"integer","title":"Target Cents"},"verified_charge_cents":{"type":"integer","title":"Verified Charge Cents"},"verified_charge_at":{"type":"string","format":"date-time","title":"Verified Charge At"},"savings":{"$ref":"#/components/schemas/SavingsSchema"},"fee":{"$ref":"#/components/schemas/FeeSchema"},"evidence_strength":{"type":"string","enum":["plaid","manual"],"title":"Evidence Strength"},"monitoring_until":{"type":"string","format":"date-time","title":"Monitoring Until"},"refund_policy":{"type":"string","title":"Refund Policy"}},"type":"object","required":["case_id","baseline","target_cents","verified_charge_cents","verified_charge_at","savings","fee","evidence_strength","monitoring_until","refund_policy"],"title":"VerificationReport"},"WebSessionVerifyRequest":{"properties":{"token":{"type":"string","maxLength":256,"minLength":16,"title":"Token"}},"type":"object","required":["token"],"title":"WebSessionVerifyRequest"},"_PromoCreate":{"properties":{"code":{"type":"string","title":"Code"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"max_uses":{"type":"integer","title":"Max Uses","default":20},"fee_waiver_percent":{"type":"integer","title":"Fee Waiver Percent","default":100},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"}},"type":"object","required":["code"],"title":"_PromoCreate"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}