{"openapi":"3.1.0","info":{"title":"Financial AI","description":"API for Financial AI Platform","version":"1.0.0"},"paths":{"/api/companies":{"get":{"tags":["accounts"],"summary":"List Companies","description":"List companies. Available for superadmin and sales roles.","operationId":"list_companies_api_companies_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["accounts"],"summary":"Create Company","description":"Create a company. Available for superadmin and sales roles.","operationId":"create_company_api_companies_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyCreate"}}},"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":[]}]}},"/api/companies/{id}":{"put":{"tags":["accounts"],"summary":"Update Company","description":"Update company. Available for superadmin, sales, admin roles.","operationId":"update_company_api_companies__id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","title":"Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["accounts"],"summary":"Get Company","description":"Retrieve company.","operationId":"get_company_api_companies__id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/signup-options":{"get":{"tags":["accounts"],"summary":"List Signup Options","description":"The fixed answers the institutional signup form offers.\n\nPublic, because the form asking them is: it is shown to someone who has no\naccount yet. Serving the lists rather than shipping copies of them to the\nbrowser is what keeps `register-trial`'s checks honest — the form can only\noffer what the endpoint accepts, so renaming a label here renames it on the\nform instead of silently rejecting the old spelling.\n\nOne call for all lists: they are asked for together, by one form, on one\nscreen, and a second round-trip on the signup path would only add a second\nway for it to fail. `countries` ([{code, name}], core.common.countries) is\nalso read by the Individual form and the profile page, and so is\n`languages` ([{code, name, native}], core.common.languages; the forms\npreselect `default_language`).\n\n`suggested_country`: the visitor's country by IP (core.analytics.geo, DB-IP's\ntable), which the sign-up forms preselect; the person can change it. None\nwhen unknown: the table is not loaded yet, a private address, or dev/staging,\nwhose ingress drops X-Forwarded-For. The address is not stored.","operationId":"list_signup_options_api_signup_options_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/users/watchlist":{"post":{"tags":["accounts"],"summary":"Join Watchlist","description":"Join the user watchlist.","operationId":"join_watchlist_api_users_watchlist_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JoinWatchlist"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/users/invite":{"post":{"tags":["accounts"],"summary":"Invite User","description":"Send invitation request to user email.\n\nAllows re-inviting deleted users (they will be restored upon registration).","operationId":"invite_user_api_users_invite_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserInvite"}}},"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":[]}]}},"/api/users/register":{"post":{"tags":["accounts"],"summary":"Register Via Invite","description":"Register user account via invite.\n\nIf a deleted user with the same email exists, restores that user instead of creating new.","operationId":"register_via_invite_api_users_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRegisterViaInvite"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/users/register-trial":{"post":{"tags":["accounts"],"summary":"Register Trial","description":"Self-serve trial signup (no invite token).\n\nOnly available while the signup window is open (billing_service.trial_signup_open);\ncreates a regular user with a personal workspace and starts a self-serve trial\nentitlement. A deleted account with the same email is not restored: it gives up the\naddress (core.accounts.deletion.release_email_of_deleted_users) and this signup\ncreates a new, empty account.\n\nRequires a work email address — consumer and disposable providers are rejected\nunless the signup carries a promo code whose campaign waives the rule.","operationId":"register_trial_api_users_register_trial_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRegisterTrial"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/users":{"get":{"tags":["accounts"],"summary":"Get All Users","description":"Retrieve user accounts.\n\nBy default returns only non-deleted users.\nPass ?deleted=true to include deleted users in the response.","operationId":"get_all_users_api_users_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"deleted","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Deleted"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/users/{user_id}":{"delete":{"tags":["accounts"],"summary":"Delete User","description":"Soft delete a user by setting deleted flag to True.\n\nOnly superadmin and admin can delete users.\nAdmin can only delete users from their own company.\nDeleted users lose access to the system and appear as non-existent during login.","operationId":"delete_user_api_users__user_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/profile":{"get":{"tags":["accounts"],"summary":"Get Profile","description":"Get profile for the current authenticated user.","operationId":"get_profile_api_profile_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"put":{"tags":["accounts"],"summary":"Update Profile","description":"Update profile for the current authenticated user.","operationId":"update_profile_api_profile_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdate"}}},"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":[]}]},"delete":{"tags":["accounts"],"summary":"Delete Profile","description":"Delete the signed-in user's own account (App Store 5.1.1(v)). Requires a fresh\ncredential: `password`, or for an Apple account `apple_authorization_code` (or\n`apple_identity_token` + `nonce`). Purges the account's data, revokes its third-party\nauthorizations, anonymises the row and stops every live token\n(core.accounts.deletion). Only ever the caller's own account.","operationId":"delete_profile_api_profile_delete","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountDelete"}}},"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":[]}]}},"/api/profile/company-details":{"post":{"tags":["accounts"],"summary":"Set Company Details","description":"The company step: the questions the institutional signup asks (firm name, firm\ntype from /signup-options, how they heard of us), answered after Sign in with\nApple. Writes them where register-trial does — the personal workspace's name and\ntype, the user's referral_source — which clears `company_details` from\nneeds_verification and opens the access gate. A member of a real (B2B) company has\nno workspace of their own to describe and is refused.","operationId":"set_company_details_api_profile_company_details_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyDetails"}}},"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":[]}]}},"/api/profile/consents":{"get":{"tags":["accounts"],"summary":"List Consents","description":"The consents the user has given, newest first (one entry per kind and version).","operationId":"list_consents_api_profile_consents_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["accounts"],"summary":"Grant Consent","description":"Record a consent, e.g. {\"kind\": \"ai_data\", \"version\": \"2026-10-20\", \"platform\": \"ios\"}\n(App Store 5.1.2(i): data goes to third-party AI providers). Granting the same kind\nand version again returns the existing record unchanged.","operationId":"grant_consent_api_profile_consents_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsentCreate"}}},"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":[]}]}},"/api/profile/investment-goals":{"put":{"tags":["accounts"],"summary":"Update Investment Goals","description":"Save the user's answer to \"What are your investment goals?\" (the first-run form, and\nthe same form on the profile page): at least one `InvestmentGoal` key. Replaces the\nwhole list. Kept in the order of `InvestmentGoal.ALL`, duplicates dropped.","operationId":"update_investment_goals_api_profile_investment_goals_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestmentGoalsUpdate"}}},"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":[]}]}},"/api/profile/tour-viewed":{"put":{"tags":["accounts"],"summary":"Mark Tour Viewed","description":"Record that the user has been through the first-run product tour: finished it, skipped\nit, or (once, from the web app) had it marked as seen in the browser before this was\nstored on the server. Sets `users.has_viewed_tour` to TRUE; idempotent, never cleared.","operationId":"mark_tour_viewed_api_profile_tour_viewed_put","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/profile/update-email-request":{"post":{"tags":["accounts"],"summary":"Request Update Email","description":"Start the process of updating the user's email address.","operationId":"request_update_email_api_profile_update_email_request_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdateEmailRequest"}}},"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":[]}]}},"/api/profile/update-email-confirm":{"post":{"tags":["accounts"],"summary":"Confirm Update Email","description":"Verify OTP and update user's email address.","operationId":"confirm_update_email_api_profile_update_email_confirm_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdateEmailConfirm"}}},"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":[]}]}},"/api/profile/set-email":{"post":{"tags":["accounts"],"summary":"Set Broker Email","description":"Set a broker user's real email in place of the auto-generated placeholder, WITHOUT\nan OTP challenge — brokers connect a real trading account, so we collect the address\nat sign-in but leave it UNVERIFIED. Verifying it later is an optional profile step.\nReplacing the placeholder is what turns the signup into a real account (it's no longer\nreap-eligible). Restricted to broker accounts / accounts still on a placeholder —\nself-serve users must prove a new address through the OTP flow above.\n`referral_source` (\"How did you hear about us?\") is saved when sent, so the\nsignup notice below carries it.","operationId":"set_broker_email_api_profile_set_email_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrokerSetEmailRequest"}}},"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":[]}]}},"/api/profile/phone/send-otp":{"post":{"tags":["accounts"],"summary":"Request Phone Verification","description":"Generate a 6-digit OTP and send it via SMS to the given phone number.\n\nAn optional sms_consent rides along in the signed verification token so the\nchoice is only written to the profile once the OTP actually checks out. When\nthe field is absent the flow behaves as before and never touches sms_consent.","operationId":"request_phone_verification_api_profile_phone_send_otp_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneSendOTP"}}},"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":[]}]}},"/api/profile/phone/verify-otp":{"post":{"tags":["accounts"],"summary":"Verify Phone Otp","description":"Verify the OTP and save the phone number as verified.\n\nsms_consent is persisted only when send-otp supplied it (it travels inside the\nverification token). Otherwise the stored flag is left as-is.","operationId":"verify_phone_otp_api_profile_phone_verify_otp_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneVerifyOTP"}}},"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":[]}]}},"/api/profile/phone/set-verified":{"post":{"tags":["accounts"],"summary":"Set Phone Verified","description":"Save the phone number and mark it verified without an OTP challenge.\n\nThis is the single entry point for every phone form now that the SMS/OTP step is\nswitched off: first-login onboarding, the profile page (add / verify / change) and\nthe \"finish your profile\" widget all post here. Flipping phone_verified makes the\ncomputed needs_verification.phone false and profile_setup.phone drop off on the\nnext /profile read.\n\nsms_consent is always sent by the caller: the forms that show the consent checkbox\nsend the box, the ones that don't (a plain number change) re-send the value already\non the profile, so a phone update never silently revokes a consent. The OTP\nendpoints above are kept intact so the SMS-confirmation flow can be switched back\non without a migration.","operationId":"set_phone_verified_api_profile_phone_set_verified_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneSetVerified"}}},"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":[]}]}},"/api/profile-image":{"put":{"tags":["accounts"],"summary":"Update Profile Image","description":"Update profile image for the current authenticated user.","operationId":"update_profile_image_api_profile_image_put","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_update_profile_image_api_profile_image_put"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/users/{user_id}/modify-access":{"post":{"tags":["accounts"],"summary":"Modify Access","description":"Modify access of user accounts.","operationId":"modify_access_api_users__user_id__modify_access_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserModifyAccess"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/users/reset-password-request":{"post":{"tags":["accounts"],"summary":"Reset Password Request","description":"Request for resetting user account password.\n\nThe answer is the same whether or not the address has an account, so the form cannot be\nused to find out who is a customer. Turnstile for browsers.","operationId":"reset_password_request_api_users_reset_password_request_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResetPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/users/reset-password":{"post":{"tags":["accounts"],"summary":"Reset Password","description":"Reset account password via email instructions.","operationId":"reset_password_api_users_reset_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResetPassword"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/latest-analytics-report":{"get":{"tags":["accounts"],"summary":"Download Latest Analytics Report","description":"Download latest analytics report.","operationId":"download_latest_analytics_report_api_latest_analytics_report_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/analytics/pages":{"post":{"tags":["accounts"],"summary":"Get Pages Analytics","description":"Get 'Pages' analytics from piwik.","operationId":"get_pages_analytics_api_analytics_pages_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsPages"}}},"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":[]}]}},"/api/auth/brokers/link":{"post":{"tags":["accounts"],"summary":"Link Existing Account To Broker","description":"Links an external broker identity to an existing user account.","operationId":"link_existing_account_to_broker_api_auth_brokers_link_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrokerLinkAccount"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/brokers/register/initiate":{"post":{"tags":["accounts"],"summary":"Request Broker Account Registration","description":"Start broker registration process with OTP.","operationId":"request_broker_account_registration_api_auth_brokers_register_initiate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrokerRegister"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/brokers/register/finalize":{"post":{"tags":["accounts"],"summary":"Verify Otp And Create Broker Account","description":"Verify OTP and create broker account.","operationId":"verify_otp_and_create_broker_account_api_auth_brokers_register_finalize_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrokerVerify"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/documents":{"get":{"tags":["admin"],"summary":"List Documents","description":"List all documents.","operationId":"list_documents_api_admin_documents_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"put":{"tags":["admin"],"summary":"Update Multiple Documents","description":"Update multiple documents.","operationId":"update_multiple_documents_api_admin_documents_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentBulkUpdate"}}},"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":[]}]},"post":{"tags":["admin"],"summary":"Create Document","description":"Create a document.","operationId":"create_document_api_admin_documents_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentCreate"}}},"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":[]}]}},"/api/admin/documents-public":{"get":{"tags":["admin"],"summary":"List Public Documents","description":"List all public documents.","operationId":"list_public_documents_api_admin_documents_public_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/documents/{doc_id}":{"delete":{"tags":["admin"],"summary":"Delete Document","description":"Delete a document.","operationId":"delete_document_api_admin_documents__doc_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"doc_id","in":"path","required":true,"schema":{"type":"integer","title":"Doc 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 Document","description":"Update a document.","operationId":"update_document_api_admin_documents__doc_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"doc_id","in":"path","required":true,"schema":{"type":"integer","title":"Doc Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/documents/{doc_id}/download":{"get":{"tags":["admin"],"summary":"Download Document","description":"Download a document.","operationId":"download_document_api_admin_documents__doc_id__download_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"doc_id","in":"path","required":true,"schema":{"type":"integer","title":"Doc Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/documents/{doc_id}/upload-file":{"put":{"tags":["admin"],"summary":"Upload Document File","description":"Upload document file.\n\nTo set the document, send it with the 'document' key.\nTo unset the document, do not send anything.","operationId":"upload_document_file_api_admin_documents__doc_id__upload_file_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"doc_id","in":"path","required":true,"schema":{"type":"integer","title":"Doc Id"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_document_file_api_admin_documents__doc_id__upload_file_put"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/documents/{doc_id}/download-public":{"post":{"tags":["admin"],"summary":"Download Public Document","description":"Download a public document that may or may not require approval.\n\nThese documents can be downloaded by users that are not part of The Financial AI.","operationId":"download_public_document_api_admin_documents__doc_id__download_public_post","parameters":[{"name":"doc_id","in":"path","required":true,"schema":{"type":"integer","title":"Doc Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DownloadProtectedDocument"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api7ef60849-73b50x_4zzT-4012-943c-bb2148b85631-BB8Gc{doc_id}N3Vbf-qV9GF1l_wB2ibReTJ-62jCsUyBP-nnXLLZv":{"get":{"tags":["admin"],"summary":"Serve Public Document","description":"Serve a public document directly (for approved/public access URLs).","operationId":"serve_public_document_api7ef60849_73b50x_4zzT_4012_943c_bb2148b85631_BB8Gc_doc_id_N3Vbf_qV9GF1l_wB2ibReTJ_62jCsUyBP_nnXLLZv_get","parameters":[{"name":"doc_id","in":"path","required":true,"schema":{"type":"integer","title":"Doc Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/public-documents-downloads":{"get":{"tags":["admin"],"summary":"Public Documents Downloads","description":"Public documents downloads tracker.","operationId":"public_documents_downloads_api_admin_public_documents_downloads_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/approval-list":{"get":{"tags":["admin"],"summary":"Get Approval List","description":"Return the approval list.","operationId":"get_approval_list_api_admin_approval_list_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/approval-list/{id}":{"put":{"tags":["admin"],"summary":"Update Approval List","description":"Update an approval list item.","operationId":"update_approval_list_api_admin_approval_list__id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","title":"Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalListUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/watchlist":{"get":{"tags":["admin"],"summary":"Get Watchlist","description":"Get the watchlist.","operationId":"get_watchlist_api_admin_watchlist_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/watchlist/delete":{"post":{"tags":["admin"],"summary":"Delete Watchlist","description":"Delete emails from the watchlist.\n\nThe FAI Chat mailing list is deliberately left alone: waitlist joiners and\nsignups now share it, so unsubscribing here would drop someone off a list\nthey may have reached through another route. Clearing them out of the mailing\nlist stays a Communicator decision.","operationId":"delete_watchlist_api_admin_watchlist_delete_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteWatchlist"}}},"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":[]}]}},"/api/admin/notifications/broadcast":{"post":{"tags":["admin"],"summary":"Broadcast Notification","description":"Broadcast a notification to all active users.","operationId":"broadcast_notification_api_admin_notifications_broadcast_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BroadcastNotification"}}},"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":[]}]}},"/api/admin/users/{user_id}/entitlement":{"get":{"tags":["admin"],"summary":"Get User Entitlement","description":"Return a user's entitlement (status, trial/access dates, source) for the admin view.","operationId":"get_user_entitlement_api_admin_users__user_id__entitlement_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User 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":"Set User Entitlement","description":"Set or modify a user's platform entitlement — their free period / status.\nWorks for any user (Tradier, TradeStation, or invited). Use free_days for a\nbounded free window, omit it for indefinite, or trial_days to (re)start a trial.","operationId":"set_user_entitlement_api_admin_users__user_id__entitlement_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntitlementUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/users/{user_id}/payments":{"get":{"tags":["admin"],"summary":"Get User Payments","description":"Return a user's payment history (amount, date, receipt) for the admin view.","operationId":"get_user_payments_api_admin_users__user_id__payments_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/readership":{"get":{"tags":["admin"],"summary":"Get Readership","description":"Readership of our forecast reports, relayed from the reports pipeline.\n\nThe query string (granularity, start, end) goes through as is, and so does\nthe pipeline's answer, including its 400 for a bad date.","operationId":"get_readership_api_admin_readership_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/auth/refresh-token":{"post":{"tags":["auth"],"summary":"Get Refresh Token","description":"Obtain a refresh token.\n\nRefresh token is used to issue access tokens.\nFor convenience, an access token is returned as well.\n\nBrowsers pass Cloudflare Turnstile (core.auth.turnstile): the sign-in page, the session lock\nin the app, the admin console and the older login card all send a token (the check is\ninvisible unless Cloudflare suspects automation). The native app sends no Origin and is not\nasked. No time-based lockouts (PO, 2026-10-29).","operationId":"get_refresh_token_api_auth_refresh_token_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshToken"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/access-token":{"post":{"tags":["auth"],"summary":"Get Access Token","description":"Obtain an access token.\n\nThe access token is used to query API endpoints.","operationId":"get_access_token_api_auth_access_token_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessToken"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/apple":{"post":{"tags":["auth"],"summary":"Sign In With Apple","description":"Sign in with Apple (core.auth.apple). Verifies the identity token against Apple's\nkeys (issuer, audience in APPLE_CLIENT_IDS, expiry, nonce), then signs the Apple ID\nin, links it to an existing account (both addresses verified), or creates a trial\naccount. `onboarding_required` is true only while the company step is owed\n(POST /api/profile/company-details): the app opens the company form on it.\nWith `signup: \"choose\"` (app builds since 2026-11-06) nothing is created here: a new Apple\nID, or an account that still owes the company step, gets the website's sign-up ticket\n({kind: \"signup\", ticket, email, first_name, last_name}) and finishes with\nPOST /api/auth/signup/individual or /professional.","operationId":"sign_in_with_apple_api_auth_apple_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppleSignIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/apple/android":{"post":{"tags":["auth"],"summary":"Apple Android Return","description":"Apple's web flow for the Android app returns here (form_post: code, id_token, state, user).\nThe answer sends it on to the app: an intent URL that sign_in_with_apple's\nSignInWithAppleCallback activity takes, and the app then calls POST /api/auth/apple as on\nan iPhone. Nothing is checked or kept here: the token and its nonce are checked there.","operationId":"apple_android_return_api_auth_apple_android_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/auth/exchange":{"post":{"tags":["auth"],"summary":"Exchange Sign In Code","description":"Redeem the one-time code a mobile broker sign-in handed back to the app\n(core.auth.handoff) for an access + refresh token pair. A code works once, for 60 s,\nand only with its code_verifier when the login carried a code_challenge.","operationId":"exchange_sign_in_code_api_auth_exchange_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodeExchange"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/tradestation/login":{"get":{"tags":["auth"],"summary":"Tradestation Login","description":"Initiate TradeStation SSO sign-in with full broker scopes.\n\nFull scopes are required to verify the user meets the partnership minimum\naccount balance requirement (TS_MIN_ACCOUNT_BALANCE).\nPortfolio linking is a separate flow via /api/brokers/tradestation/connect.\n\n`redirect_uri` (mobile app, allow-listed) makes the callback 302 back to the app\nwith a one-time code instead of the web's popup page (core.auth.handoff).","operationId":"tradestation_login_api_auth_tradestation_login_get","parameters":[{"name":"redirect_uri","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Redirect Uri"}},{"name":"code_challenge","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Challenge"}},{"name":"code_challenge_method","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Challenge Method"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/tradestation/callback":{"get":{"tags":["auth"],"summary":"Tradestation Callback","description":"Handle TradeStation OAuth callback.\n\nRoutes to the appropriate handler based on the mode encoded in the state token:\n- 'sso': Identity-only sign-in (creates/finds user, no BrokerConnection)\n- 'broker_connect': Links TS portfolio to an existing authenticated user","operationId":"tradestation_callback_api_auth_tradestation_callback_get","parameters":[{"name":"code","in":"query","required":true,"schema":{"type":"string","title":"Code"}},{"name":"state","in":"query","required":true,"schema":{"type":"string","title":"State"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/tradier/login":{"get":{"tags":["auth"],"summary":"Tradier Login","description":"Initiate Tradier SSO sign-in.\nNo balance gate, no OIDC — identity comes from GET /user/profile after the exchange.\n`redirect_uri`: mobile hand-back, as for /tradestation/login.","operationId":"tradier_login_api_auth_tradier_login_get","parameters":[{"name":"redirect_uri","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Redirect Uri"}},{"name":"code_challenge","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Challenge"}},{"name":"code_challenge_method","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Challenge Method"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/tradier/callback":{"get":{"tags":["auth"],"summary":"Tradier Callback","description":"Handle Tradier OAuth callback.\n\nRoutes based on mode in the state token:\n- 'sso': Sign-in / create user from Tradier identity. Auto-links portfolio on first login.\n- 'broker_connect': Links Tradier portfolio to an already-authenticated user.","operationId":"tradier_callback_api_auth_tradier_callback_get","parameters":[{"name":"code","in":"query","required":true,"schema":{"type":"string","title":"Code"}},{"name":"state","in":"query","required":true,"schema":{"type":"string","title":"State"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/webull/login":{"get":{"tags":["auth"],"summary":"Webull Login","description":"Initiate Webull SSO sign-in. Identity comes from the token exchange (`identity_id`):\nWebull gives no email or name.","operationId":"webull_login_api_auth_webull_login_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/auth/webull/callback":{"get":{"tags":["auth"],"summary":"Webull Callback","description":"Handle the Webull OAuth callback. Routes on the mode in the state token:\n- 'sso': sign in or create the user of this Webull identity; links the portfolio\n  when the user has no Webull connection, and starts the broker trial.\n- 'broker_connect': links Webull to the already-authenticated user.","operationId":"webull_callback_api_auth_webull_callback_get","parameters":[{"name":"state","in":"query","required":true,"schema":{"type":"string","title":"State"}},{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/snaptrade/brokers":{"get":{"tags":["auth"],"summary":"Snaptrade Brokers","description":"Public list of featured SnapTrade brokers (slug, name, logo) to render as\none-click sign-in / connect options. Env-aware (Alpaca only on non-prod).","operationId":"snaptrade_brokers_api_auth_snaptrade_brokers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/auth/snaptrade/login":{"get":{"tags":["auth"],"summary":"Snaptrade Login","description":"Initiate SnapTrade SSO sign-in. Borrows an already-paid-for SnapTrade user from\nthe hollow pool, or registers a fresh one when the pool is empty, parks the creds\non a pending signup keyed by a random state, and redirects to the connection\nportal. The state rides back in a cookie and the portal redirect.\n\n`broker` (optional SnapTrade slug) deep-links straight to that broker.\n`redirect_uri`: mobile hand-back, as for /tradestation/login (kept in Redis by state).","operationId":"snaptrade_login_api_auth_snaptrade_login_get","parameters":[{"name":"broker","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Broker"}},{"name":"redirect_uri","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Redirect Uri"}},{"name":"code_challenge","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Challenge"}},{"name":"code_challenge_method","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Challenge Method"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/snaptrade/callback":{"get":{"tags":["auth"],"summary":"Snaptrade Callback","description":"Handle the SnapTrade connection-portal return. Resolves the pending signup,\nkeeps only non-paper accounts, then creates/logs-in the user and grants a\ntrial. Paper-only (or empty) connections are rejected.","operationId":"snaptrade_callback_api_auth_snaptrade_callback_get","parameters":[{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/options":{"get":{"tags":["auth"],"summary":"Auth Options","description":"What the sign-in pages may offer here: the Turnstile site key, Google, Apple, the trial.\n`apple_services_id` is the client id the Android app gives Apple's web flow (public: it is\nin every Apple sign-in URL).","operationId":"auth_options_api_auth_options_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/auth/email-link/start":{"post":{"tags":["auth"],"summary":"Email Link Start","operationId":"email_link_start_api_auth_email_link_start_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailLinkStart"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/email-link/verify":{"post":{"tags":["auth"],"summary":"Email Link Verify","operationId":"email_link_verify_api_auth_email_link_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailLinkVerify"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/signup/individual":{"post":{"tags":["auth"],"summary":"Signup Individual","operationId":"signup_individual_api_auth_signup_individual_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndividualSignup"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/signup/professional":{"post":{"tags":["auth"],"summary":"Signup Professional","operationId":"signup_professional_api_auth_signup_professional_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfessionalSignup"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/google/start":{"get":{"tags":["auth"],"summary":"Google Start","operationId":"google_start_api_auth_google_start_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/auth/apple/start":{"get":{"tags":["auth"],"summary":"Apple Start","operationId":"apple_start_api_auth_apple_start_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/brokers/tradestation/connect":{"post":{"tags":["brokers"],"summary":"Tradestation Connect","description":"Initiate connecting TradeStation as a broker (portfolio linking).\n\nReturns a URL that the frontend opens in a popup. Uses full trading scopes.\nThis is separate from the SSO sign-in flow which is identity-only.\n\n`redirect_uri` (mobile app): the callback hands back to the app (module docstring).","operationId":"tradestation_connect_api_brokers_tradestation_connect_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"redirect_uri","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Redirect Uri"}},{"name":"code_challenge","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Challenge"}},{"name":"code_challenge_method","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Challenge Method"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/brokers/tradestation/accounts":{"get":{"tags":["brokers"],"summary":"Tradestation Accounts","description":"List TradeStation brokerage accounts for the current user.\nRequires an active TradeStation broker connection.\nFalls back to SIM accounts if no live accounts are found.","operationId":"tradestation_accounts_api_brokers_tradestation_accounts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/brokers/tradestation/accounts/{account_id}/positions":{"get":{"tags":["brokers"],"summary":"Tradestation Positions","description":"Get positions for a specific TradeStation account.\nTries live API first, falls back to SIM API for development.","operationId":"tradestation_positions_api_brokers_tradestation_accounts__account_id__positions_get","security":[{"HTTPBearer":[]}],"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"}}}}}}},"/api/brokers/tradestation":{"delete":{"tags":["brokers"],"summary":"Tradestation Disconnect","description":"Disconnect TradeStation (removes broker connection for current user).\nReturns new access/refresh tokens so the client's user payload reflects the removal.","operationId":"tradestation_disconnect_api_brokers_tradestation_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/brokers/snaptrade/connect":{"post":{"tags":["brokers"],"summary":"Snaptrade Connect","description":"Generates a SnapTrade Connection Portal URL.\n\n`broker` (optional SnapTrade slug, e.g. 'ROBINHOOD') deep-links the portal\nstraight to that broker instead of showing SnapTrade's broker picker.\n\n`redirect_uri` (mobile app): the portal returns to the app through\n/snaptrade/connect/return instead of the web's Connected Accounts page. A\ncode_challenge is checked like the other routes' but unused: no code is issued.","operationId":"snaptrade_connect_api_brokers_snaptrade_connect_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"broker","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Broker"}},{"name":"redirect_uri","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Redirect Uri"}},{"name":"code_challenge","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Challenge"}},{"name":"code_challenge_method","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Challenge Method"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/brokers/snaptrade/connect/return":{"get":{"tags":["brokers"],"summary":"Snaptrade Connect Return","description":"Where the SnapTrade portal sends an app's connect when it is done (its\ncustom_redirect, with `status` and connection details appended): a 302 to the\napp, `redirect_uri?broker=snaptrade&status=…`. Carries nothing secret, so it\nneeds no session; the app reloads its accounts itself. A redirect_uri off the\nallow-list lands on the web's Connected Accounts page, as the web's connect does.","operationId":"snaptrade_connect_return_api_brokers_snaptrade_connect_return_get","parameters":[{"name":"redirect_uri","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Redirect Uri"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/brokers/snaptrade/accounts":{"get":{"tags":["brokers"],"summary":"Snaptrade Accounts","description":"Lists connected SnapTrade accounts.\n\nReconciles ownership first (parity with Tradier/TradeStation): an account\nalready owned by another user is disconnected and excluded, so it never shows\nup here. Unclaimed accounts are reserved for this user. Returns the accepted\naccounts (same bare-list shape as before).\n\nEach account's `id` is the durable key, not SnapTrade's rotating handle — see\nexpose_account.","operationId":"snaptrade_accounts_api_brokers_snaptrade_accounts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/brokers/snaptrade/accounts/{account_id}/positions":{"get":{"tags":["brokers"],"summary":"Snaptrade Positions","description":"Gets positions for a specific SnapTrade account.","operationId":"snaptrade_positions_api_brokers_snaptrade_accounts__account_id__positions_get","security":[{"HTTPBearer":[]}],"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"}}}}}}},"/api/brokers/snaptrade/accounts/{account_id}":{"delete":{"tags":["brokers"],"summary":"Snaptrade Disconnect","description":"Disconnects a SnapTrade account (removes authorization).","operationId":"snaptrade_disconnect_api_brokers_snaptrade_accounts__account_id__delete","security":[{"HTTPBearer":[]}],"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"}}}}}}},"/api/brokers/tradier/connect":{"post":{"tags":["brokers"],"summary":"Tradier Connect","description":"Initiate connecting Tradier as a broker. \nReturns a URL the frontend opens in a popup.\n`redirect_uri` (mobile app): the callback hands back to the app (module docstring).","operationId":"tradier_connect_api_brokers_tradier_connect_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"redirect_uri","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Redirect Uri"}},{"name":"code_challenge","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Challenge"}},{"name":"code_challenge_method","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Challenge Method"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/brokers/tradier/accounts":{"get":{"tags":["brokers"],"summary":"Tradier Accounts","description":"List Tradier brokerage accounts for the current user.","operationId":"tradier_accounts_api_brokers_tradier_accounts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/brokers/tradier/accounts/{account_id}/positions":{"get":{"tags":["brokers"],"summary":"Tradier Positions","description":"Get positions for a specific Tradier account.","operationId":"tradier_positions_api_brokers_tradier_accounts__account_id__positions_get","security":[{"HTTPBearer":[]}],"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"}}}}}}},"/api/brokers/tradier":{"delete":{"tags":["brokers"],"summary":"Tradier Disconnect","description":"Disconnect Tradier (removes broker connection). Returns reissued JWTs.","operationId":"tradier_disconnect_api_brokers_tradier_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/brokers/webull/connect":{"post":{"tags":["brokers"],"summary":"Webull Connect","description":"Initiate connecting Webull as a broker. Returns a URL the frontend opens in a popup.","operationId":"webull_connect_api_brokers_webull_connect_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/brokers/webull/accounts":{"get":{"tags":["brokers"],"summary":"Webull Accounts","description":"List Webull brokerage accounts for the current user.","operationId":"webull_accounts_api_brokers_webull_accounts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/brokers/webull/accounts/{account_id}/positions":{"get":{"tags":["brokers"],"summary":"Webull Positions","description":"Get positions for a specific Webull account.","operationId":"webull_positions_api_brokers_webull_accounts__account_id__positions_get","security":[{"HTTPBearer":[]}],"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"}}}}}}},"/api/brokers/webull":{"delete":{"tags":["brokers"],"summary":"Webull Disconnect","description":"Disconnect Webull (removes broker connection). Returns reissued JWTs.","operationId":"webull_disconnect_api_brokers_webull_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/billing/trial-terms":{"get":{"tags":["billing"],"summary":"Billing Trial Terms","description":"The trial's length (self-serve and broker) and question limit, from the console settings. No auth.","operationId":"billing_trial_terms_api_billing_trial_terms_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/billing/status":{"get":{"tags":["billing"],"summary":"Billing Status","description":"Return the caller's entitlement status (status, dates, needs_payment).","operationId":"billing_status_api_billing_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/billing/checkout-session":{"post":{"tags":["billing"],"summary":"Billing Checkout Session","description":"Start a subscription. Returns {url, mode}: 'checkout' for a new subscription,\nor 'portal' if the user already has a live subscription (manage, don't duplicate).","operationId":"billing_checkout_session_api_billing_checkout_session_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/billing/cancel":{"post":{"tags":["billing"],"summary":"Billing Cancel","description":"Cancel the user's subscription at period end (keeps paid-for access until then).","operationId":"billing_cancel_api_billing_cancel_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/billing/resume":{"post":{"tags":["billing"],"summary":"Billing Resume","description":"Undo a pending cancellation before the period ends.","operationId":"billing_resume_api_billing_resume_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/billing/payments":{"get":{"tags":["billing"],"summary":"Billing Payments","description":"Return the caller's payment history (most recent first).","operationId":"billing_payments_api_billing_payments_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/billing/portal":{"post":{"tags":["billing"],"summary":"Billing Portal","description":"Create a Stripe billing-portal session and return its URL.","operationId":"billing_portal_api_billing_portal_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/billing/webhook":{"post":{"tags":["billing"],"summary":"Billing Webhook","description":"Stripe webhook endpoint. Verifies the signature, then updates entitlements.","operationId":"billing_webhook_api_billing_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/insights/articles":{"get":{"tags":["insights"],"summary":"List Articles","operationId":"list_articles_api_insights_articles_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/insights/search":{"get":{"tags":["insights"],"summary":"Search Articles","description":"Slugs of the articles that contain every word of `q` anywhere in their text (the page filters its list).","operationId":"search_articles_api_insights_search_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/insights/covers/{version}/{name}":{"get":{"tags":["insights"],"summary":"Get Cover","description":"A card's small cover (covers.py). The URL names one version of one original, so it is cached for a year.","operationId":"get_cover_api_insights_covers__version___name__get","parameters":[{"name":"version","in":"path","required":true,"schema":{"type":"string","title":"Version"}},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/insights/articles/{key}":{"get":{"tags":["insights"],"summary":"Get Article","operationId":"get_article_api_insights_articles__key__get","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"}}}}}}},"/api/profile/features":{"get":{"tags":["access"],"summary":"My Features","operationId":"my_features_api_profile_features_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/users/{user_id}/features":{"get":{"tags":["access"],"summary":"User Features","operationId":"user_features_api_admin_users__user_id__features_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["access"],"summary":"Update User Features","operationId":"update_user_features_api_admin_users__user_id__features_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureAccessUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/risk-management-policies":{"get":{"tags":["chat"],"summary":"List Risk Management Policies","description":"Retrieve risk management policy.","operationId":"list_risk_management_policies_api_chat_risk_management_policies_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["chat"],"summary":"Create Or Update Risk Management Policy","description":"Create or update risk management policy.","operationId":"create_or_update_risk_management_policy_api_chat_risk_management_policies_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRiskManagementPolicyRequest"}}},"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":[]}]}},"/api/chat/strategies":{"get":{"tags":["chat"],"summary":"List Strategies","description":"List strategies.","operationId":"list_strategies_api_chat_strategies_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["chat"],"summary":"Create Strategy","description":"Create strategy (with the chat it was saved from, when that chat is the caller's).","operationId":"create_strategy_api_chat_strategies_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateStrategyRequest"}}},"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":[]}]}},"/api/chat/strategies/{strategy_id}":{"put":{"tags":["chat"],"summary":"Update Strategy","description":"Update strategy.","operationId":"update_strategy_api_chat_strategies__strategy_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateStrategyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["chat"],"summary":"Delete Strategy","description":"Delete strategy.","operationId":"delete_strategy_api_chat_strategies__strategy_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/strategies/reorder":{"post":{"tags":["chat"],"summary":"Reorder Strategies","description":"Reorder strategies.","operationId":"reorder_strategies_api_chat_strategies_reorder_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReorderStrategyRequest"}}},"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":[]}]}},"/api/chat/strategies/{strategy_id}/rerun":{"post":{"tags":["chat"],"summary":"Rerun Intraday Strategy","description":"Re-execute a saved intraday strategy's Python code and refresh its performance.\n\nUnlike the declarative single/multi strategies, an intraday strategy stores\nraw Python (config.config.code). We dispatch that code to the agent worker,\nwhich runs it and sends back a fresh equity curve; the completion handler\npersists it to the strategy's performance (see websocket.py).","operationId":"rerun_intraday_strategy_api_chat_strategies__strategy_id__rerun_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/strategies/{strategy_id}/rerun/status":{"get":{"tags":["chat"],"summary":"Get Intraday Strategy Rerun Status","description":"Get the latest intraday strategy rerun status/result for the current user.","operationId":"get_intraday_strategy_rerun_status_api_chat_strategies__strategy_id__rerun_status_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/screeners":{"get":{"tags":["chat"],"summary":"List Screeners","description":"List screeners.","operationId":"list_screeners_api_chat_screeners_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["chat"],"summary":"Create Screener","description":"Create screener.\n\nData structure:\n- data: The screening data (table rows)\n- config: Screening config (title, formula, type, etc.)\n- meta: Metadata (name, user_question, etc.)","operationId":"create_screener_api_chat_screeners_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateScreenerRequest"}}},"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":[]}]}},"/api/chat/screeners/{screener_id}":{"put":{"tags":["chat"],"summary":"Update Screener","description":"Update screener.\n\nUpdates any of: data (table rows), config, meta, active, order.\nOnly fields provided in the request will be updated.","operationId":"update_screener_api_chat_screeners__screener_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"screener_id","in":"path","required":true,"schema":{"type":"string","title":"Screener Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateScreenerRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["chat"],"summary":"Delete Screener","description":"Delete screener.","operationId":"delete_screener_api_chat_screeners__screener_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"screener_id","in":"path","required":true,"schema":{"type":"string","title":"Screener Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/screeners/reorder":{"post":{"tags":["chat"],"summary":"Reorder Screeners","description":"Reorder screeners.","operationId":"reorder_screeners_api_chat_screeners_reorder_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReorderScreenerRequest"}}},"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":[]}]}},"/api/chat/screeners/{screener_id}/rerun":{"post":{"tags":["chat"],"summary":"Rerun Screener","description":"Rerun a screener.\n\n- Looks up the screener by ID and verifies it belongs to the current user.\n- Dispatches the live screening task to Celery.\n- Returns the task ID for tracking.","operationId":"rerun_screener_api_chat_screeners__screener_id__rerun_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"screener_id","in":"path","required":true,"schema":{"type":"string","title":"Screener Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/admin/examples":{"post":{"tags":["chat"],"summary":"Create Example","description":"Create example.","operationId":"create_example_api_chat_admin_examples_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateExampleRequest"}}},"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":[]}]}},"/api/chat/admin/examples/{example_id}":{"put":{"tags":["chat"],"summary":"Update Example","description":"Update example.","operationId":"update_example_api_chat_admin_examples__example_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"example_id","in":"path","required":true,"schema":{"type":"integer","title":"Example Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateExampleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["chat"],"summary":"Delete Example","description":"Delete example.","operationId":"delete_example_api_chat_admin_examples__example_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"example_id","in":"path","required":true,"schema":{"type":"integer","title":"Example Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/examples":{"get":{"tags":["chat"],"summary":"List Examples","description":"Examples related endpoint.","operationId":"list_examples_api_chat_examples_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"categories_only","in":"query","required":false,"schema":{"type":"string","default":"","title":"Categories Only"}},{"name":"category","in":"query","required":false,"schema":{"type":"string","default":"","title":"Category"}},{"name":"example_id","in":"query","required":false,"schema":{"type":"string","default":"","title":"Example Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/projects":{"get":{"tags":["chat"],"summary":"List Projects","description":"List projects.","operationId":"list_projects_api_chat_projects_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["chat"],"summary":"Create Project","description":"Create project.","operationId":"create_project_api_chat_projects_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProjectRequest"}}},"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":[]}]}},"/api/chat/projects/{project_id}":{"put":{"tags":["chat"],"summary":"Update Project","description":"Update project.","operationId":"update_project_api_chat_projects__project_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProjectRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["chat"],"summary":"Delete Project","description":"Delete a folder; its chats are moved to Recent rather than deleted.\n\nThe chats are detached (`project_id = NULL`) and their `updated_at` set to now, so\nthey land at the top of Recent. The cache is updated as well: `get_sessions` lets a\ncached `project_id` win over the DB one, so a chat still cached under the deleted\nfolder would otherwise be filtered out of Recent until its cache entry expired.","operationId":"delete_project_api_chat_projects__project_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/sessions":{"get":{"tags":["chat"],"summary":"Get Sessions","description":"Retrieve chat sessions with cursor-based pagination.\n\n`name` narrows the list to sessions whose name contains it (case-insensitive,\nat least 3 characters — anything shorter is ignored). `total` and the cursor then\ndescribe the matching sessions only.\n\nUses cache-through pattern: reads from Redis cache first, falls back to DB.\nSession names are always fresh from cache (updated immediately on rename).","operationId":"get_sessions_api_chat_sessions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}},{"name":"next_token","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Token"}},{"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"}}}}}}},"/api/chat/sessions/search":{"get":{"tags":["chat"],"summary":"Search Sessions","description":"Search chat sessions by session name and by the user's own questions.\n\nOnly `role = human` messages are searched, and the match runs in MySQL: AI answers\ncarry whole tables and chart data in `messages.text`, and loading every one of them\nto search in Python took minutes for users with many chats.\n\nThe search is two queries on purpose. A query that filters on `text` makes InnoDB\nfetch the JSON of every row it looks at, and the table is gigabytes of AI answers:\nwithout an index that was every row of the table, 80 s on dev. So the question ids\nare picked first, reading no `text` -- from `ix_messages_client_role_session` alone\n(V0106), or by a scan of the table's pages where that index is missing -- and only\nthose rows are then searched, by primary key. Keep it two queries: one query lets the\noptimizer read `text` for rows the index has not yet narrowed down.","operationId":"search_sessions_api_chat_sessions_search_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"query","in":"query","required":false,"schema":{"type":"string","title":"Query"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}},{"name":"next_token","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Token"}},{"name":"project_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/sessions/{session_id}/messages":{"get":{"tags":["chat"],"summary":"Get Session History","description":"Retrieve message history for a chat session.","operationId":"get_session_history_api_chat_sessions__session_id__messages_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/sessions/sample-prompt":{"post":{"tags":["chat"],"summary":"Create Session From Sample Prompt","description":"Start a new conversation that opens with a sample prompt, already answered.\n\nWhat a recommendation card on the empty chat does when it is picked. Same pair as\nappend_sample_prompt_to_session, but into a session this call creates: the id is\nminted here rather than sent up, so a caller cannot choose -- or collide with --\nanother conversation's id.\n\n`project_id` files the new session in a folder; omitted or '0' leaves it in Recent\nChats. Returns the new session alongside both messages.\n\nA prompt that cannot be used answers with ErrorCode.e900, and nothing is created.","operationId":"create_session_from_sample_prompt_api_chat_sessions_sample_prompt_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppendSamplePromptRequest"}}},"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":[]}]}},"/api/chat/sessions/{session_id}/sample-prompt":{"post":{"tags":["chat"],"summary":"Append Sample Prompt To Session","description":"Write a sample prompt into a conversation as a finished question/answer pair.\n\nWhat the follow-up cards under an answer do when one is clicked. The suggestion\nnames a prompt the bank already holds a full answer for, so there is nothing to\nask the agent: the pair is stored directly and the chat is left as though the\nquestion had been asked and answered.\n\nStored, not just rendered -- that is the point of the endpoint. Appending the pair\nclient-side would put it on screen and lose it on the next session switch, and the\nconversation would then read as though the follow-up had never happened.\n\nBoth ids are placed after everything already in the session rather than minted from\nthe clock alone -- see below. An id is a position, and the ids around it were not\nissued by this machine.\n\nReturns both messages in the shape the history endpoint returns them, `data` and\nall, so the caller appends exactly what a reload would have given it.\n\nA prompt that has been deleted, hidden, or left without a stored answer answers with\nErrorCode.e900. That is a routine outcome, not a failure: a card can outlive the\nprompt behind it, and the chat page responds by asking the question of the agent\ninstead. Anything else that goes wrong stays a failure the caller reports.","operationId":"append_sample_prompt_to_session_api_chat_sessions__session_id__sample_prompt_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppendSamplePromptRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/recommendations/session":{"get":{"tags":["chat"],"summary":"Get Recommendation Session","description":"The chat a set of recommended prompts was already opened into, or null.\n\nAsked by `/chat?recommended_prompts=...` before it shows the cards on an empty chat: when\nthe set has a chat (a card was picked from it before), the page moves into that chat, so\nthe same link never starts a second one. A chat deleted since counts as none.","operationId":"get_recommendation_session_api_chat_recommendations_session_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"prompt_ids","in":"query","required":true,"schema":{"type":"string","description":"Comma-separated ids of the recommended set.","title":"Prompt Ids"},"description":"Comma-separated ids of the recommended set."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/sessions/{session_id}/recommendations":{"get":{"tags":["chat"],"summary":"Get Session Recommendations","description":"The recommended cards of a chat and which of them are open in it; null for any other chat.\n\nRead by the chat page for every chat it opens, so the cards stay on top of a\nrecommendation chat however it was reached (the link, the sidebar, a reload). Answers\nwhose question is no longer in the chat are left out: that card can be opened again.","operationId":"get_session_recommendations_api_chat_sessions__session_id__recommendations_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/recommendations/open":{"post":{"tags":["chat"],"summary":"Open Recommended Prompt","description":"Open a recommended card: its stored question/answer goes into the set's chat.\n\nThe set's chat is created by the first card picked from it (named \"Recommended prompts ·\n<date>\") and every later card is written into the same chat. A card already open in the\nchat is not written again: `messages` is empty and `opened_message_id` names its\nquestion, for the page to scroll to.\n\nReturns `session` (the set's chat), `created` (whether this call made it), `messages`\n(the new pair, as the history endpoint returns messages), `opened_message_id` and\n`recommendations` (the cards' state, as GET /chat/sessions/{id}/recommendations).\n\nA prompt that cannot be used answers with ErrorCode.e900, like the sample-prompt routes.","operationId":"open_recommended_prompt_api_chat_recommendations_open_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenRecommendedPromptRequest"}}},"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":[]}]}},"/api/chat/recommendations/weekly":{"get":{"tags":["chat"],"summary":"Get Weekly Recommendations","description":"This week's recommended Sample prompts for the caller, shown on a new chat's start screen.\n\nThe picks are the weekly build's (odin-agent writes them to `prompt_recommendations`, the\nsame rows the Thursday e-mail sends), so only a returning user has any: the build skips\naccounts made in the week it runs. null when the user has no build newer than\nWEEKLY_MAX_AGE_DAYS, or none of its prompts can be shown.\n\nReturns `prompt_ids` (the set, as the e-mail's link names it: a card is opened with\nPOST /chat/recommendations/open into the set's one chat), `prompts` (the cards, slot\norder, each with the e-mail's `label`), `generated_at` (when the build ran, UTC: the\nweek the picks are for), `session` (the set's chat when a card was opened\nbefore, from here or from the e-mail) and `answers` (the cards open in it).","operationId":"get_weekly_recommendations_api_chat_recommendations_weekly_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/chat/sessions/{session_id}":{"put":{"tags":["chat"],"summary":"Update Session","description":"Update chat session.","operationId":"update_session_api_chat_sessions__session_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSessionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["chat"],"summary":"Delete Session","description":"Delete chat session.","operationId":"delete_session_api_chat_sessions__session_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/sessions/bulk-delete":{"post":{"tags":["chat"],"summary":"Bulk Delete Sessions","description":"Delete several chat sessions at once, by id or by folder.","operationId":"bulk_delete_sessions_api_chat_sessions_bulk_delete_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkSessionsRequest"}}},"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":[]}]}},"/api/chat/sessions/bulk-move":{"post":{"tags":["chat"],"summary":"Bulk Move Sessions","description":"Move several chat sessions into a folder, or out of every folder.","operationId":"bulk_move_sessions_api_chat_sessions_bulk_move_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkMoveSessionsRequest"}}},"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":[]}]}},"/api/chat/sessions/generate-title":{"post":{"tags":["chat"],"summary":"Generate Session Title","description":"Generate a conversation title from the first message using AI.","operationId":"generate_session_title_api_chat_sessions_generate_title_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateSessionTitleRequest"}}},"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":[]}]}},"/api/chat/messages/{message_id}":{"put":{"tags":["chat"],"summary":"Edit Question","description":"Edit question. Editing triggers response regeneration.","operationId":"edit_question_api_chat_messages__message_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"string","title":"Message Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditMessageRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["chat"],"summary":"Delete Question","description":"Delete question.","operationId":"delete_question_api_chat_messages__message_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"string","title":"Message Id"}},{"name":"session_id","in":"query","required":false,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/messages/{message_id}/rerun":{"post":{"tags":["chat"],"summary":"Rerun Question","description":"Rerun question. Creates a new session preserving history up to that question.","operationId":"rerun_question_api_chat_messages__message_id__rerun_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"string","title":"Message Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RerunMessageRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/messages/{message_id}/feedback":{"put":{"tags":["chat"],"summary":"Set Message Feedback","description":"Like (``status: \"upvote\"``) / dislike (``\"downvote\"``) an AI answer of the caller's own\nchat, with an optional text (``message``); ``status: null`` takes the vote back.\n\nThe vote is one row of `message_feedback` (V0114), keyed by the message id and replaced\nwhole by each call; taking it back deletes the row. `messages` is never written, so the\nanswer's background DB write may still be on its way. The cached message carries it as\n``feedback: {status, message}`` (none without a vote), see core/chat/feedback.py.","operationId":"set_message_feedback_api_chat_messages__message_id__feedback_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"string","title":"Message Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageFeedbackRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/messages/{message_id}/historical-positions":{"get":{"tags":["chat"],"summary":"Download Historical Positions","description":"Download historical positions as an Excel file.\n\n``strategy_index`` (1-based ``seriesIndex`` of a save block) picks one strategy of a comparison\nanswer; without it the answer's (single) strategy is used, as before.","operationId":"download_historical_positions_api_chat_messages__message_id__historical_positions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"string","title":"Message Id"}},{"name":"strategy_index","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Strategy Index"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/sessions/{session_id}/messages/{message_id}/export":{"get":{"tags":["chat"],"summary":"Export Answer","description":"Download one answer as a PDF, Word, Excel or CSV file.\n\n``message_id`` is any AI message of the answer: every AI message under the same question is\nincluded, in order, and the question is the file's title. The file is built by the agent\n(odin-agent ``core.tasks.answer_export_tasks.export_answer``, which also renders the charts);\nan answer with several tables comes back as a zip of CSVs for ``format=csv``.","operationId":"export_answer_api_chat_sessions__session_id__messages__message_id__export_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"message_id","in":"path","required":true,"schema":{"type":"string","title":"Message Id"}},{"name":"format","in":"query","required":true,"schema":{"type":"string","description":"pdf, docx, xlsx or csv","title":"Format"},"description":"pdf, docx, xlsx or csv"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/reported-questions":{"get":{"tags":["chat"],"summary":"List Reported Questions","description":"List reported questions.","operationId":"list_reported_questions_api_chat_reported_questions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["chat"],"summary":"Report Question","description":"Report question.","operationId":"report_question_api_chat_reported_questions_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportedQuestionRequest"}}},"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":[]}]}},"/api/chat/reported-questions/{id}":{"get":{"tags":["chat"],"summary":"Get Reported Question","description":"Get reported question.","operationId":"get_reported_question_api_chat_reported_questions__id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["chat"],"summary":"Update Reported Question","description":"Update reported question.","operationId":"update_reported_question_api_chat_reported_questions__id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","title":"Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateReportedQuestionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["chat"],"summary":"Delete Reported Question","description":"Delete reported question.","operationId":"delete_reported_question_api_chat_reported_questions__id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/download-s3-data":{"post":{"tags":["chat"],"summary":"Download S3 Data","description":"Generate a presigned URL for downloading data from S3.","operationId":"download_s3_data_api_chat_download_s3_data_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/S3DownloadRequest"}}},"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":[]}]}},"/api/chat/admin/examples/categories":{"post":{"tags":["chat"],"summary":"Create Example Category","description":"Create example category.","operationId":"create_example_category_api_chat_admin_examples_categories_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateExampleCategoryRequest"}}},"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":[]}]}},"/api/chat/admin/examples/categories/{category_id}":{"put":{"tags":["chat"],"summary":"Update Example Category","description":"Update example category.","operationId":"update_example_category_api_chat_admin_examples_categories__category_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"category_id","in":"path","required":true,"schema":{"type":"integer","title":"Category Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateExampleCategoryRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["chat"],"summary":"Delete Example Category","description":"Delete example category.","operationId":"delete_example_category_api_chat_admin_examples_categories__category_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"category_id","in":"path","required":true,"schema":{"type":"integer","title":"Category Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/admin/examples/sub-categories":{"post":{"tags":["chat"],"summary":"Create Example Sub Category","description":"Create example sub category.","operationId":"create_example_sub_category_api_chat_admin_examples_sub_categories_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateExampleSubCategoryRequest"}}},"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":[]}]}},"/api/chat/admin/examples/sub-categories/{sub_category_id}":{"put":{"tags":["chat"],"summary":"Update Example Sub Category","description":"Update example sub category.","operationId":"update_example_sub_category_api_chat_admin_examples_sub_categories__sub_category_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"sub_category_id","in":"path","required":true,"schema":{"type":"integer","title":"Sub Category Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateExampleSubCategoryRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["chat"],"summary":"Delete Example Sub Category","description":"Delete example sub category.","operationId":"delete_example_sub_category_api_chat_admin_examples_sub_categories__sub_category_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"sub_category_id","in":"path","required":true,"schema":{"type":"integer","title":"Sub Category Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/examples/categories":{"get":{"tags":["chat"],"summary":"List Example Categories","description":"List example categories and sub categories.","operationId":"list_example_categories_api_chat_examples_categories_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/chat/examples/categories/{category_id}":{"get":{"tags":["chat"],"summary":"List Example Categories Prompts","description":"List example prompts for a given category.","operationId":"list_example_categories_prompts_api_chat_examples_categories__category_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"category_id","in":"path","required":true,"schema":{"type":"integer","title":"Category Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/examples/by-question":{"get":{"tags":["chat"],"summary":"Find Sample Prompt By Question","description":"The visible sample prompt with a stored answer that asks this question, compared as the\ncards compare questions (case, spacing and closing punctuation ignored).\n\nFor a question the page offers on its own (the example cards' built-in questions, shown\nuntil the server's draw is in): when the bank has it, the page opens the stored answer\nthrough POST /chat/sessions/sample-prompt instead of asking the agent. None in the bank\nanswers ErrorCode.e900, and the page asks the agent as before.","operationId":"find_sample_prompt_by_question_api_chat_examples_by_question_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":2000,"description":"The question, as a card shows it.","title":"Q"},"description":"The question, as a card shows it."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/examples/cards":{"get":{"tags":["chat"],"summary":"List Example Cards","description":"A random set of Sample prompts for each example card of the empty chat.\n\nDrawn anew on every call; the page calls it once when it loads, so a visit keeps one\nset. No prompt -- and no question, even filed twice -- appears on two cards: the\npools overlap (General Research feeds three cards), so the cards with the smallest\npools draw first and nothing they took is offered to the next. A card whose pool\nruns out gets fewer prompts, never a repeat.\n\nSummaries only, like the other listings: a card shows questions, and the one picked\nis opened through POST /chat/sessions/sample-prompt, which writes its stored answer\ninto a new chat. Hidden prompts and prompts without an answer are left out for every\nrole.","operationId":"list_example_cards_api_chat_examples_cards_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"count","in":"query","required":false,"schema":{"type":"integer","maximum":10,"minimum":1,"description":"Prompts per card.","default":3,"title":"Count"},"description":"Prompts per card."},{"name":"cards","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated card keys (see EXAMPLE_CARD_SOURCES); all when omitted.","title":"Cards"},"description":"Comma-separated card keys (see EXAMPLE_CARD_SOURCES); all when omitted."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/examples/prompts":{"get":{"tags":["chat"],"summary":"List Example Prompts By Ids","description":"Summaries for a set of example prompts, addressed by id.\n\nWhat a caller holding nothing but prompt ids needs in order to link to them. The\nweekly recommendation e-mail lands the user on /chat with its picks in the URL and\nthe page turns them into cards, so this must answer for several prompts at once --\nand without their `answer`, which is up to 3.3 MB each and never reaches a card.\n\n`category_id` is joined in because the route that opens a prompt needs it\n(/chat?example=true&category_id=..&subcategory_id=..&prompt_id=..) and a prompt\nitself only knows its sub category. `category` and `sub_category` come along the\nsame joins as their names, so a card can say where a prompt lives without a second\ncall per prompt to look the two folders up.\n\nIds that resolve to nothing are simply absent from the result: a prompt deleted\nbetween the e-mail going out and the link being opened is one missing card, not a\nfailed page. The result keeps the order the ids were asked in, which is the e-mail's\nranking.","operationId":"list_example_prompts_by_ids_api_chat_examples_prompts_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"ids","in":"query","required":true,"schema":{"type":"string","description":"Comma-separated example prompt ids.","title":"Ids"},"description":"Comma-separated example prompt ids."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/examples/prompts/{prompt_id}":{"get":{"tags":["chat"],"summary":"Get Example Prompt","description":"One example prompt, including its full answer.\n\nThe listing endpoint returns prompts without `answer`, so this is what the UI calls\nwhen a prompt is opened or edited -- one answer at a time instead of a folder's worth.","operationId":"get_example_prompt_api_chat_examples_prompts__prompt_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"integer","title":"Prompt Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/admin/examples/prompts":{"post":{"tags":["chat"],"summary":"Create Example Prompt","description":"Create example prompt.","operationId":"create_example_prompt_api_chat_admin_examples_prompts_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateExamplePromptRequest"}}},"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":[]}]}},"/api/chat/admin/examples/prompts/{prompt_id}":{"put":{"tags":["chat"],"summary":"Update Example Prompt","description":"Update example prompt.","operationId":"update_example_prompt_api_chat_admin_examples_prompts__prompt_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"integer","title":"Prompt Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateExamplePromptRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["chat"],"summary":"Delete Example Prompt","description":"Delete example prompt.","operationId":"delete_example_prompt_api_chat_admin_examples_prompts__prompt_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"integer","title":"Prompt Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/admin/examples/prompts/{prompt_id}/move":{"post":{"tags":["chat"],"summary":"Move Example Prompt","description":"Move example prompt to another category -> sub category.\n\nOnly the target sub category is taken from the payload — it already carries its\nown `category_id`, so the destination category needs no separate lookup. When\n`order` is omitted the prompt lands at the end of the target sub category.","operationId":"move_example_prompt_api_chat_admin_examples_prompts__prompt_id__move_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"integer","title":"Prompt Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoveExamplePromptRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/admin/examples/refreshes":{"get":{"tags":["chat"],"summary":"List Example Prompt Refreshes","description":"Every prompt with a refresh candidate nobody has decided on.\n\nA flat queue, not a run report: the table holds one row per prompt, replaced by\neach run, so there is nothing to group. Answers are omitted -- see\n`serialize_summary`; the candidate is read one prompt at a time.","operationId":"list_example_prompt_refreshes_api_chat_admin_examples_refreshes_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"verdict","in":"query","required":false,"schema":{"type":"string","default":"","title":"Verdict"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/admin/examples/prompts/{prompt_id}/refresh":{"get":{"tags":["chat"],"summary":"Get Example Prompt Refresh","description":"This prompt's candidate, with the answer, or null when it has none.\n\nNull is the ordinary case for a prompt a run has never reached or whose candidate\nhas already been published, so it is not an error -- the panel offers a retry.","operationId":"get_example_prompt_refresh_api_chat_admin_examples_prompts__prompt_id__refresh_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"integer","title":"Prompt Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/admin/examples/refreshes/{refresh_id}/publish":{"post":{"tags":["chat"],"summary":"Publish Example Prompt Refresh","description":"Make this candidate the prompt's answer.\n\nThe row is deleted rather than kept: the published answer lives in\n`example_prompts.answer`, which is also what the next run is judged against, so a\ncopy here would only ever be the version a reviewer rejected.","operationId":"publish_example_prompt_refresh_api_chat_admin_examples_refreshes__refresh_id__publish_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"refresh_id","in":"path","required":true,"schema":{"type":"integer","title":"Refresh Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/admin/examples/prompts/{prompt_id}/retry-refresh":{"post":{"tags":["chat"],"summary":"Retry Example Prompt Refresh","description":"Re-ask this prompt now, replacing whatever candidate it has.\n\nOn the prompt rather than on the candidate, because the prompts most worth\nre-asking are the ones no run has reached -- one a run timed out on, or one added\nsince the last pass.","operationId":"retry_example_prompt_refresh_api_chat_admin_examples_prompts__prompt_id__retry_refresh_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"integer","title":"Prompt Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/admin/examples/refresh-pending":{"get":{"tags":["chat"],"summary":"List Pending Example Prompt Refreshes","description":"Prompts carrying a candidate nobody has decided on, rolled up the category tree.\n\nEvery row in the table is pending by construction -- publishing deletes it -- so\nthis is the table joined up to its categories. Counts rather than ids above the\nprompt level: \"7 waiting\" is what decides whether a folder is worth opening.","operationId":"list_pending_example_prompt_refreshes_api_chat_admin_examples_refresh_pending_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/chat/admin/examples/order":{"post":{"tags":["chat"],"summary":"Order Examples","description":"Order example categories, sub categories and prompts.","operationId":"order_examples_api_chat_admin_examples_order_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderExamplesRequest"}}},"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":[]}]}},"/api/chat/robo-advisor/generate-strategy":{"post":{"tags":["chat"],"summary":"Robo Advisor Generate","description":"Run robo advisor strategy generation.\n\n- If a task is already running, rejects the request to prevent duplicates.\n- Previous cached result stays visible until the new one replaces it.","operationId":"robo_advisor_generate_api_chat_robo_advisor_generate_strategy_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoboAdvisorRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoboAdvisorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/chat/robo-advisor/status":{"get":{"tags":["chat"],"summary":"Get Robo Advisor Status","description":"Get the latest robo advisor result / status for the current user.","operationId":"get_robo_advisor_status_api_chat_robo_advisor_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoboAdvisorResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/chat/robo-advisor-optimized/generate-strategy":{"post":{"tags":["chat"],"summary":"Robo Advisor Optimized Generate","description":"Run optimized robo advisor strategy generation.\n\n- If a task is already running, rejects the request to prevent duplicates.\n- Previous cached result stays visible until the new one replaces it.","operationId":"robo_advisor_optimized_generate_api_chat_robo_advisor_optimized_generate_strategy_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoboAdvisorOptimizedRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoboAdvisorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/chat/robo-advisor-optimized/status":{"get":{"tags":["chat"],"summary":"Get Robo Advisor Optimized Status","description":"Get the latest optimized robo advisor result / status for the current user.","operationId":"get_robo_advisor_optimized_status_api_chat_robo_advisor_optimized_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoboAdvisorResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/voice/token":{"post":{"tags":["voice"],"summary":"Create Voice Token","operationId":"create_voice_token_api_voice_token_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TokenRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/voice/answer":{"get":{"tags":["voice"],"summary":"Voice Answer","description":"The finished answer to `question_id` in the user's own `session_id` (scoped to the\ntoken's user, like the chat history endpoint): `{status, text}` where status is\n`pending`, `finished`, `error`, `cancelled` or `timeout`.","operationId":"voice_answer_api_voice_answer_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"query","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"question_id","in":"query","required":true,"schema":{"type":"string","title":"Question Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/voice/line":{"post":{"tags":["voice"],"summary":"Save Voice Line","description":"Keeps what the voice said around an analysis in the chat, as the call happened (PO,\n2026-10-20: \"keep the AI answers in the chat, they are useful to understand what is going\non\"). An AI message under the question, its blocks marked `voice` so the answer lookups\nskip it. 409 while the question's chat doesn't exist yet (the socket creates it): retry.","operationId":"save_voice_line_api_voice_line_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LineRequest"}}},"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":[]}]}},"/api/voice/turn":{"post":{"tags":["voice"],"summary":"Save Voice Turn","description":"Saves a spoken exchange into the user's chat as a finished question and answer, creating\nthe chat when the call started on a new one. Questions that needed an analysis are not sent\nhere: they go into the chat as normal questions.","operationId":"save_voice_turn_api_voice_turn_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TurnRequest"}}},"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":[]}]}},"/api/voice/title":{"post":{"tags":["voice"],"summary":"Retitle Voice Chat","description":"A chat started by voice with small talk (\"hey, how's it going?\") gets its AI title from its\nfirst real question instead (the session_renamed event updates every device).","operationId":"retitle_voice_chat_api_voice_title_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TitleRequest"}}},"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":[]}]}},"/api/chat/logs":{"get":{"tags":["chat"],"summary":"Get Logs Index","description":"Lists every run in langgraph_logs, newest first, 100 per page, each linking\nto its trace at /chat/logs/{message_id}. Development only.\n\nArgs:\n    before: Cursor of the Older link ('<epoch ms>:<message_id>'), or a date or\n        date-time (UTC) to list the runs that started before it.\n    after: Cursor of the Newer link.\n    page: Page number to display, carried by the links (0 = unknown, e.g.\n        after a jump to a date).","operationId":"get_logs_index_api_chat_logs_get","parameters":[{"name":"before","in":"query","required":false,"schema":{"type":"string","default":"","title":"Before"}},{"name":"after","in":"query","required":false,"schema":{"type":"string","default":"","title":"After"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Page"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/logs/{message_id}":{"get":{"tags":["chat"],"summary":"Get Logs","description":"Retrieves and displays logs for a given message ID.\n\nArgs:\n    compact: Drop the raw LLM prompt/response dumps, the graph state dump and\n        r_llm entries, and cap each entry's data — the same filter\n        /chat/logs/{id}/json uses. Off by default because the full trace is\n        the point of this view, but a backtest trace runs to ~4 MB of HTML\n        and this brings it to a page that loads instantly.","operationId":"get_logs_api_chat_logs__message_id__get","parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"string","title":"Message Id"}},{"name":"compact","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Compact"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/logs/{message_id}/json":{"get":{"tags":["chat"],"summary":"Get Logs Json","description":"Retrieves logs for a given message ID as JSON.\n\nWith no query parameters the raw trace is returned unchanged — the HTML log\nviewer and QAR both depend on that. The filters below exist for odin-agent's\nrun-introspection tools, which read this endpoint to explain how a previous\nanswer was produced and cannot afford the raw payload.\n\nArgs:\n    compact: Drop raw LLM prompt/response dumps, the graph state dump and\n        r_llm entries, and default max_data to 4000.\n    senders: Comma-separated allow-list of `sender` values.\n    exclude_senders: Comma-separated deny-list of `sender` values.\n    max_data: Truncate each entry's `data` to this many characters (0 = no cap).\n    limit: Maximum entries returned, oldest first (hard cap 1000).\n    session_id: When set, only entries belonging to this session are returned.\n        Callers that resolved the message id from untrusted input (an LLM, a\n        URL) pass it so a foreign id cannot read another conversation.","operationId":"get_logs_json_api_chat_logs__message_id__json_get","parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"string","title":"Message Id"}},{"name":"compact","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Compact"}},{"name":"senders","in":"query","required":false,"schema":{"type":"string","default":"","title":"Senders"}},{"name":"exclude_senders","in":"query","required":false,"schema":{"type":"string","default":"","title":"Exclude Senders"}},{"name":"max_data","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Max Data"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":1000,"title":"Limit"}},{"name":"session_id","in":"query","required":false,"schema":{"type":"string","default":"","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/question-analysis-report/view":{"get":{"tags":["chat"],"summary":"Get Question Analysis Report View","description":"Serve QAR HTML page.","operationId":"get_question_analysis_report_view_api_chat_question_analysis_report_view_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/api/chat/question-analysis-report/list/view":{"get":{"tags":["chat"],"summary":"Get Question Analysis Report List View","description":"Serve QAR list HTML page.","operationId":"get_question_analysis_report_list_view_api_chat_question_analysis_report_list_view_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/api/chat/question-analysis-report/list":{"get":{"tags":["chat"],"summary":"Get Question Analysis Report List","description":"Get a list of all historical QAR reports.","operationId":"get_question_analysis_report_list_api_chat_question_analysis_report_list_get","parameters":[{"name":"tag","in":"query","required":false,"schema":{"type":"string","default":"","title":"Tag"}},{"name":"with_metadata","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"With Metadata"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/question-analysis-report/tags":{"get":{"tags":["chat"],"summary":"Get Question Analysis Report Tags","description":"Get a list of all unique tags used in QAR reports.","operationId":"get_question_analysis_report_tags_api_chat_question_analysis_report_tags_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/chat/question-analysis-report":{"get":{"tags":["chat"],"summary":"Get Question Analysis Report","description":"Get a summary of question analysis report.","operationId":"get_question_analysis_report_api_chat_question_analysis_report_get","parameters":[{"name":"id","in":"query","required":false,"schema":{"type":"string","default":"latest_report","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/question-analysis-report/{report_id}":{"delete":{"tags":["chat"],"summary":"Delete Question Analysis Report","description":"Delete a QAR report from Elasticsearch.","operationId":"delete_question_analysis_report_api_chat_question_analysis_report__report_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/databrowser/economic-calendar":{"get":{"tags":["databrowser"],"summary":"Get Economic Calendar","description":"Get economic calendar.","operationId":"get_economic_calendar_api_databrowser_economic_calendar_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date To"}},{"name":"country","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/databrowser/economic-calendar/countries":{"get":{"tags":["databrowser"],"summary":"Get Economic Calendar Countries","description":"Returns available countries for economic calendar.","operationId":"get_economic_calendar_countries_api_databrowser_economic_calendar_countries_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/databrowser/company-calendar":{"get":{"tags":["databrowser"],"summary":"Get Companies Calendar","description":"Get companies calendar.","operationId":"get_companies_calendar_api_databrowser_company_calendar_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date To"}},{"name":"ticker","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ticker"}},{"name":"index","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Index"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/databrowser/query":{"get":{"tags":["databrowser"],"summary":"Get Data","description":"Query data for a specific DRS ID and table name.","operationId":"get_data_api_databrowser_query_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"drs_id","in":"query","required":true,"schema":{"type":"integer","title":"Drs Id"}},{"name":"table_name","in":"query","required":true,"schema":{"type":"string","title":"Table Name"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","default":"tabular","title":"Format"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/databrowser/folder":{"get":{"tags":["databrowser"],"summary":"Get Folders","description":"Get list of existing folders.","operationId":"get_folders_api_databrowser_folder_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["databrowser"],"summary":"Create Folder","description":"Create a new folder.","operationId":"create_folder_api_databrowser_folder_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderCreate"}}},"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":[]}]}},"/api/databrowser/folder/{folder_id}":{"get":{"tags":["databrowser"],"summary":"Get Folder","description":"Get a specific folder.","operationId":"get_folder_api_databrowser_folder__folder_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"folder_id","in":"path","required":true,"schema":{"type":"integer","title":"Folder Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["databrowser"],"summary":"Add Data To Folder","description":"Add data to an existing folder.","operationId":"add_data_to_folder_api_databrowser_folder__folder_id__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"folder_id","in":"path","required":true,"schema":{"type":"integer","title":"Folder Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderCreateOrAdd"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["databrowser"],"summary":"Delete Folder","description":"Delete a folder.","operationId":"delete_folder_api_databrowser_folder__folder_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"folder_id","in":"path","required":true,"schema":{"type":"integer","title":"Folder Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["databrowser"],"summary":"Update Folder","description":"Rename a folder.","operationId":"update_folder_api_databrowser_folder__folder_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"folder_id","in":"path","required":true,"schema":{"type":"integer","title":"Folder Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/databrowser/saved-data":{"get":{"tags":["databrowser"],"summary":"Get Saved Data List","description":"Get list of saved data for the user.","operationId":"get_saved_data_list_api_databrowser_saved_data_get","security":[{"HTTPBearer":[]}],"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":5,"title":"Per Page"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["databrowser"],"summary":"Save Data","description":"Save data.","operationId":"save_data_api_databrowser_saved_data_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedDataCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/databrowser/saved-data/{folder_id}":{"get":{"tags":["databrowser"],"summary":"Get Saved Data By Folder","description":"Get saved data for a specific folder.","operationId":"get_saved_data_by_folder_api_databrowser_saved_data__folder_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"folder_id","in":"path","required":true,"schema":{"type":"integer","title":"Folder Id"}},{"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":5,"title":"Per Page"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/databrowser/saved-data/{saved_data_id}":{"put":{"tags":["databrowser"],"summary":"Update Saved Data","description":"Update saved data.","operationId":"update_saved_data_api_databrowser_saved_data__saved_data_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"saved_data_id","in":"path","required":true,"schema":{"type":"integer","title":"Saved Data Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedDataUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["databrowser"],"summary":"Delete Saved Data","description":"Delete saved data.","operationId":"delete_saved_data_api_databrowser_saved_data__saved_data_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"saved_data_id","in":"path","required":true,"schema":{"type":"integer","title":"Saved Data Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/etf/data":{"get":{"tags":["etf"],"summary":"Get Etf Data","description":"Get ETF data.","operationId":"get_etf_data_api_etf_data_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"type","in":"query","required":true,"schema":{"type":"string","title":"Type"}},{"name":"chart_name","in":"query","required":false,"schema":{"type":"string","title":"Chart Name"}},{"name":"chart","in":"query","required":false,"schema":{"type":"string","title":"Chart"}},{"name":"filter_by","in":"query","required":false,"schema":{"type":"string","title":"Filter By"}},{"name":"stype","in":"query","required":false,"schema":{"type":"string","title":"Stype"}},{"name":"category","in":"query","required":false,"schema":{"type":"string","title":"Category"}},{"name":"strategy","in":"query","required":false,"schema":{"type":"string","title":"Strategy"}},{"name":"style","in":"query","required":false,"schema":{"type":"string","title":"Style"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forecast/macro-chart":{"get":{"tags":["forecast"],"summary":"Forecast Macro Chart","description":"Macroeconomic Forecast Chart data.","operationId":"forecast_macro_chart_api_forecast_macro_chart_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"indicator","in":"query","required":true,"schema":{"type":"string","title":"Indicator"}},{"name":"start_date","in":"query","required":false,"schema":{"type":"string","default":"","title":"Start Date"}},{"name":"end_date","in":"query","required":false,"schema":{"type":"string","default":"","title":"End Date"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forecast/macro-tracker":{"get":{"tags":["forecast"],"summary":"Forecast Macro Tracker","description":"Macroeconomic Forecast Tracker data.","operationId":"forecast_macro_tracker_api_forecast_macro_tracker_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"indicator","in":"query","required":true,"schema":{"type":"string","title":"Indicator"}},{"name":"start_date","in":"query","required":false,"schema":{"type":"string","default":"","title":"Start Date"}},{"name":"end_date","in":"query","required":false,"schema":{"type":"string","default":"","title":"End Date"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forecast/macro-bubbles":{"get":{"tags":["forecast"],"summary":"Forecast Macro Bubbles","description":"Macroeconomic Forecast Bubble data.","operationId":"forecast_macro_bubbles_api_forecast_macro_bubbles_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"ignore_cache","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Ignore Cache"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forecast/equities":{"get":{"tags":["forecast"],"summary":"Forecast Equities","description":"Forecast equities data.","operationId":"forecast_equities_api_forecast_equities_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/forecast/reports/{ticker}":{"get":{"tags":["forecast"],"summary":"Download Full Report","description":"The latest full forecast report of a ticker as a PDF.\n\nOnly for users with the content-access key `forecast.download` (it counts only while the\nForecast page is open for them; superadmins have it), the same switch the web reads.","operationId":"download_full_report_api_forecast_reports__ticker__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"ticker","in":"path","required":true,"schema":{"type":"string","title":"Ticker"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forecast/equities-graphs":{"get":{"tags":["forecast"],"summary":"Forecast Equities Graphs","description":"Forecast equities graphs data.","operationId":"forecast_equities_graphs_api_forecast_equities_graphs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"ticker","in":"query","required":true,"schema":{"type":"string","title":"Ticker"}},{"name":"origin","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forecast/equities-revisions":{"get":{"tags":["forecast"],"summary":"Forecast Equities Revisions","description":"Forecast revisions tracker table.","operationId":"forecast_equities_revisions_api_forecast_equities_revisions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"ticker","in":"query","required":true,"schema":{"type":"string","title":"Ticker"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forecast/price-change-graph":{"get":{"tags":["forecast"],"summary":"Price Change Graph","description":"Price change graph data.","operationId":"price_change_graph_api_forecast_price_change_graph_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"ticker","in":"query","required":true,"schema":{"type":"string","title":"Ticker"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forecast/sectors":{"get":{"tags":["forecast"],"summary":"Forecast Sectors","description":"Forecast sectors data.","operationId":"forecast_sectors_api_forecast_sectors_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/forecast/sectors-graphs":{"get":{"tags":["forecast"],"summary":"Forecast Sectors Graphs","description":"Forecast sectors graphs data.","operationId":"forecast_sectors_graphs_api_forecast_sectors_graphs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"sector","in":"query","required":true,"schema":{"type":"string","title":"Sector"}},{"name":"origin","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forecast/subindustries":{"get":{"tags":["forecast"],"summary":"Forecast Subindustries","description":"Forecast subindustries data.","operationId":"forecast_subindustries_api_forecast_subindustries_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/forecast/industries-graphs":{"get":{"tags":["forecast"],"summary":"Forecast Industries Graphs","description":"Forecast industries graphs data.","operationId":"forecast_industries_graphs_api_forecast_industries_graphs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"industry","in":"query","required":true,"schema":{"type":"string","title":"Industry"}},{"name":"origin","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forecast/involved-tickers-sectors":{"get":{"tags":["forecast"],"summary":"Forecast Sectors Involved Tickers","description":"Forecast sectors involved tickers.","operationId":"forecast_sectors_involved_tickers_api_forecast_involved_tickers_sectors_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"sector","in":"query","required":true,"schema":{"type":"string","title":"Sector"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forecast/involved-tickers-industries":{"get":{"tags":["forecast"],"summary":"Forecast Industries Involved Tickers","description":"Forecast industries involved tickers.","operationId":"forecast_industries_involved_tickers_api_forecast_involved_tickers_industries_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"industry","in":"query","required":true,"schema":{"type":"string","title":"Industry"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forecast/operating-metrics":{"get":{"tags":["forecast"],"summary":"Forecast Operating Metrics","description":"Forecast Operating Metrics.","operationId":"forecast_operating_metrics_api_forecast_operating_metrics_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"ticker","in":"query","required":true,"schema":{"type":"string","title":"Ticker"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forecast/product-segments":{"get":{"tags":["forecast"],"summary":"Forecast Product Segments","description":"Forecast Product Segments.","operationId":"forecast_product_segments_api_forecast_product_segments_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"ticker","in":"query","required":true,"schema":{"type":"string","title":"Ticker"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forecast/ticker-description":{"get":{"tags":["forecast"],"summary":"Forecast Ticker Description","description":"Forecast Ticker Description.","operationId":"forecast_ticker_description_api_forecast_ticker_description_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"ticker","in":"query","required":true,"schema":{"type":"string","title":"Ticker"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forecast/earnings-stats-qtd":{"get":{"tags":["forecast"],"summary":"Earnings Stats Qtd","description":"Return Quarter to Date Earnings Stats.","operationId":"earnings_stats_qtd_api_forecast_earnings_stats_qtd_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/forecast/raw-companies-graphs":{"get":{"tags":["forecast"],"summary":"Raw Companies Graphs Data","description":"Return raw data for companies graphs.","operationId":"raw_companies_graphs_data_api_forecast_raw_companies_graphs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/forecast/raw-industries-graphs":{"get":{"tags":["forecast"],"summary":"Raw Industries Graphs Data","description":"Return raw data for industries graphs.","operationId":"raw_industries_graphs_data_api_forecast_raw_industries_graphs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/forecast/raw-sectors-graphs":{"get":{"tags":["forecast"],"summary":"Raw Sectors Graphs Data","description":"Return raw data for sectors graphs.","operationId":"raw_sectors_graphs_data_api_forecast_raw_sectors_graphs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/tickers/sp500":{"get":{"tags":["generic"],"summary":"Get Sp500 Tickers","description":"List of all S&P500 tickers.","operationId":"get_sp500_tickers_api_tickers_sp500_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/tickers/us-non-otc":{"get":{"tags":["generic"],"summary":"Get Us Non Otc Tickers Route","description":"List of all active US Equity tickers excluding OTC.","operationId":"get_us_non_otc_tickers_route_api_tickers_us_non_otc_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/tickers/etfs":{"get":{"tags":["generic"],"summary":"Get Etf Ticker List Route","description":"Return a list of ETF tickers.","operationId":"get_etf_ticker_list_route_api_tickers_etfs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/tickers/stocks-etfs":{"get":{"tags":["generic"],"summary":"Get Stocks And Etfs Ticker List","description":"Return Equities and ETFs ticker list.","operationId":"get_stocks_and_etfs_ticker_list_api_tickers_stocks_etfs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/tickers/company-names":{"post":{"tags":["generic"],"summary":"Get Ticker Company Names","description":"Return [{ticker, name}, ...] for the requested tickers (unknown tickers are omitted).","operationId":"get_ticker_company_names_api_tickers_company_names_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TickerCompanyNamesRequest"}}},"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":[]}]}},"/api/tickers/custom-basket":{"get":{"tags":["generic"],"summary":"Get Custom Basket Tickers Route","description":"Get custom basket tickers.","operationId":"get_custom_basket_tickers_route_api_tickers_custom_basket_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"ignore_cache","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Ignore Cache"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tickers/indices-space-operators":{"get":{"tags":["generic"],"summary":"Get Indices Space Operators","description":"Get indices space operators.","operationId":"get_indices_space_operators_api_tickers_indices_space_operators_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/tickers/crypto":{"get":{"tags":["generic"],"summary":"Get Crypto Tickers","description":"Get crypto tickers.","operationId":"get_crypto_tickers_api_tickers_crypto_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/war-room":{"post":{"tags":["generic"],"summary":"War Room","description":"Return scenario based portfolio optimizer (War Room).","operationId":"war_room_api_war_room_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WarRoomConfig"}}},"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":[]}]}},"/api/key-drivers":{"get":{"tags":["generic"],"summary":"Key Drivers","description":"Return Key Drivers for a specific ticker.","operationId":"key_drivers_api_key_drivers_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"ticker","in":"query","required":true,"schema":{"type":"string","title":"Ticker"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/contact-us":{"post":{"tags":["generic"],"summary":"Contact Us","description":"Contact Us request. Turnstile for browsers.","operationId":"contact_us_api_contact_us_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactUs"}}},"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":[]}]}},"/api/unsubscribe":{"post":{"tags":["generic"],"summary":"Unsubscribe","description":"Unsubscribe an address from the newsletter and from the lifecycle emails.\n\nPublic, like the link in the email that leads here. Proxied rather than called\nfrom the browser: mx.bigdatafed.com is behind Basic auth and does not allow PATCH\ncross-origin.\n\nThe opt-out is recorded here first (`email_opt_outs`, read by the lifecycle\nemails), so it holds even when the newsletter service is down.","operationId":"unsubscribe_api_unsubscribe_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnsubscribeRequest"}}},"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":[]}]}},"/api/forecasts/demo-request":{"post":{"tags":["generic"],"summary":"Forecasts Demo Request","description":"\"Schedule a Demo\" on the /forecasts landing page.\n\nAn address that already has a Financial AI® account is turned away with e200,\nthe same error /users/invite and /users/watchlist raise: whoever is behind it\ncan sign in rather than be walked through a demo of a product they already\nhave, and Daniel's mailbox is not spent on a conversation sales already owns.\n\nOtherwise two emails go out, both fire-and-forget: the reply the visitor sees,\nwritten as Daniel Goldberg and blind-copied to sales, and the internal notice\ncarrying what they filled in.","operationId":"forecasts_demo_request_api_forecasts_demo_request_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForecastsDemoRequest"}}},"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":[]}]}},"/api/feedback":{"post":{"tags":["generic"],"summary":"Feedback","description":"Leave feedback.","operationId":"feedback_api_feedback_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_feedback_api_feedback_post"}}},"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":[]}]}},"/api/generate-excel":{"post":{"tags":["generic"],"summary":"Generate Excel","description":"Generate excel file based on the provided data.","operationId":"generate_excel_api_generate_excel_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateExcelFile"}}},"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":[]}]}},"/api/data-sources":{"get":{"tags":["generic"],"summary":"Data Sources","description":"Returns a list of supported data-sources.","operationId":"data_sources_api_data_sources_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/my-data":{"get":{"tags":["generic"],"summary":"My Data","description":"Returns all data uploaded by current user.","operationId":"my_data_api_my_data_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/highcharts-server":{"post":{"tags":["generic"],"summary":"Highcharts Server","description":"Send data to highcharts server and get back an image.","operationId":"highcharts_server_api_highcharts_server_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/portfolios-hedging":{"get":{"tags":["hedging"],"summary":"List Portfolio Hedgings","description":"List all Portfolio Hedgings created by current user.","operationId":"list_portfolio_hedgings_api_portfolios_hedging_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["hedging"],"summary":"Create Portfolio Hedging","description":"Create a Portfolio Hedging.","operationId":"create_portfolio_hedging_api_portfolios_hedging_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_create_portfolio_hedging_api_portfolios_hedging_post"}}},"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":[]}]}},"/api/portfolios-hedging/{hedging_id}":{"put":{"tags":["hedging"],"summary":"Update Portfolio Hedging","description":"Update Portfolio Hedging.","operationId":"update_portfolio_hedging_api_portfolios_hedging__hedging_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"hedging_id","in":"path","required":true,"schema":{"type":"integer","title":"Hedging Id"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_update_portfolio_hedging_api_portfolios_hedging__hedging_id__put"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["hedging"],"summary":"Remove Portfolio Hedging","description":"Remove Portfolio Hedging.","operationId":"remove_portfolio_hedging_api_portfolios_hedging__hedging_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"hedging_id","in":"path","required":true,"schema":{"type":"integer","title":"Hedging Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/portfolios-hedging/{hedging_id}/csv":{"get":{"tags":["hedging"],"summary":"Download Csv For Hedging","description":"Download the CSV file for a Portfolio Hedging.","operationId":"download_csv_for_hedging_api_portfolios_hedging__hedging_id__csv_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"hedging_id","in":"path","required":true,"schema":{"type":"integer","title":"Hedging Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/portfolios-hedging/{hedging_id}/recommendations":{"get":{"tags":["hedging"],"summary":"Get Recommendations For Hedging","description":"Get recommendations for Portfolio Hedging.","operationId":"get_recommendations_for_hedging_api_portfolios_hedging__hedging_id__recommendations_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"hedging_id","in":"path","required":true,"schema":{"type":"integer","title":"Hedging Id"}},{"name":"benchmark","in":"query","required":false,"schema":{"type":"string","default":"S&P 500","title":"Benchmark"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/return-csvs":{"get":{"tags":["hedging"],"summary":"List Return Csvs","description":"List all Return CSVs created by current user.","operationId":"list_return_csvs_api_return_csvs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["hedging"],"summary":"Create Return Csv","description":"Create a Return CSV.","operationId":"create_return_csv_api_return_csvs_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_create_return_csv_api_return_csvs_post"}}},"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":[]}]}},"/api/return-csvs/{csv_id}":{"delete":{"tags":["hedging"],"summary":"Remove Return Csv","description":"Remove Return CSV.","operationId":"remove_return_csv_api_return_csvs__csv_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"csv_id","in":"path","required":true,"schema":{"type":"integer","title":"Csv Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/return-csvs/{csv_id}/csv":{"get":{"tags":["hedging"],"summary":"Download Csv For Return Csv","description":"Download the CSV file for a Return CSV.","operationId":"download_csv_for_return_csv_api_return_csvs__csv_id__csv_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"csv_id","in":"path","required":true,"schema":{"type":"integer","title":"Csv Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/portfolio-allocations":{"get":{"tags":["hedging"],"summary":"List Portfolio Allocations","description":"List all Allocation CSVs created by current user.","operationId":"list_portfolio_allocations_api_portfolio_allocations_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["hedging"],"summary":"Create Portfolio Allocation","description":"Create a Portfolio Allocation.","operationId":"create_portfolio_allocation_api_portfolio_allocations_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_create_portfolio_allocation_api_portfolio_allocations_post"}}},"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":[]}]}},"/api/portfolio-allocations/{csv_id}":{"delete":{"tags":["hedging"],"summary":"Remove Portfolio Allocation","description":"Remove Allocation CSV.","operationId":"remove_portfolio_allocation_api_portfolio_allocations__csv_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"csv_id","in":"path","required":true,"schema":{"type":"integer","title":"Csv Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/portfolio-allocations/{csv_id}/csv":{"get":{"tags":["hedging"],"summary":"Download Csv For Allocation","description":"Download the CSV file for a Allocation CSV.","operationId":"download_csv_for_allocation_api_portfolio_allocations__csv_id__csv_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"csv_id","in":"path","required":true,"schema":{"type":"integer","title":"Csv Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/home/indices":{"get":{"tags":["home"],"summary":"Get Indices","description":"Get indices data.","operationId":"get_indices_api_home_indices_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/home/market-ticker":{"get":{"tags":["home"],"summary":"Get Market Ticker","description":"Current price and change against the previous close for the market ticker bar.\n\nThe web app polls it (every 30 s); each symbol is cached for 20 s, so all users\nshare one Yahoo request per symbol. Symbols Yahoo does not answer come back with\n`available: false` instead of failing the whole list.","operationId":"get_market_ticker_api_home_market_ticker_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"symbols","in":"query","required":true,"schema":{"type":"string","description":"Comma-separated Yahoo symbols, e.g. ^GSPC,^IXIC","title":"Symbols"},"description":"Comma-separated Yahoo symbols, e.g. ^GSPC,^IXIC"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/home/market-yield":{"get":{"tags":["home"],"summary":"Get Market Yield","description":"Get market yield data.","operationId":"get_market_yield_api_home_market_yield_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/home/commodities":{"get":{"tags":["home"],"summary":"Get Commodities","description":"Get commodities data.","operationId":"get_commodities_api_home_commodities_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/home/exchange-rates":{"get":{"tags":["home"],"summary":"Get Exchange Rates","description":"Get exchange rates.","operationId":"get_exchange_rates_api_home_exchange_rates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/home/charts":{"get":{"tags":["home"],"summary":"Charts","description":"Get available chart configurations.","operationId":"charts_api_home_charts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/home/market-put-call-ratio-trend":{"get":{"tags":["home"],"summary":"Market Put Call Ratio Trend","description":"Get market put/call ratio trend.","operationId":"market_put_call_ratio_trend_api_home_market_put_call_ratio_trend_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"ticker","in":"query","required":false,"schema":{"type":"string","default":"*","title":"Ticker"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/home/nominal-consumer-spending":{"get":{"tags":["home"],"summary":"Nominal Consumer Spending","description":"Get nominal consumer spending data.","operationId":"nominal_consumer_spending_api_home_nominal_consumer_spending_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"type","in":"query","required":true,"schema":{"type":"string","title":"Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/home/recession-probability":{"get":{"tags":["home"],"summary":"Recession Probability","description":"Get recession probability.","operationId":"recession_probability_api_home_recession_probability_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/home/best-worst-performers":{"post":{"tags":["home"],"summary":"Best Worst Performers","description":"Get best/worst performers.","operationId":"best_worst_performers_api_home_best_worst_performers_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BestWorstPerformers"}}},"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":[]}]}},"/api/home/valuations":{"post":{"tags":["home"],"summary":"Valuations","description":"Get valuations data.","operationId":"valuations_api_home_valuations_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Valuations"}}},"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":[]}]}},"/api/home/closest-market-matches":{"post":{"tags":["home"],"summary":"Closest Market Matches","description":"Get closest market matches.","operationId":"closest_market_matches_api_home_closest_market_matches_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClosestMarketMatches"}}},"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":[]}]}},"/api/home/equity-market-regime-score":{"get":{"tags":["home"],"summary":"Equity Market Regime Score","description":"Get equity market regime score.","operationId":"equity_market_regime_score_api_home_equity_market_regime_score_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/home/market-spider":{"get":{"tags":["home"],"summary":"Market Spider","description":"Get market spider data.","operationId":"market_spider_api_home_market_spider_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"ignore_cache","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Ignore Cache"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/home/save-yahoo-cache":{"get":{"tags":["home"],"summary":"Save Yahoo Cache Route","description":"Refresh Yahoo data cache.","operationId":"save_yahoo_cache_route_api_home_save_yahoo_cache_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/portfolios":{"get":{"tags":["portfolios"],"summary":"List Portfolios","description":"List portfolios that current user has read access to.","operationId":"list_portfolios_api_portfolios_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["portfolios"],"summary":"Create Portfolio","description":"Create a portfolio.","operationId":"create_portfolio_api_portfolios_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortfolioCreate"}}},"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":[]}]}},"/api/portfolios/predefined-templates":{"get":{"tags":["portfolios"],"summary":"List Predefined Portfolio Templates","description":"Returns the predefined portfolio templates.","operationId":"list_predefined_portfolio_templates_api_portfolios_predefined_templates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/portfolios/predefined-templates/{id}/clone":{"post":{"tags":["portfolios"],"summary":"Clone Predefined Portfolio Template","description":"Clone the predefined portfolio template to profile.","operationId":"clone_predefined_portfolio_template_api_portfolios_predefined_templates__id__clone_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/portfolios/benchmarks":{"get":{"tags":["portfolios"],"summary":"Get Benchmarks","description":"Return the list of benchmarks.","operationId":"get_benchmarks_api_portfolios_benchmarks_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/portfolios/overall-performances":{"get":{"tags":["portfolios"],"summary":"Get Overall Performances","description":"Return overall performances for user created portfolios.","operationId":"get_overall_performances_api_portfolios_overall_performances_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/portfolios/strategies-list":{"get":{"tags":["portfolios"],"summary":"Get Core Strategies List","description":"Return core strategies list.","operationId":"get_core_strategies_list_api_portfolios_strategies_list_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/portfolios/live-performance":{"post":{"tags":["portfolios"],"summary":"Get Live Performance For Config","description":"Returns performance benchmarks for specified config.","operationId":"get_live_performance_for_config_api_portfolios_live_performance_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortfolioLivePerformance"}}},"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":[]}]}},"/api/portfolios/optimize-allocation":{"post":{"tags":["portfolios"],"summary":"Optimize Allocation","description":"Optimize user's portfolio allocation.","operationId":"optimize_allocation_api_portfolios_optimize_allocation_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortfolioAllocation"}}},"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":[]}]}},"/api/portfolios/{portfolio_id}":{"get":{"tags":["portfolios"],"summary":"Get Portfolio","description":"Retrieve specific portfolio.","operationId":"get_portfolio_api_portfolios__portfolio_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"portfolio_id","in":"path","required":true,"schema":{"type":"integer","title":"Portfolio Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["portfolios"],"summary":"Update Portfolio","description":"Update specific portfolio.","operationId":"update_portfolio_api_portfolios__portfolio_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"portfolio_id","in":"path","required":true,"schema":{"type":"integer","title":"Portfolio Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortfolioUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["portfolios"],"summary":"Remove Portfolio","description":"Remove specific portfolio.","operationId":"remove_portfolio_api_portfolios__portfolio_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"portfolio_id","in":"path","required":true,"schema":{"type":"integer","title":"Portfolio Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/portfolios/{portfolio_id}/duplicate":{"post":{"tags":["portfolios"],"summary":"Duplicate Portfolio","description":"Duplicate specific portfolio.","operationId":"duplicate_portfolio_api_portfolios__portfolio_id__duplicate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"portfolio_id","in":"path","required":true,"schema":{"type":"integer","title":"Portfolio Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortfolioDuplicate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/portfolios/{portfolio_id}/permissions":{"get":{"tags":["portfolios"],"summary":"Get Portfolio Permissions","description":"Get portfolio permissions.","operationId":"get_portfolio_permissions_api_portfolios__portfolio_id__permissions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"portfolio_id","in":"path","required":true,"schema":{"type":"integer","title":"Portfolio Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["portfolios"],"summary":"Modify Portfolio Permissions","description":"Grants or restricts access to a specific portfolio.","operationId":"modify_portfolio_permissions_api_portfolios__portfolio_id__permissions_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"portfolio_id","in":"path","required":true,"schema":{"type":"integer","title":"Portfolio Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortfolioPermissions"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/portfolios/{portfolio_id}/set-default-flag":{"put":{"tags":["portfolios"],"summary":"Mark Portfolio As Default Template","description":"Marks the specific portfolio as a default template.","operationId":"mark_portfolio_as_default_template_api_portfolios__portfolio_id__set_default_flag_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"portfolio_id","in":"path","required":true,"schema":{"type":"integer","title":"Portfolio Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortfolioSetDefaultFlag"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/portfolios/{portfolio_id}/positions":{"get":{"tags":["portfolios"],"summary":"Get Portfolio Positions","description":"Returns positions for specific portfolio.","operationId":"get_portfolio_positions_api_portfolios__portfolio_id__positions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"portfolio_id","in":"path","required":true,"schema":{"type":"integer","title":"Portfolio Id"}},{"name":"start_date","in":"query","required":false,"schema":{"type":"string","default":"","title":"Start Date"}},{"name":"end_date","in":"query","required":false,"schema":{"type":"string","default":"","title":"End Date"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/portfolios/{portfolio_id}/performance":{"get":{"tags":["portfolios"],"summary":"Get Portfolio Performance","description":"Returns performance benchmarks for specific portfolio.","operationId":"get_portfolio_performance_api_portfolios__portfolio_id__performance_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"portfolio_id","in":"path","required":true,"schema":{"type":"integer","title":"Portfolio Id"}},{"name":"start_date","in":"query","required":false,"schema":{"type":"string","default":"","title":"Start Date"}},{"name":"end_date","in":"query","required":false,"schema":{"type":"string","default":"","title":"End Date"}},{"name":"is_async","in":"query","required":false,"schema":{"type":"string","default":"","title":"Is Async"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tasks/portfolios/{task_id}/result":{"get":{"tags":["portfolios"],"summary":"Get Portfolio Performance For Task","description":"Get portfolio performance result for task.","operationId":"get_portfolio_performance_for_task_api_tasks_portfolios__task_id__result_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/strategies":{"get":{"tags":["strategies"],"summary":"List Strategies","description":"List strategies that current user has read access to.","operationId":"list_strategies_api_strategies_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["strategies"],"summary":"Create Strategy","description":"Create a strategy.","operationId":"create_strategy_api_strategies_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyCreate"}}},"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":[]}]}},"/api/strategies/shared":{"get":{"tags":["strategies"],"summary":"Get Shared Strategies","description":"Returns IDs of strategies that belong to current user and are shared with at least one other user.","operationId":"get_shared_strategies_api_strategies_shared_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/strategies/predefined-templates":{"get":{"tags":["strategies"],"summary":"List Predefined Strategy Templates","description":"Returns the predefined strategy templates.","operationId":"list_predefined_strategy_templates_api_strategies_predefined_templates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/strategies/predefined-templates/{template_id}/clone":{"post":{"tags":["strategies"],"summary":"Clone Predefined Strategy Template","description":"Clone the predefined strategy template to profile.","operationId":"clone_predefined_strategy_template_api_strategies_predefined_templates__template_id__clone_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","title":"Template Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/strategies/default":{"get":{"tags":["strategies"],"summary":"Get Default Strategies Route","description":"Returns default strategies provided by Strategy Backtesting API.","operationId":"get_default_strategies_route_api_strategies_default_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/strategies/default-with-equities":{"get":{"tags":["strategies"],"summary":"Get Default Strategies With Equities","description":"Returns default strategies with equity lines included (paginated).","operationId":"get_default_strategies_with_equities_api_strategies_default_with_equities_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"}},{"name":"search_keyword","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search Keyword"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/strategies/{strategy_id}":{"get":{"tags":["strategies"],"summary":"Get Strategy","description":"Retrieve specific strategy.","operationId":"get_strategy_api_strategies__strategy_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["strategies"],"summary":"Update Strategy","description":"Update specific strategy.","operationId":"update_strategy_api_strategies__strategy_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["strategies"],"summary":"Remove Strategy","description":"Remove specific strategy.","operationId":"remove_strategy_api_strategies__strategy_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/strategies/{strategy_id}/duplicate":{"post":{"tags":["strategies"],"summary":"Duplicate Strategy","description":"Duplicate specific strategy.","operationId":"duplicate_strategy_api_strategies__strategy_id__duplicate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyDuplicate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/strategies/{strategy_id}/permissions":{"get":{"tags":["strategies"],"summary":"Get Strategy Permissions","description":"Get strategy permissions.","operationId":"get_strategy_permissions_api_strategies__strategy_id__permissions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["strategies"],"summary":"Modify Strategy Permissions","description":"Grants or restricts access to a specific strategy.","operationId":"modify_strategy_permissions_api_strategies__strategy_id__permissions_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyPermissions"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/strategies/{strategy_id}/performance":{"get":{"tags":["strategies"],"summary":"Get Strategy Performance","description":"Returns performance benchmarks for specific strategy.","operationId":"get_strategy_performance_api_strategies__strategy_id__performance_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}},{"name":"start_date","in":"query","required":false,"schema":{"type":"string","default":"","title":"Start Date"}},{"name":"end_date","in":"query","required":false,"schema":{"type":"string","default":"","title":"End Date"}},{"name":"default","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Default"}},{"name":"is_async","in":"query","required":false,"schema":{"type":"string","default":"","title":"Is Async"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/strategies/{strategy_id}/live-positions":{"get":{"tags":["strategies"],"summary":"Get Strategy Live Positions","description":"Returns live positions for specific strategy.","operationId":"get_strategy_live_positions_api_strategies__strategy_id__live_positions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"strategy_id","in":"path","required":true,"schema":{"type":"string","title":"Strategy Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/strategies/live-performance":{"post":{"tags":["strategies"],"summary":"Get Live Performance For Config","description":"Returns performance benchmarks for specified config not tied to a specific strategy.","operationId":"get_live_performance_for_config_api_strategies_live_performance_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyLivePerformance"}}},"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":[]}]}},"/api/strategies/market-indicators":{"get":{"tags":["strategies"],"summary":"Get Strategy Market Indicators","description":"Returns strategy market indicators.","operationId":"get_strategy_market_indicators_api_strategies_market_indicators_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"type","in":"query","required":false,"schema":{"type":"string","default":"","title":"Type"}},{"name":"trading_instrument","in":"query","required":false,"schema":{"type":"string","default":"","title":"Trading Instrument"}},{"name":"ticker_list","in":"query","required":false,"schema":{"type":"string","default":"","title":"Ticker List"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/strategies/advanced-filtering-conditions":{"get":{"tags":["strategies"],"summary":"Get Advanced Filtering Conditions","description":"Returns advanced filtering conditions for building strategies.","operationId":"get_advanced_filtering_conditions_api_strategies_advanced_filtering_conditions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/custom-indicators":{"get":{"tags":["strategies"],"summary":"List Custom Indicators","description":"List custom indicators for current user.","operationId":"list_custom_indicators_api_custom_indicators_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["strategies"],"summary":"Create Custom Indicator","description":"Create custom indicator.","operationId":"create_custom_indicator_api_custom_indicators_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomIndicatorCreate"}}},"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":[]}]}},"/api/_custom-indicators":{"get":{"tags":["strategies"],"summary":"List Custom Indicators Ops","description":"List custom indicators - used by ops for automations.","operationId":"list_custom_indicators_ops_api__custom_indicators_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["strategies"],"summary":"Create Custom Indicator Ops","description":"Create custom indicator - used by ops for automations.","operationId":"create_custom_indicator_ops_api__custom_indicators_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomIndicatorCreate"}}},"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":[]}]}},"/api/custom-indicators/{indicator_id}":{"get":{"tags":["strategies"],"summary":"Get Custom Indicator","description":"Retrieve a custom indicator.","operationId":"get_custom_indicator_api_custom_indicators__indicator_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"indicator_id","in":"path","required":true,"schema":{"type":"string","title":"Indicator Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["strategies"],"summary":"Update Custom Indicator","description":"Update specific custom indicator.","operationId":"update_custom_indicator_api_custom_indicators__indicator_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"indicator_id","in":"path","required":true,"schema":{"type":"integer","title":"Indicator Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomIndicatorUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["strategies"],"summary":"Delete Custom Indicator","description":"Delete specific custom indicator.","operationId":"delete_custom_indicator_api_custom_indicators__indicator_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"indicator_id","in":"path","required":true,"schema":{"type":"integer","title":"Indicator Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/_custom-indicators/search":{"post":{"tags":["strategies"],"summary":"Search Custom Indicators","description":"Search for custom indicators - used by ops for automations.","operationId":"search_custom_indicators_api__custom_indicators_search_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomIndicatorSearch"}}},"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":[]}]}},"/api/custom-indicators/signal":{"post":{"tags":["strategies"],"summary":"Create Custom Indicator With Signal","description":"Create custom indicator with signal.","operationId":"create_custom_indicator_with_signal_api_custom_indicators_signal_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_create_custom_indicator_with_signal_api_custom_indicators_signal_post"}}},"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":[]}]}},"/api/custom-indicators/signal/{indicator_id}":{"put":{"tags":["strategies"],"summary":"Update Custom Indicator With Signal","description":"Update Custom Indicator with signal.","operationId":"update_custom_indicator_with_signal_api_custom_indicators_signal__indicator_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"indicator_id","in":"path","required":true,"schema":{"type":"string","title":"Indicator Id"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_update_custom_indicator_with_signal_api_custom_indicators_signal__indicator_id__put"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/_custom-indicators/{indicator_id}":{"delete":{"tags":["strategies"],"summary":"Delete Custom Indicator Ops","description":"Delete specific custom indicator - used by ops for automations.","operationId":"delete_custom_indicator_ops_api__custom_indicators__indicator_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"indicator_id","in":"path","required":true,"schema":{"type":"string","title":"Indicator Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/custom-indicators/operators":{"get":{"tags":["strategies"],"summary":"Custom Indicators Operators","description":"Returns available operators options for building formula of custom indicators.","operationId":"custom_indicators_operators_api_custom_indicators_operators_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/weight-scheme-list":{"post":{"tags":["strategies"],"summary":"Weight Scheme List","description":"Returns weight scheme list for provided tickers.","operationId":"weight_scheme_list_api_weight_scheme_list_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WeightSchemeList"}}},"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":[]}]}},"/api/strategies/compare":{"post":{"tags":["strategies"],"summary":"Compare Strategies","description":"Compare strategies.","operationId":"compare_strategies_api_strategies_compare_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompareStrategies"}}},"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":[]}]}},"/api/tasks":{"get":{"tags":["strategies"],"summary":"List Tasks For Current User","description":"List tasks for current user.","operationId":"list_tasks_for_current_user_api_tasks_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/tasks/{task_id}/seen":{"get":{"tags":["strategies"],"summary":"Mark Task As Seen","description":"Mark task as seen.","operationId":"mark_task_as_seen_api_tasks__task_id__seen_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tasks/{task_id}/revoke":{"get":{"tags":["strategies"],"summary":"Revoke Task","description":"Revoke task.","operationId":"revoke_task_api_tasks__task_id__revoke_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tasks/strategies/{task_id}/result":{"get":{"tags":["strategies"],"summary":"Get Strategy Performance For Task","description":"Get strategy performance for task.","operationId":"get_strategy_performance_for_task_api_tasks_strategies__task_id__result_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/watchlist":{"get":{"tags":["watchlist"],"summary":"List Watchlist","description":"List watchlist items.","operationId":"list_watchlist_api_watchlist_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["watchlist"],"summary":"Create Watchlist Item","description":"Add item to watchlist.","operationId":"create_watchlist_item_api_watchlist_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WatchlistItemCreate"}}},"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":[]}]}},"/api/watchlist/{item_id}":{"delete":{"tags":["watchlist"],"summary":"Delete Watchlist Item","description":"Remove item from watchlist.","operationId":"delete_watchlist_item_api_watchlist__item_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"integer","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/watchlist/news":{"get":{"tags":["watchlist"],"summary":"Get Watchlist News","description":"Fetch Google News RSS articles for a ticker (max 10).","operationId":"get_watchlist_news_api_watchlist_news_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"ticker","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":20,"title":"Ticker"}},{"name":"market","in":"query","required":false,"schema":{"type":"string","default":"stocks","title":"Market"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":80},{"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"}}}}}}},"/api/watchlist/reorder":{"post":{"tags":["watchlist"],"summary":"Reorder Watchlist","description":"Reorder watchlist items.","operationId":"reorder_watchlist_api_watchlist_reorder_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WatchlistReorder"}}},"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":[]}]}},"/api/watchlist/history":{"get":{"tags":["watchlist"],"summary":"Get Watchlist History","description":"Price series and previous close for watchlist tickers, from Polygon aggregate bars.\n\nThis is the chart's source of truth, deliberately independent of the price-streaming\nsocket: the streamer derives its series from the trade tape, which the current Polygon\nplan serves 15 minutes late and, for many liquid tickers, not at all — CSCO, AAPL and\nMSFT all report zero trades for the live session, which is why their charts were empty\nand their change stuck at 0.00%. Aggregate bars are entitled in full and lag ~2 minutes,\nso a ticker gets a real series here whether or not the stream is healthy.","operationId":"get_watchlist_history_api_watchlist_history_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"tickers","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":2000,"description":"Comma-separated \"market:ticker\" pairs","title":"Tickers"},"description":"Comma-separated \"market:ticker\" pairs"},{"name":"range","in":"query","required":false,"schema":{"type":"string","default":"1D","title":"Range"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspace/ticker-prices":{"post":{"tags":["workspace","workspace"],"summary":"Workspace Ticker Prices","description":"Batch last trade (or day close) prices for workspace UI (e.g. manual portfolio form).","operationId":"workspace_ticker_prices_api_workspace_ticker_prices_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TickerPricesRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TickerPricesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/workspace/ticker-quotes":{"post":{"tags":["workspace","workspace"],"summary":"Workspace Ticker Quotes","description":"Batch latest price + change vs previous close (e.g. the Demo Portfolio's live prices).","operationId":"workspace_ticker_quotes_api_workspace_ticker_quotes_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TickerPricesRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TickerQuotesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/workspace/ticker-suggestions":{"post":{"tags":["workspace","workspace"],"summary":"Workspace Ticker Suggestions","description":"\"Did you mean …?\" for tickers with no market price (manual portfolio form).","operationId":"workspace_ticker_suggestions_api_workspace_ticker_suggestions_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TickerPricesRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TickerSuggestionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/workspace/parse-portfolio-file":{"post":{"tags":["workspace","workspace"],"summary":"Parse Portfolio File","description":"Import a broker document (.csv/.xls/.xlsx/.pdf/.doc/.docx/.txt or an image).\n\nTwo outcomes, distinguished by status code:\n\n* **200** with `holdings` — a spreadsheet whose ticker/shares columns mapped\n  directly. Parsed inline, no LLM call, exactly as before.\n* **202** with `job_id` — queued for extraction on odin-agent (text pass + vision\n  pass, reconciled). Poll `GET /workspace/parse-portfolio-file/{job_id}`.\n\nA 200 with `duplicate_of` set means these exact bytes were already parsed for this\nuser and the earlier job is being returned instead of re-running the extraction.","operationId":"parse_portfolio_file_api_workspace_parse_portfolio_file_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_parse_portfolio_file_api_workspace_parse_portfolio_file_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParsePortfolioFileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["workspace","workspace"],"summary":"List Portfolio File Imports","description":"The user's recent document imports, newest first.","operationId":"list_portfolio_file_imports_api_workspace_parse_portfolio_file_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DocumentImportJobSummary"},"title":"Response List Portfolio File Imports Api Workspace Parse Portfolio File Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspace/parse-portfolio-file/{job_id}":{"get":{"tags":["workspace","workspace"],"summary":"Get Portfolio File Import","description":"Poll a queued document import.\n\n`status` is one of pending / processing / finished / failed; the latter two are\nterminal. On success `result` holds the typed extraction payload and `holdings`\noffers the positions as `{ticker, shares}` (empty for documents that report no\npositions, such as a trade confirmation). On failure `error` is a sentence\nintended to be shown to the user.","operationId":"get_portfolio_file_import_api_workspace_parse_portfolio_file__job_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentImportJobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspace/manual-portfolios":{"get":{"tags":["workspace","workspace"],"summary":"List User Manual Portfolios","description":"List user-created manual portfolios (excludes demo slot row identified by reserved name).","operationId":"list_user_manual_portfolios_api_workspace_manual_portfolios_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ManualPortfolioSummary"},"type":"array","title":"Response List User Manual Portfolios Api Workspace Manual Portfolios Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/workspace/portfolios/overview":{"get":{"tags":["workspace","workspace"],"summary":"Portfolios Overview","description":"One-shot overview of every selectable portfolio (manual + connected broker\naccounts, demo excluded) with its positions market value (\"volume\").\n\nFetched early on app entry to drive the portfolio dropdown's volume badges and\n(future) active-portfolio auto-selection. Fans out to broker APIs, so the response\nis cached briefly per user; one source failing is reported per item (volume=null),\nnever globally.","operationId":"portfolios_overview_api_workspace_portfolios_overview_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortfoliosOverviewResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/workspace/manual-portfolios/all":{"get":{"tags":["workspace","workspace"],"summary":"List Workspace Portfolio Analysis Ids","description":"List all workspace analysis slot ids for cross-browser localStorage sync.","operationId":"list_workspace_portfolio_analysis_ids_api_workspace_manual_portfolios_all_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"has_results","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"If present (bare `?has_results` or any value), return only portfolios that have non-empty analysis results.","title":"Has Results"},"description":"If present (bare `?has_results` or any value), return only portfolios that have non-empty analysis results."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspacePortfolioAnalysisIdsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspace/parse-portfolio-file/{job_id}/portfolio":{"post":{"tags":["workspace","workspace"],"summary":"Create Portfolio From Document","description":"Save the statement behind a finished import as one of the user's portfolios.\n\nBuilt from the extraction rather than from the conversation's own scoped portfolio:\nthat row stays where it is (the chat keeps working), and this can be called again\nlater — the source document outlives any portfolio made from it.\n\n``name`` is optional; without it the broker on the statement names the portfolio. The\nsame limit as creating one by hand applies, since this takes a slot just the same.","operationId":"create_portfolio_from_document_api_workspace_parse_portfolio_file__job_id__portfolio_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DocumentPortfolioRequest"},{"type":"null"}],"title":"Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManualPortfolioResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspace/parse-portfolio-file/{job_id}/file":{"get":{"tags":["workspace","workspace"],"summary":"Download Portfolio File","description":"Download the original document a chat message was sent with.\n\nScoped to the authenticated user via the job row, so a job id alone is not enough to\nread someone else's statement.","operationId":"download_portfolio_file_api_workspace_parse_portfolio_file__job_id__file_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspace/manual-portfolio/user":{"post":{"tags":["workspace","workspace"],"summary":"Create User Manual Portfolio","description":"Create a new user manual portfolio (always a new UUID).","operationId":"create_user_manual_portfolio_api_workspace_manual_portfolio_user_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManualPortfolioCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManualPortfolioResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/workspace/manual-portfolio":{"post":{"tags":["workspace","workspace"],"summary":"Upsert Demo Manual Portfolio","description":"Create or replace the demo manual portfolio row (name == reserved constant).\nDoes not affect user-created portfolios (other names): with no reserved row a new one is\nmade. (It used to rename a user's only portfolio into the demo slot and overwrite its\nholdings — a legacy step from the single-portfolio days that wiped real portfolios.)","operationId":"upsert_demo_manual_portfolio_api_workspace_manual_portfolio_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManualPortfolioCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManualPortfolioResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/workspace/manual-portfolio/{portfolio_id}":{"put":{"tags":["workspace","workspace"],"summary":"Update User Manual Portfolio","description":"Update name and/or holdings for a user manual portfolio (not demo).","operationId":"update_user_manual_portfolio_api_workspace_manual_portfolio__portfolio_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"portfolio_id","in":"path","required":true,"schema":{"type":"string","title":"Portfolio Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManualPortfolioUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManualPortfolioResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["workspace","workspace"],"summary":"Delete User Manual Portfolio","description":"Delete a user manual portfolio and its workspace analysis row.","operationId":"delete_user_manual_portfolio_api_workspace_manual_portfolio__portfolio_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"portfolio_id","in":"path","required":true,"schema":{"type":"string","title":"Portfolio Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["workspace","workspace"],"summary":"Get Manual Portfolio","operationId":"get_manual_portfolio_api_workspace_manual_portfolio__portfolio_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"portfolio_id","in":"path","required":true,"schema":{"type":"string","title":"Portfolio Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManualPortfolioResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspace/portfolio/analyze":{"post":{"tags":["workspace","workspace"],"summary":"Analyze Portfolio","description":"Trigger portfolio analysis. The backend resolves holdings based on source:\n- snaptrade / tradestation / tradier: fetches positions live from the broker API\n- manual: loads holdings from a previously saved ManualPortfolio","operationId":"analyze_portfolio_api_workspace_portfolio_analyze_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortfolioAnalysisRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortfolioAnalysisResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/workspace/portfolio/forecast-report/download":{"get":{"tags":["workspace","workspace"],"summary":"Download Forecast Report","description":"Download a forecast report PDF from S3. Requires authentication.","operationId":"download_forecast_report_api_workspace_portfolio_forecast_report_download_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key","in":"query","required":true,"schema":{"type":"string","description":"S3 key of the forecast report","title":"Key"},"description":"S3 key of the forecast report"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspace/portfolio/all":{"get":{"tags":["workspace","workspace"],"summary":"Get All Accounts Analysis","description":"Analysis of all the user's portfolios combined (demo excluded), for the home page.\n\nCharts and earnings tables come from each account's stored analysis. Hedges are\ncomputed for the combined holdings and refreshed nightly; when there is no\nresult yet one is started, and the response reports hedges_status 'pending'.","operationId":"get_all_accounts_analysis_api_workspace_portfolio_all_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AllAccountsAnalysisResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/workspace/portfolio/all/positions":{"get":{"tags":["workspace","workspace"],"summary":"Get All Accounts Positions","description":"Live positions of all the user's portfolios combined (demo excluded), merged by\nticker. Each row's total_value is the combined value of every account, cash included.","operationId":"get_all_accounts_positions_api_workspace_portfolio_all_positions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AllAccountsPositionsResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/workspace/portfolio/{portfolio_id}":{"get":{"tags":["workspace","workspace"],"summary":"Get Portfolio Analysis","description":"Get the analysis result for a specific portfolio ID.","operationId":"get_portfolio_analysis_api_workspace_portfolio__portfolio_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"portfolio_id","in":"path","required":true,"schema":{"type":"string","title":"Portfolio Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortfolioAnalysisResultResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/support/messages":{"post":{"tags":["support","support"],"summary":"Create Support Message","operationId":"create_support_message_api_support_messages_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_create_support_message_api_support_messages_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["support","support"],"summary":"Support User List Messages","operationId":"support_user_list_messages_api_support_messages_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Per Page"}},{"name":"before_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Before Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/support/admin/messages":{"get":{"tags":["support","support"],"summary":"Support Admin List Messages","operationId":"support_admin_list_messages_api_support_admin_messages_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["support","support"],"summary":"Support Admin Send Message","operationId":"support_admin_send_message_api_support_admin_messages_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_support_admin_send_message_api_support_admin_messages_post"}}},"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":[]}]}},"/api/support/messages/{message_id}/read":{"patch":{"tags":["support","support"],"summary":"Support User Mark Message Read","operationId":"support_user_mark_message_read_api_support_messages__message_id__read_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"integer","title":"Message Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/support/messages/read-all":{"patch":{"tags":["support","support"],"summary":"Support User Mark All Read","operationId":"support_user_mark_all_read_api_support_messages_read_all_patch","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/support/admin/unread-count":{"get":{"tags":["support","support"],"summary":"Support Admin Unread Count","operationId":"support_admin_unread_count_api_support_admin_unread_count_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/support/admin/conversations":{"get":{"tags":["support","support"],"summary":"Support Admin List Conversations","description":"The superadmin inbox.\n\nWith `limit` (the website): one page of every customer, threads first by their last message (newest on top),\nthen the customers who never wrote, by email -- so the inbox needs no second call for the user directory.\nFilters (`search`, `topic`, `new_only`) are applied here, before paging.\n\nWithout `limit` (the mobile app, older web builds): every thread and nothing else, in the original shape.","operationId":"support_admin_list_conversations_api_support_admin_conversations_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":100,"minimum":1},{"type":"null"}],"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Search"}},{"name":"topic","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Topic"}},{"name":"new_only","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"New Only"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/support/admin/conversations/{conversation_id}/messages":{"get":{"tags":["support","support"],"summary":"Support Admin List Conversation Messages","operationId":"support_admin_list_conversation_messages_api_support_admin_conversations__conversation_id__messages_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Per Page"}},{"name":"before_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Before Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["support","support"],"summary":"Support Admin Delete Conversation Messages","description":"Remove all messages in one support thread (superadmin only).","operationId":"support_admin_delete_conversation_messages_api_support_admin_conversations__conversation_id__messages_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/support/admin/conversations/{conversation_id}/draft-reply":{"post":{"tags":["support","support"],"summary":"Support Admin Draft Reply","description":"An AI draft of the next reply, built from the whole conversation; nothing is sent or stored in the thread.\nOne draft per last message is kept for a while, so reopening a thread costs nothing; `refresh` asks for a new one.","operationId":"support_admin_draft_reply_api_support_admin_conversations__conversation_id__draft_reply_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"refresh","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Refresh"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/support/admin/conversations/{conversation_id}/read":{"patch":{"tags":["support","support"],"summary":"Support Admin Mark Conversation Read","operationId":"support_admin_mark_conversation_read_api_support_admin_conversations__conversation_id__read_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/support/admin/messages/{message_id}/read":{"patch":{"tags":["support","support"],"summary":"Support Admin Mark Read","operationId":"support_admin_mark_read_api_support_admin_messages__message_id__read_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"integer","title":"Message Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/support/admin/messages/read-all":{"post":{"tags":["support","support"],"summary":"Support Admin Mark All Read","operationId":"support_admin_mark_all_read_api_support_admin_messages_read_all_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["support","support"],"summary":"Support Admin Mark All Read","operationId":"support_admin_mark_all_read_api_support_admin_messages_read_all_patch","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/support/admin/messages/{message_id}":{"delete":{"tags":["support","support"],"summary":"Support Admin Delete Message","operationId":"support_admin_delete_message_api_support_admin_messages__message_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"integer","title":"Message Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/notifications":{"get":{"tags":["notifications","notifications"],"summary":"List Notifications","operationId":"list_notifications_api_notifications_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"unread_only","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Unread Only"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"before_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Before Id"}},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["notifications","notifications"],"summary":"Dismiss All Notifications","operationId":"dismiss_all_notifications_api_notifications_delete","security":[{"HTTPBearer":[]}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/notifications/unread-count":{"get":{"tags":["notifications","notifications"],"summary":"Get Unread Count","operationId":"get_unread_count_api_notifications_unread_count_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnreadCountResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/notifications/read":{"post":{"tags":["notifications","notifications"],"summary":"Mark As Read","operationId":"mark_as_read_api_notifications_read_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkAsReadRequest"}}},"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":[]}]}},"/api/notifications/read-all":{"post":{"tags":["notifications","notifications"],"summary":"Mark All Read","operationId":"mark_all_read_api_notifications_read_all_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/notifications/dismiss":{"post":{"tags":["notifications","notifications"],"summary":"Dismiss Notifications","operationId":"dismiss_notifications_api_notifications_dismiss_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DismissNotificationsRequest"}}},"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":[]}]}},"/api/notifications/portfolio-analysis/counts":{"get":{"tags":["notifications","notifications"],"summary":"Portfolio Analysis Counts","description":"Returns per-portfolio notification counts for all non-dismissed portfolio_analysis\nnotifications. Groups by portfolio_id sourced from extra_data (new) or body (legacy).","operationId":"portfolio_analysis_counts_api_notifications_portfolio_analysis_counts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PortfolioNotificationCountOut"},"type":"array","title":"Response Portfolio Analysis Counts Api Notifications Portfolio Analysis Counts Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/notifications/preferences":{"get":{"tags":["notifications","notifications"],"summary":"Get Preferences","operationId":"get_preferences_api_notifications_preferences_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationPreferencesResponse"}}}}},"security":[{"HTTPBearer":[]}]},"put":{"tags":["notifications","notifications"],"summary":"Update Preferences","operationId":"update_preferences_api_notifications_preferences_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationPreferencesUpdate"}}},"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":[]}]}},"/api/notifications/test":{"post":{"tags":["notifications","notifications"],"summary":"Test Notification","description":"Send a test notification through the normal (asyncio) delivery path. A staff tool\n(checking a channel or a device), so superadmins only: they can target any user\n(`user_id`, default themselves) and pick any channels. The body is escaped: it is\nshown as text, never as markup.","operationId":"test_notification_api_notifications_test_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestNotificationRequest"}}},"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":[]}]}},"/api/push/devices":{"post":{"tags":["push","push"],"summary":"Register Push Device","description":"Register (or refresh) this install's push token for the signed-in user. A token\nregistered earlier by another user moves to this one. Call it after sign-in, on every\napp start and whenever FCM rotates the token.","operationId":"register_push_device_api_push_devices_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushDeviceRegister"}}},"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":[]}]}},"/api/push/devices/unregister":{"post":{"tags":["push","push"],"summary":"Unregister Push Device","description":"Stop pushing to this install (sign-out, or push turned off on the device). Only the\ncaller's own token is removed; `removed` is false when it was not theirs or not known.","operationId":"unregister_push_device_api_push_devices_unregister_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushDeviceUnregister"}}},"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":[]}]}},"/api/internal/orders":{"post":{"tags":["internal"],"summary":"Place Order","description":"Place an order on behalf of a user. Called by the R engine.","operationId":"place_order_api_internal_orders_post","parameters":[{"name":"x-internal-key","in":"header","required":true,"schema":{"type":"string","title":"X-Internal-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/orders/{order_id}":{"delete":{"tags":["internal"],"summary":"Cancel Order","description":"Cancel an order by our internal BrokerOrder.id.\nbroker and user_id are required query params.","operationId":"cancel_order_api_internal_orders__order_id__delete","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"integer","title":"Order Id"}},{"name":"broker","in":"query","required":true,"schema":{"type":"string","title":"Broker"}},{"name":"user_id","in":"query","required":true,"schema":{"type":"integer","title":"User Id"}},{"name":"x-internal-key","in":"header","required":true,"schema":{"type":"string","title":"X-Internal-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/accounts/{account_id}/orders":{"delete":{"tags":["internal"],"summary":"Cancel All Orders","description":"Cancel all open orders for the account placed by our platform.","operationId":"cancel_all_orders_api_internal_accounts__account_id__orders_delete","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"broker","in":"query","required":true,"schema":{"type":"string","title":"Broker"}},{"name":"user_id","in":"query","required":true,"schema":{"type":"integer","title":"User Id"}},{"name":"sim","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Sim"}},{"name":"x-internal-key","in":"header","required":true,"schema":{"type":"string","title":"X-Internal-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["internal"],"summary":"Get Orders","description":"Return orders placed by our platform for this account, enriched with\nlive status from the broker.","operationId":"get_orders_api_internal_accounts__account_id__orders_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"broker","in":"query","required":true,"schema":{"type":"string","title":"Broker"}},{"name":"user_id","in":"query","required":true,"schema":{"type":"integer","title":"User Id"}},{"name":"sim","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Sim"}},{"name":"x-internal-key","in":"header","required":true,"schema":{"type":"string","title":"X-Internal-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/accounts/{account_id}/historical-orders":{"get":{"tags":["internal"],"summary":"Get Historical Orders","description":"Return prior-session order/trade history for the account.\n\nResponse shape is broker-specific: TradeStation returns terminal-state\norder records; Tradier returns executed trade-history events. `since`\n(YYYY-MM-DD) is required by TradeStation; Tradier accepts `since` and/or\n`days_back` (default 30).","operationId":"get_historical_orders_api_internal_accounts__account_id__historical_orders_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"broker","in":"query","required":true,"schema":{"type":"string","title":"Broker"}},{"name":"user_id","in":"query","required":true,"schema":{"type":"integer","title":"User Id"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Since"}},{"name":"days_back","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days Back"}},{"name":"sim","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Sim"}},{"name":"x-internal-key","in":"header","required":true,"schema":{"type":"string","title":"X-Internal-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/accounts/{account_id}/positions":{"get":{"tags":["internal"],"summary":"Get Positions","description":"Return positions for an account, with harmonized asset types.","operationId":"get_positions_api_internal_accounts__account_id__positions_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"broker","in":"query","required":true,"schema":{"type":"string","title":"Broker"}},{"name":"user_id","in":"query","required":true,"schema":{"type":"integer","title":"User Id"}},{"name":"x-internal-key","in":"header","required":true,"schema":{"type":"string","title":"X-Internal-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/accounts/{account_id}/balances":{"get":{"tags":["internal"],"summary":"Get Balances","description":"Return balance data for an account (equity, buying power, cash, etc.).","operationId":"get_balances_api_internal_accounts__account_id__balances_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"broker","in":"query","required":true,"schema":{"type":"string","title":"Broker"}},{"name":"user_id","in":"query","required":true,"schema":{"type":"integer","title":"User Id"}},{"name":"x-internal-key","in":"header","required":true,"schema":{"type":"string","title":"X-Internal-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/quotes":{"get":{"tags":["internal"],"summary":"Get Quotes","description":"Return bid/ask/last/mid for one or more symbols.\nsymbols: comma-separated string, e.g. AAPL,MSFT,GOOG","operationId":"get_quotes_api_internal_quotes_get","parameters":[{"name":"broker","in":"query","required":true,"schema":{"type":"string","title":"Broker"}},{"name":"user_id","in":"query","required":true,"schema":{"type":"integer","title":"User Id"}},{"name":"symbols","in":"query","required":true,"schema":{"type":"string","title":"Symbols"}},{"name":"x-internal-key","in":"header","required":true,"schema":{"type":"string","title":"X-Internal-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/accounts":{"get":{"tags":["internal"],"summary":"List Accounts","description":"List brokerage accounts for the given user. ``raw=true`` returns the broker's\naccount objects verbatim (TradeStation only); otherwise a reduced {id, name} list.","operationId":"list_accounts_api_internal_accounts_get","parameters":[{"name":"broker","in":"query","required":true,"schema":{"type":"string","title":"Broker"}},{"name":"user_id","in":"query","required":true,"schema":{"type":"integer","title":"User Id"}},{"name":"raw","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Raw"}},{"name":"x-internal-key","in":"header","required":true,"schema":{"type":"string","title":"X-Internal-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/capabilities":{"get":{"tags":["internal"],"summary":"Get Capabilities","description":"Return what the broker supports (order types, time-in-force, trade actions,\nroutes/options/preview) so callers can build valid requests.","operationId":"get_capabilities_api_internal_capabilities_get","parameters":[{"name":"broker","in":"query","required":true,"schema":{"type":"string","title":"Broker"}},{"name":"x-internal-key","in":"header","required":true,"schema":{"type":"string","title":"X-Internal-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/tradestation/routes":{"get":{"tags":["internal"],"summary":"Internal Get Routes","description":"Return available TS order routes (cached 24h).\nUse this to discover valid route IDs for placing TradeStation orders.","operationId":"internal_get_routes_api_internal_tradestation_routes_get","parameters":[{"name":"user_id","in":"query","required":true,"schema":{"type":"integer","title":"User Id"}},{"name":"x-internal-key","in":"header","required":true,"schema":{"type":"string","title":"X-Internal-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/tradier/inject-token":{"post":{"tags":["internal"],"summary":"Internal Tradier Inject Token","description":"Inject a Tradier personal API key for a user, bypassing OAuth.\nValidates the token against /user/profile, stores the connection, and caches the token.\npersonal_token=true extends the cache TTL to 30 days for non-expiring keys.","operationId":"internal_tradier_inject_token_api_internal_tradier_inject_token_post","parameters":[{"name":"x-internal-key","in":"header","required":true,"schema":{"type":"string","title":"X-Internal-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TradierInjectTokenRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/portfolios":{"get":{"tags":["internal"],"summary":"List Portfolios","description":"List a user's manual portfolios and connected broker accounts.\n\n``session_id`` is the chat session the agent is answering in. Passing it also returns\nthe portfolio built from a statement attached in that conversation, which is otherwise\nhidden from every listing — that is what lets a follow-up reason about an uploaded\nstatement without it showing up in the user's portfolios.","operationId":"list_portfolios_api_internal_portfolios_get","parameters":[{"name":"user_id","in":"query","required":true,"schema":{"type":"integer","title":"User Id"}},{"name":"session_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"}},{"name":"x-internal-key","in":"header","required":true,"schema":{"type":"string","title":"X-Internal-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/portfolios/{account_id}/holdings":{"get":{"tags":["internal"],"summary":"Portfolio Holdings","description":"Return live holdings + valuation (Polygon-priced, aggregated) for a portfolio.","operationId":"portfolio_holdings_api_internal_portfolios__account_id__holdings_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"source","in":"query","required":true,"schema":{"enum":["manual","snaptrade","tradestation","tradier","webull"],"type":"string","title":"Source"}},{"name":"user_id","in":"query","required":true,"schema":{"type":"integer","title":"User Id"}},{"name":"x-internal-key","in":"header","required":true,"schema":{"type":"string","title":"X-Internal-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/portfolios/{account_id}/analysis":{"get":{"tags":["internal"],"summary":"Portfolio Analysis","description":"Return the latest stored analysis snapshot for a portfolio (404 if none has\nrun yet). Keyed by (account_id, user_id) — no `source` needed.","operationId":"portfolio_analysis_api_internal_portfolios__account_id__analysis_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"user_id","in":"query","required":true,"schema":{"type":"integer","title":"User Id"}},{"name":"x-internal-key","in":"header","required":true,"schema":{"type":"string","title":"X-Internal-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortfolioAnalysisResultResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/portfolios/{account_id}/positions-history":{"get":{"tags":["internal"],"summary":"Portfolio Positions History","description":"Return the daily position snapshots for a portfolio (most recent first, up to\n`limit`, max 365). Backed by the `portfolio_snapshots` table the scheduler\nfills daily — broker APIs don't expose historical state.","operationId":"portfolio_positions_history_api_internal_portfolios__account_id__positions_history_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"source","in":"query","required":true,"schema":{"enum":["manual","snaptrade","tradestation","tradier","webull"],"type":"string","title":"Source"}},{"name":"user_id","in":"query","required":true,"schema":{"type":"integer","title":"User Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Limit"}},{"name":"x-internal-key","in":"header","required":true,"schema":{"type":"string","title":"X-Internal-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/marketing/events":{"post":{"tags":["analytics"],"summary":"Site Events","description":"One event (`{kind, …}`) or several (`{events: [{id, ageMs, tries, kind, …}]}`), as JSON or text/plain holding\nJSON. Answered only once written: 204 kept, 429 over the limit, 503 not written — the site keeps every event\nuntil it gets a 2xx, so a refusal delays an event, never loses it. A malformed event is dropped, never an error.","operationId":"site_events_api_marketing_events_post","responses":{"204":{"description":"Successful Response"}}}},"/api/analytics/beat":{"post":{"tags":["analytics"],"summary":"Beat","operationId":"beat_api_analytics_beat_post","responses":{"204":{"description":"Successful Response"}}}},"/api/analytics/events":{"post":{"tags":["analytics"],"summary":"App Events","description":"`{events: [{name, path?, props?, ageMs?}], anon?}` — page views and the like, signed in or not.","operationId":"app_events_api_analytics_events_post","responses":{"204":{"description":"Successful Response"}}}},"/api/marketing/tags":{"post":{"tags":["analytics"],"summary":"M Create","operationId":"m_create_api_marketing_tags_post","requestBody":{"content":{"application/json":{"schema":{"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["analytics"],"summary":"M List","operationId":"m_list_api_marketing_tags_get","parameters":[{"name":"channel","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"campaign","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaign"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/marketing/tags/{tag}":{"get":{"tags":["analytics"],"summary":"M Get","operationId":"m_get_api_marketing_tags__tag__get","parameters":[{"name":"tag","in":"path","required":true,"schema":{"type":"string","title":"Tag"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["analytics"],"summary":"M Update","operationId":"m_update_api_marketing_tags__tag__patch","parameters":[{"name":"tag","in":"path","required":true,"schema":{"type":"string","title":"Tag"}}],"requestBody":{"content":{"application/json":{"schema":{"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":["analytics"],"summary":"M Delete","operationId":"m_delete_api_marketing_tags__tag__delete","parameters":[{"name":"tag","in":"path","required":true,"schema":{"type":"string","title":"Tag"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/marketing/overview":{"get":{"tags":["analytics"],"summary":"M Overview","operationId":"m_overview_api_marketing_overview_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/marketing/timeline":{"get":{"tags":["analytics"],"summary":"M Timeline","operationId":"m_timeline_api_marketing_timeline_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":90,"title":"Days"}},{"name":"metric","in":"query","required":false,"schema":{"type":"string","default":"visits","title":"Metric"}},{"name":"by","in":"query","required":false,"schema":{"type":"string","default":"channel","title":"By"}},{"name":"grain","in":"query","required":false,"schema":{"type":"string","default":"day","title":"Grain"}},{"name":"tag","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tag"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/marketing/hours":{"get":{"tags":["analytics"],"summary":"M Hours","operationId":"m_hours_api_marketing_hours_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":90,"title":"Days"}},{"name":"metric","in":"query","required":false,"schema":{"type":"string","default":"visits","title":"Metric"}},{"name":"by","in":"query","required":false,"schema":{"type":"string","default":"all","title":"By"}},{"name":"tz","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tz"}},{"name":"bursts","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Bursts"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/marketing/impact":{"get":{"tags":["analytics"],"summary":"M Impact","operationId":"m_impact_api_marketing_impact_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":180,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/console/me":{"get":{"tags":["analytics"],"summary":"C Me","operationId":"c_me_api_console_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/console/marketing/tags":{"get":{"tags":["analytics"],"summary":"C Tags","operationId":"c_tags_api_console_marketing_tags_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"channel","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel"}},{"name":"campaign","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaign"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["analytics"],"summary":"C Create","operationId":"c_create_api_console_marketing_tags_post","requestBody":{"content":{"application/json":{"schema":{"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/console/marketing/tags/{tag}":{"patch":{"tags":["analytics"],"summary":"C Update","operationId":"c_update_api_console_marketing_tags__tag__patch","parameters":[{"name":"tag","in":"path","required":true,"schema":{"type":"string","title":"Tag"}}],"requestBody":{"content":{"application/json":{"schema":{"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":["analytics"],"summary":"C Delete","operationId":"c_delete_api_console_marketing_tags__tag__delete","parameters":[{"name":"tag","in":"path","required":true,"schema":{"type":"string","title":"Tag"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/console/marketing/overview":{"get":{"tags":["analytics"],"summary":"C M Overview","operationId":"c_m_overview_api_console_marketing_overview_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/console/marketing/timeline":{"get":{"tags":["analytics"],"summary":"C M Timeline","operationId":"c_m_timeline_api_console_marketing_timeline_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":90,"title":"Days"}},{"name":"metric","in":"query","required":false,"schema":{"type":"string","default":"visits","title":"Metric"}},{"name":"by","in":"query","required":false,"schema":{"type":"string","default":"channel","title":"By"}},{"name":"grain","in":"query","required":false,"schema":{"type":"string","default":"day","title":"Grain"}},{"name":"tag","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tag"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/console/marketing/hours":{"get":{"tags":["analytics"],"summary":"C M Hours","operationId":"c_m_hours_api_console_marketing_hours_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":90,"title":"Days"}},{"name":"metric","in":"query","required":false,"schema":{"type":"string","default":"visits","title":"Metric"}},{"name":"by","in":"query","required":false,"schema":{"type":"string","default":"all","title":"By"}},{"name":"tz","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tz"}},{"name":"bursts","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Bursts"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/console/marketing/impact":{"get":{"tags":["analytics"],"summary":"C M Impact","operationId":"c_m_impact_api_console_marketing_impact_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":180,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/console/sso/code":{"post":{"tags":["analytics"],"summary":"C Sso Code","description":"Called by /console-sso on the site, with the site's own token: a one-time code (60 s, once, bound to the\nconsole's PKCE challenge) for a person allowed into the console. Tokens never travel in a URL.","operationId":"c_sso_code_api_console_sso_code_post","requestBody":{"content":{"application/json":{"schema":{"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/console/sso/exchange":{"post":{"tags":["analytics"],"summary":"C Sso Exchange","description":"The console redeems the code with its verifier and gets its own tokens.","operationId":"c_sso_exchange_api_console_sso_exchange_post","requestBody":{"content":{"application/json":{"schema":{"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/console/overview":{"get":{"tags":["analytics"],"summary":"C Overview","operationId":"c_overview_api_console_overview_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}},{"name":"internal","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Internal"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/console/live":{"get":{"tags":["analytics"],"summary":"C Live","operationId":"c_live_api_console_live_get","parameters":[{"name":"hours","in":"query","required":false,"schema":{"type":"integer","default":48,"title":"Hours"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/console/catalog":{"get":{"tags":["analytics"],"summary":"C Catalog","operationId":"c_catalog_api_console_catalog_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/console/explore":{"post":{"tags":["analytics"],"summary":"C Explore","operationId":"c_explore_api_console_explore_post","requestBody":{"content":{"application/json":{"schema":{"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/console/prompts":{"get":{"tags":["analytics"],"summary":"C Prompts","operationId":"c_prompts_api_console_prompts_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"user","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"session","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}},{"name":"internal","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Internal"}},{"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":"topic","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Topic"}},{"name":"intent","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intent"}},{"name":"canonical","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Canonical"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/console/prompts/{question_id}/answer":{"get":{"tags":["analytics"],"summary":"C Answer","description":"The AI's reply to one question, as parts the console draws, and the run's trace link.","operationId":"c_answer_api_console_prompts__question_id__answer_get","parameters":[{"name":"question_id","in":"path","required":true,"schema":{"type":"integer","title":"Question Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/console/prompts/{question_id}/evaluation":{"get":{"tags":["analytics"],"summary":"C Evaluation","description":"How good the answer was (answer_grades.py): the judge's scores and reasoning, and the agent's own review.","operationId":"c_evaluation_api_console_prompts__question_id__evaluation_get","parameters":[{"name":"question_id","in":"path","required":true,"schema":{"type":"integer","title":"Question Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/console/insights":{"get":{"tags":["analytics"],"summary":"C Insights","description":"What people ask about — topics, intents, tickers, FAQ candidates (superadmin: built from what they typed).","operationId":"c_insights_api_console_insights_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}},{"name":"internal","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Internal"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/console/insights/quality":{"get":{"tags":["analytics"],"summary":"C Quality","description":"How the chats went: score, satisfaction, sentiment, resolution… (conversations.py).","operationId":"c_quality_api_console_insights_quality_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}},{"name":"internal","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Internal"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/console/insights/conversations":{"get":{"tags":["analytics"],"summary":"C Conversations","operationId":"c_conversations_api_console_insights_conversations_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}},{"name":"internal","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Internal"}},{"name":"performance","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Performance"}},{"name":"satisfaction","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Satisfaction"}},{"name":"sentiment","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sentiment"}},{"name":"resolution","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolution"}},{"name":"needs","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Needs"}},{"name":"label","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","default":"date","title":"Sort"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":25,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/console/channels":{"get":{"tags":["analytics"],"summary":"C Channels","description":"Questions by where they were asked — website, app, ChatGPT, Codex, Claude… — and the AI-app funnel.","operationId":"c_channels_api_console_channels_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}},{"name":"internal","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Internal"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/console/insights/feedback":{"get":{"tags":["analytics"],"summary":"C Feedback","description":"What people did after each answer: asked again, stopped, gave up after a failure, kept something.","operationId":"c_feedback_api_console_insights_feedback_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}},{"name":"internal","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Internal"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/console/insights/topics":{"get":{"tags":["analytics"],"summary":"C Topic Quality","operationId":"c_topic_quality_api_console_insights_topics_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}},{"name":"internal","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Internal"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/console/insights/retention":{"get":{"tags":["analytics"],"summary":"C Retention","operationId":"c_retention_api_console_insights_retention_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":90,"title":"Days"}},{"name":"internal","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Internal"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/console/insights/numbers":{"get":{"tags":["analytics"],"summary":"C Numbers","operationId":"c_numbers_api_console_insights_numbers_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}},{"name":"internal","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Internal"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/console/insights/weekly":{"get":{"tags":["analytics"],"summary":"C Weekly","description":"The weekly gap reports and new topics, newest first.","operationId":"c_weekly_api_console_insights_weekly_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/console/insights/calibration":{"get":{"tags":["analytics"],"summary":"C Calibration","description":"How often people agree with the grader, and chats to review next.","operationId":"c_calibration_api_console_insights_calibration_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/console/insights/reviews/{session_id}":{"post":{"tags":["analytics"],"summary":"C Review","operationId":"c_review_api_console_insights_reviews__session_id__post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"requestBody":{"content":{"application/json":{"schema":{"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/console/people":{"get":{"tags":["analytics"],"summary":"C People","operationId":"c_people_api_console_people_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}},{"name":"internal","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Internal"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","default":"questions","title":"Sort"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/console/people/{user_id}":{"get":{"tags":["analytics"],"summary":"C Person","operationId":"c_person_api_console_people__user_id__get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","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"}}}}}}},"/api/console/people/{user_id}/role":{"put":{"tags":["analytics"],"summary":"C Role","description":"Gives or takes the console's marketing role (a regular account otherwise).","operationId":"c_role_api_console_people__user_id__role_put","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"requestBody":{"content":{"application/json":{"schema":{"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/console/geography":{"get":{"tags":["analytics"],"summary":"C Geography","description":"By country — aggregate counts only, so the marketing role sees it too.","operationId":"c_geography_api_console_geography_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}},{"name":"internal","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Internal"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/console/costs":{"get":{"tags":["analytics"],"summary":"C Costs","operationId":"c_costs_api_console_costs_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}},{"name":"internal","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Internal"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/console/keys":{"get":{"tags":["analytics"],"summary":"C Keys","operationId":"c_keys_api_console_keys_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["analytics"],"summary":"C Key Create","operationId":"c_key_create_api_console_keys_post","requestBody":{"content":{"application/json":{"schema":{"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/console/keys/{key_id}":{"delete":{"tags":["analytics"],"summary":"C Key Revoke","operationId":"c_key_revoke_api_console_keys__key_id__delete","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"integer","title":"Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/console/openai/status":{"get":{"tags":["analytics"],"summary":"C Openai Status","operationId":"c_openai_status_api_console_openai_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/console/openai/usage":{"get":{"tags":["analytics"],"summary":"C Openai Usage","operationId":"c_openai_usage_api_console_openai_usage_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","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"}}}}}}},"/api/console/openai/signin":{"post":{"tags":["analytics"],"summary":"C Openai Signin Start","operationId":"c_openai_signin_start_api_console_openai_signin_post","requestBody":{"content":{"application/json":{"schema":{"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/console/openai/signin/finish":{"post":{"tags":["analytics"],"summary":"C Openai Signin Finish","operationId":"c_openai_signin_finish_api_console_openai_signin_finish_post","requestBody":{"content":{"application/json":{"schema":{"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/console/openai/accounts/{name}/renew":{"post":{"tags":["analytics"],"summary":"C Openai Renew","operationId":"c_openai_renew_api_console_openai_accounts__name__renew_post","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/console/openai/accounts/{name}":{"delete":{"tags":["analytics"],"summary":"C Openai Turn Off","operationId":"c_openai_turn_off_api_console_openai_accounts__name__delete","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/console/openai/keys":{"post":{"tags":["analytics"],"summary":"C Openai Key Create","operationId":"c_openai_key_create_api_console_openai_keys_post","requestBody":{"content":{"application/json":{"schema":{"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/console/openai/keys/{name}":{"delete":{"tags":["analytics"],"summary":"C Openai Key Revoke","operationId":"c_openai_key_revoke_api_console_openai_keys__name__delete","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/console/settings":{"get":{"tags":["analytics"],"summary":"C Settings","operationId":"c_settings_api_console_settings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/console/settings/{key}":{"put":{"tags":["analytics"],"summary":"C Setting Save","operationId":"c_setting_save_api_console_settings__key__put","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"requestBody":{"content":{"application/json":{"schema":{"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":["analytics"],"summary":"C Setting Clear","operationId":"c_setting_clear_api_console_settings__key__delete","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"}}}}}}},"/api/console/email-templates":{"get":{"tags":["analytics"],"summary":"C Email Templates","operationId":"c_email_templates_api_console_email_templates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/console/email-templates/{key}":{"get":{"tags":["analytics"],"summary":"C Email Template","operationId":"c_email_template_api_console_email_templates__key__get","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"}}}}}},"put":{"tags":["analytics"],"summary":"C Email Template Save","operationId":"c_email_template_save_api_console_email_templates__key__put","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"requestBody":{"content":{"application/json":{"schema":{"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":["analytics"],"summary":"C Email Template Reset","operationId":"c_email_template_reset_api_console_email_templates__key__delete","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"}}}}}}},"/api/console/email-templates/{key}/preview":{"post":{"tags":["analytics"],"summary":"C Email Template Preview","description":"A draft rendered with the email's sample data, addressed to the person asking, inside the layout.","operationId":"c_email_template_preview_api_console_email_templates__key__preview_post","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"requestBody":{"content":{"application/json":{"schema":{"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/console/email-templates/{key}/test":{"post":{"tags":["analytics"],"summary":"C Email Template Test","description":"The draft, with the sample data, sent to one address: `to` when given (a colleague, a test inbox), else the\nperson asking. Marked [Test] in the subject; 30 an hour per person.","operationId":"c_email_template_test_api_console_email_templates__key__test_post","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"requestBody":{"content":{"application/json":{"schema":{"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/console/email-templates/{key}/enabled":{"put":{"tags":["analytics"],"summary":"C Email Template Enabled","description":"Switch an email on or off. The emails needed to sign in or use an account cannot be switched off.","operationId":"c_email_template_enabled_api_console_email_templates__key__enabled_put","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"requestBody":{"content":{"application/json":{"schema":{"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/console/audit":{"get":{"tags":["analytics"],"summary":"C Audit","operationId":"c_audit_api_console_audit_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/healthcheck":{"get":{"summary":"Healthcheck","description":"Health check endpoint - publicly accessible without authentication.","operationId":"healthcheck_healthcheck_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"head":{"summary":"Healthcheck","description":"Health check endpoint - publicly accessible without authentication.","operationId":"healthcheck_healthcheck_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health":{"get":{"summary":"Health","description":"K8s/ALB health probe endpoint (same response as /healthcheck).","operationId":"health_health_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"head":{"summary":"Health","description":"K8s/ALB health probe endpoint (same response as /healthcheck).","operationId":"health_health_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/polygon/tickers":{"get":{"summary":"Polygon Tickers Proxy","description":"Proxy endpoint for Polygon ticker search API (single market).","operationId":"polygon_tickers_proxy_api_polygon_tickers_get","parameters":[{"name":"search","in":"query","required":false,"schema":{"type":"string","default":"","title":"Search"}},{"name":"market","in":"query","required":false,"schema":{"type":"string","default":"stocks","title":"Market"}},{"name":"active","in":"query","required":false,"schema":{"type":"string","default":"true","title":"Active"}},{"name":"limit","in":"query","required":false,"schema":{"type":"string","default":"20","title":"Limit"}},{"name":"ticker_type","in":"query","required":false,"schema":{"type":"string","default":"","title":"Ticker Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/polygon/tickers/search":{"get":{"summary":"Polygon Tickers Search All","description":"Combined ticker search across all markets in a single request.\nMakes all Polygon API calls in parallel and returns results grouped by market.\nResponses are cached in Redis for 5 minutes to reduce Polygon API load.","operationId":"polygon_tickers_search_all_api_polygon_tickers_search_get","parameters":[{"name":"search","in":"query","required":false,"schema":{"type":"string","default":"","title":"Search"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/polygon/debug/{ticker}":{"get":{"summary":"Polygon Debug Snapshot","description":"Debug endpoint to see raw Polygon snapshot data for a stock ticker.","operationId":"polygon_debug_snapshot_api_polygon_debug__ticker__get","parameters":[{"name":"ticker","in":"path","required":true,"schema":{"type":"string","title":"Ticker"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/":{"get":{"summary":"Index Root","description":"Serve frontend index.html at root.","operationId":"index_root__head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"head":{"summary":"Index Root","description":"Serve frontend index.html at root.","operationId":"index_root__head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/{path}":{"head":{"summary":"Index Catchall","description":"Catch-all for SPA routing - serve index.html or public files.","operationId":"index_catchall__path__head","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"Index Catchall","description":"Catch-all for SPA routing - serve index.html or public files.","operationId":"index_catchall__path__head","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AccessToken":{"properties":{"refresh_token":{"type":"string","title":"Refresh Token"}},"type":"object","required":["refresh_token"],"title":"AccessToken"},"AccountDelete":{"properties":{"password":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Password"},"apple_authorization_code":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}],"title":"Apple Authorization Code"},"apple_identity_token":{"anyOf":[{"type":"string","maxLength":8192},{"type":"null"}],"title":"Apple Identity Token"},"nonce":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Nonce"},"apple_client":{"anyOf":[{"type":"string","enum":["ios","macos","android","web"]},{"type":"null"}],"title":"Apple Client"}},"type":"object","title":"AccountDelete","description":"DELETE /profile — a fresh credential is required: the password, or for an Apple\naccount a fresh Apple authorization code (or identity token + its raw nonce)."},"AccountInfo":{"properties":{"account_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Account Index"},"number_masked":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Number Masked"},"number_last4":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Number Last4"},"account_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Code"},"custodian":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custodian"},"registration":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registration"},"account_type":{"anyOf":[{"type":"string","enum":["CASH","MARGIN","IRA","ROTH_IRA","SEP_IRA","401K","TRUST","JOINT","CUSTODIAL","OTHER","UNKNOWN"]},{"type":"null"}],"title":"Account Type"},"account_type_raw":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Type Raw"},"base_currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Currency"}},"type":"object","title":"AccountInfo"},"AllAccountsAnalysisResponse":{"properties":{"data":{"additionalProperties":true,"type":"object","title":"Data"},"hedges_status":{"type":"string","enum":["finished","pending","failed"],"title":"Hedges Status"},"missing_analysis":{"items":{"type":"string"},"type":"array","title":"Missing Analysis"}},"type":"object","required":["data","hedges_status","missing_analysis"],"title":"AllAccountsAnalysisResponse","description":"The home page's \"All accounts\" analysis. `data` has the shape of a single\nportfolio's analysis data; `hedges_status` is 'pending' while the hedges are\nbeing computed and 'failed' when they could not be."},"AllAccountsPositionsResponse":{"properties":{"positions":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Positions"},"total_value":{"type":"number","title":"Total Value"},"total_day_change":{"type":"number","title":"Total Day Change"},"total_day_change_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Day Change Pct"},"priced_count":{"type":"integer","title":"Priced Count"},"holdings_count":{"type":"integer","title":"Holdings Count"}},"type":"object","required":["positions","total_value","total_day_change","priced_count","holdings_count"],"title":"AllAccountsPositionsResponse","description":"Every account's positions merged by ticker, with the same daily-change totals\na single account's positions come with."},"AnalyticsPages":{"properties":{"email":{"type":"string","title":"Email"},"date_from":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date From"},"date_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date To"},"website_id":{"type":"string","title":"Website Id"},"page":{"type":"integer","minimum":1.0,"title":"Page","default":1},"per_page":{"type":"integer","minimum":1.0,"title":"Per Page","default":50},"ordering":{"type":"string","enum":["asc","desc"],"title":"Ordering","default":"desc"},"ordering_column":{"type":"integer","minimum":0.0,"title":"Ordering Column","default":1}},"type":"object","required":["email","website_id"],"title":"AnalyticsPages"},"AppendSamplePromptRequest":{"properties":{"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"prompt_id":{"type":"integer","title":"Prompt Id"},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id"}},"type":"object","required":["prompt_id"],"title":"AppendSamplePromptRequest","description":"A sample prompt to drop into a conversation as a question/answer pair.\n\nOnly the prompt's id travels: the answer is read from `example_prompts` on this\nside rather than sent up, both because it is up to 3.3 MB and because what gets\nwritten into someone's chat history must not be caller-supplied.\n\n`project_id` is only consulted when the session does not exist yet, to file the\nnew one in the folder the chat is open in.\n\nShared by both sample-prompt routes: appending to a session named in the path, and\nPOST /chat/sessions/sample-prompt, which creates the session and mints its id."},"AppleSignIn":{"properties":{"identity_token":{"type":"string","maxLength":8192,"minLength":20,"title":"Identity Token"},"authorization_code":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}],"title":"Authorization Code"},"nonce":{"type":"string","maxLength":512,"minLength":8,"title":"Nonce"},"first_name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Last Name"},"client":{"anyOf":[{"type":"string","enum":["ios","macos","android","web"]},{"type":"null"}],"title":"Client"},"signup":{"anyOf":[{"type":"string","const":"choose"},{"type":"null"}],"title":"Signup"}},"type":"object","required":["identity_token","nonce"],"title":"AppleSignIn","description":"POST /api/auth/apple — what the native Sign in with Apple sheet returned."},"ApprovalListUpdate":{"properties":{"status":{"type":"string","title":"Status"}},"type":"object","required":["status"],"title":"ApprovalListUpdate"},"BalanceItem":{"properties":{"account_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Account Index"},"total_account_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Account Value"},"cash_balance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cash Balance"},"cash_available":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cash Available"},"unsettled_cash":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Unsettled Cash"},"money_market":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Money Market"},"sweep_balance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sweep Balance"},"margin_balance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Margin Balance"},"buying_power":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Buying Power"},"total_cash":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Cash"},"as_of_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"As Of Date"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"}},"type":"object","title":"BalanceItem"},"BestWorstPerformers":{"properties":{"side":{"type":"string","enum":["Best","Worst"],"title":"Side"},"index":{"type":"string","enum":["Large Cap","Mid Cap","Small Cap","Sectors","Industries"],"title":"Index"},"period":{"type":"string","enum":["Today","7 days","30 Days","90 Days","YTD","3 Years"],"title":"Period"},"n":{"type":"integer","title":"N","default":5}},"type":"object","required":["side","index","period"],"title":"BestWorstPerformers"},"Body_create_custom_indicator_with_signal_api_custom_indicators_signal_post":{"properties":{"body":{"type":"string","title":"Body"},"csv_file":{"type":"string","format":"binary","title":"Csv File"}},"type":"object","required":["body","csv_file"],"title":"Body_create_custom_indicator_with_signal_api_custom_indicators_signal_post"},"Body_create_portfolio_allocation_api_portfolio_allocations_post":{"properties":{"body":{"type":"string","title":"Body"},"csv_file":{"type":"string","format":"binary","title":"Csv File"}},"type":"object","required":["body","csv_file"],"title":"Body_create_portfolio_allocation_api_portfolio_allocations_post"},"Body_create_portfolio_hedging_api_portfolios_hedging_post":{"properties":{"body":{"type":"string","title":"Body"},"csv_file":{"type":"string","format":"binary","title":"Csv File"}},"type":"object","required":["body","csv_file"],"title":"Body_create_portfolio_hedging_api_portfolios_hedging_post"},"Body_create_return_csv_api_return_csvs_post":{"properties":{"body":{"type":"string","title":"Body"},"csv_file":{"type":"string","format":"binary","title":"Csv File"}},"type":"object","required":["body","csv_file"],"title":"Body_create_return_csv_api_return_csvs_post"},"Body_create_support_message_api_support_messages_post":{"properties":{"topic":{"type":"string","title":"Topic"},"message":{"type":"string","title":"Message"},"files":{"anyOf":[{"items":{"type":"string","format":"binary"},"type":"array"},{"type":"null"}],"title":"Files"}},"type":"object","required":["topic","message"],"title":"Body_create_support_message_api_support_messages_post"},"Body_feedback_api_feedback_post":{"properties":{"body":{"type":"string","title":"Body"},"type":{"type":"string","title":"Type"},"file":{"anyOf":[{"type":"string","format":"binary"},{"type":"null"}],"title":"File"}},"type":"object","required":["body","type"],"title":"Body_feedback_api_feedback_post"},"Body_parse_portfolio_file_api_workspace_parse_portfolio_file_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"for_chat":{"type":"boolean","title":"For Chat","default":false}},"type":"object","required":["file"],"title":"Body_parse_portfolio_file_api_workspace_parse_portfolio_file_post"},"Body_support_admin_send_message_api_support_admin_messages_post":{"properties":{"topic":{"type":"string","title":"Topic"},"message":{"type":"string","title":"Message"},"conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Id"},"user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Id"},"files":{"anyOf":[{"items":{"type":"string","format":"binary"},"type":"array"},{"type":"null"}],"title":"Files"}},"type":"object","required":["topic","message"],"title":"Body_support_admin_send_message_api_support_admin_messages_post"},"Body_update_custom_indicator_with_signal_api_custom_indicators_signal__indicator_id__put":{"properties":{"body":{"type":"string","title":"Body"},"csv_file":{"type":"string","format":"binary","title":"Csv File"}},"type":"object","title":"Body_update_custom_indicator_with_signal_api_custom_indicators_signal__indicator_id__put"},"Body_update_portfolio_hedging_api_portfolios_hedging__hedging_id__put":{"properties":{"body":{"type":"string","title":"Body"},"csv_file":{"type":"string","format":"binary","title":"Csv File"}},"type":"object","title":"Body_update_portfolio_hedging_api_portfolios_hedging__hedging_id__put"},"Body_update_profile_image_api_profile_image_put":{"properties":{"profile_image":{"anyOf":[{"type":"string","format":"binary"},{"type":"null"}],"title":"Profile Image"}},"type":"object","title":"Body_update_profile_image_api_profile_image_put"},"Body_upload_document_file_api_admin_documents__doc_id__upload_file_put":{"properties":{"document":{"type":"string","format":"binary","title":"Document"}},"type":"object","title":"Body_upload_document_file_api_admin_documents__doc_id__upload_file_put"},"BroadcastNotification":{"properties":{"subject":{"type":"string","maxLength":200,"minLength":1,"title":"Subject"},"message":{"type":"string","minLength":1,"title":"Message"},"sms_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sms Text"},"send_email":{"type":"boolean","title":"Send Email","default":false},"send_sms":{"type":"boolean","title":"Send Sms","default":false}},"type":"object","required":["subject","message"],"title":"BroadcastNotification"},"BrokerLinkAccount":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","title":"Password"},"token":{"type":"string","title":"Token"}},"type":"object","required":["email","password","token"],"title":"BrokerLinkAccount"},"BrokerRegister":{"properties":{"token":{"type":"string","title":"Token"},"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["token","email"],"title":"BrokerRegister"},"BrokerSetEmailRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"referral_source":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Referral Source"}},"type":"object","required":["email"],"title":"BrokerSetEmailRequest","description":"POST /profile/set-email — a broker signup's real address, and the answer to\n\"How did you hear about us?\" the institutional signup asks. Options come from\nGET /signup-options; stored as sent (capped at `users`.`referral_source`)."},"BrokerVerify":{"properties":{"verification_token":{"type":"string","title":"Verification Token"},"otp":{"type":"string","maxLength":6,"minLength":6,"title":"Otp"}},"type":"object","required":["verification_token","otp"],"title":"BrokerVerify"},"BulkMoveSessionsRequest":{"properties":{"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"session_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Session Ids"},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id"},"exclude_session_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Exclude Session Ids"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"target_project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Project Id"}},"type":"object","title":"BulkMoveSessionsRequest","description":"`target_project_id` empty, \"0\" or omitted moves the sessions out of any folder."},"BulkSessionsRequest":{"properties":{"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"session_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Session Ids"},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id"},"exclude_session_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Exclude Session Ids"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","title":"BulkSessionsRequest","description":"Picks the sessions a bulk action applies to, in one of two ways.\n\n`session_ids` names them outright. Otherwise `project_id` selects every session\nin that folder (\"0\" meaning the ones outside any folder), which is what the UI\nsends for \"select all\": the list is paginated, so the client cannot enumerate\nids it has never loaded. `exclude_session_ids` then removes the rows the user\nunticked from that selection, and `name` narrows it to the sessions whose name\ncontains it — the same search the listing was filtered by."},"CashActivityItem":{"properties":{"row_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Row Id"},"checks_passed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Checks Passed"},"agreement":{"anyOf":[{"type":"string","enum":["both_agree","conflict","text_only","vision_only"]},{"type":"null"}],"title":"Agreement"},"confidence":{"anyOf":[{"type":"string","enum":["high","medium","low"]},{"type":"null"}],"title":"Confidence"},"row_warnings":{"items":{"type":"string"},"type":"array","title":"Row Warnings"},"account_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Account Index"},"date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date"},"type":{"anyOf":[{"type":"string","enum":["DIVIDEND","QUALIFIED_DIVIDEND","INTEREST","DEPOSIT","WITHDRAWAL","FEE","TAX_WITHHELD","TRANSFER_IN","TRANSFER_OUT","CORPORATE_ACTION","OTHER"]},{"type":"null"}],"title":"Type"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"symbol":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Symbol"},"amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"source_page":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Source Page"}},"type":"object","title":"CashActivityItem"},"ClosestMarketMatches":{"properties":{"days_before":{"type":"integer","title":"Days Before","default":30},"days_after":{"type":"integer","title":"Days After","default":30},"ignore_cache":{"type":"boolean","title":"Ignore Cache","default":false}},"type":"object","title":"ClosestMarketMatches"},"CodeExchange":{"properties":{"code":{"type":"string","maxLength":256,"minLength":16,"title":"Code"},"code_verifier":{"anyOf":[{"type":"string","maxLength":128,"minLength":43},{"type":"null"}],"title":"Code Verifier"}},"type":"object","required":["code"],"title":"CodeExchange","description":"POST /api/auth/exchange — redeem the one-time code a mobile broker sign-in returned."},"CompanyCreate":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"aum":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Aum"},"strategy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Strategy"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location"},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment"}},"type":"object","required":["name"],"title":"CompanyCreate"},"CompanyDetails":{"properties":{"company_name":{"type":"string","maxLength":200,"minLength":1,"title":"Company Name"},"company_type":{"type":"string","maxLength":64,"minLength":1,"title":"Company Type"},"referral_source":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Referral Source"}},"type":"object","required":["company_name","company_type"],"title":"CompanyDetails","description":"POST /profile/company-details — the institutional signup's questions, asked after\nSign in with Apple. Options come from GET /signup-options."},"CompanyUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Name"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"aum":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Aum"},"strategy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Strategy"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location"},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment"}},"type":"object","title":"CompanyUpdate"},"ComparableItem":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"}],"title":"Id"},"type":{"type":"string","enum":["strategy","portfolio","ticker"],"title":"Type"},"subtype":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subtype"},"is_default":{"type":"boolean","title":"Is Default","default":false}},"type":"object","required":["id","type"],"title":"ComparableItem"},"CompareStrategies":{"properties":{"base":{"$ref":"#/components/schemas/ComparableItem"},"secondary":{"items":{"$ref":"#/components/schemas/ComparableItem"},"type":"array","minItems":1,"title":"Secondary"},"start_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End Date"}},"type":"object","required":["base","secondary"],"title":"CompareStrategies"},"ConsentCreate":{"properties":{"kind":{"type":"string","pattern":"^[a-z][a-z0-9_]{1,31}$","title":"Kind"},"version":{"type":"string","maxLength":32,"minLength":1,"pattern":"^[A-Za-z0-9._-]+$","title":"Version"},"platform":{"anyOf":[{"type":"string","enum":["ios","macos","android","web"]},{"type":"null"}],"title":"Platform"}},"type":"object","required":["kind","version"],"title":"ConsentCreate","description":"POST /profile/consents — e.g. {\"kind\": \"ai_data\", \"version\": \"2026-10-20\"}."},"ContactUs":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"turnstile_token":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}],"title":"Turnstile Token"},"message":{"type":"string","title":"Message"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"}},"type":"object","required":["email","message"],"title":"ContactUs"},"CreateExampleCategoryRequest":{"properties":{"name":{"type":"string","title":"Name"},"order":{"type":"integer","title":"Order","default":0}},"type":"object","required":["name"],"title":"CreateExampleCategoryRequest"},"CreateExamplePromptRequest":{"properties":{"question":{"type":"string","title":"Question"},"answer":{"type":"string","title":"Answer"},"display_name":{"type":"string","maxLength":1000,"title":"Display Name"},"order":{"type":"integer","title":"Order","default":0},"sub_category_id":{"type":"integer","title":"Sub Category Id"}},"type":"object","required":["question","answer","display_name","sub_category_id"],"title":"CreateExamplePromptRequest"},"CreateExampleRequest":{"properties":{"display_name":{"type":"string","title":"Display Name"},"question":{"type":"string","title":"Question"},"answer":{"type":"string","title":"Answer"},"category":{"type":"string","title":"Category"},"order":{"type":"integer","title":"Order"}},"type":"object","required":["display_name","question","answer","category","order"],"title":"CreateExampleRequest"},"CreateExampleSubCategoryRequest":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"order":{"type":"integer","title":"Order","default":0},"category_id":{"type":"integer","title":"Category Id"}},"type":"object","required":["name","description","category_id"],"title":"CreateExampleSubCategoryRequest"},"CreateProjectRequest":{"properties":{"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["name"],"title":"CreateProjectRequest"},"CreateRiskManagementPolicyRequest":{"properties":{"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"policy":{"title":"Policy"}},"type":"object","required":["policy"],"title":"CreateRiskManagementPolicyRequest"},"CreateScreenerRequest":{"properties":{"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"active":{"type":"boolean","title":"Active","default":true},"data":{"anyOf":[{},{"type":"null"}],"title":"Data"},"config":{"anyOf":[{},{"type":"null"}],"title":"Config"},"meta":{"anyOf":[{},{"type":"null"}],"title":"Meta"},"order":{"type":"integer","title":"Order","default":0},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"},"message_id":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Message Id"}},"type":"object","title":"CreateScreenerRequest"},"CreateStrategyRequest":{"properties":{"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"active":{"type":"boolean","title":"Active","default":true},"config":{"title":"Config"},"meta":{"title":"Meta"},"performance":{"title":"Performance"},"order":{"type":"integer","title":"Order","default":0},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"},"message_id":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Message Id"}},"type":"object","required":["config","meta","performance"],"title":"CreateStrategyRequest"},"CustomIndicatorCreate":{"properties":{"name":{"type":"string","title":"Name"},"type":{"type":"string","title":"Type","default":"technical"},"formula":{"items":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"}]},"type":"array","title":"Formula"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"meta":{"anyOf":[{},{"type":"null"}],"title":"Meta"}},"type":"object","required":["name","formula"],"title":"CustomIndicatorCreate"},"CustomIndicatorSearch":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Id"}},"additionalProperties":true,"type":"object","title":"CustomIndicatorSearch"},"CustomIndicatorUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"formula":{"anyOf":[{"items":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"}]},"type":"array"},{"type":"null"}],"title":"Formula"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"meta":{"anyOf":[{},{"type":"null"}],"title":"Meta"}},"type":"object","title":"CustomIndicatorUpdate"},"DeleteWatchlist":{"properties":{"ids":{"items":{"type":"integer"},"type":"array","title":"Ids"}},"type":"object","required":["ids"],"title":"DeleteWatchlist"},"DismissNotificationsRequest":{"properties":{"ids":{"items":{"type":"integer"},"type":"array","title":"Ids"}},"type":"object","required":["ids"],"title":"DismissNotificationsRequest"},"DocumentBulkUpdate":{"properties":{"data":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Data"}},"type":"object","required":["data"],"title":"DocumentBulkUpdate"},"DocumentCreate":{"properties":{"key":{"type":"string","minLength":1,"title":"Key"},"meta":{"additionalProperties":true,"type":"object","title":"Meta"}},"type":"object","required":["key"],"title":"DocumentCreate"},"DocumentImportJobResponse":{"properties":{"id":{"type":"string","title":"Id"},"status":{"type":"string","title":"Status"},"doc_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Doc Type"},"original_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Original Name"},"page_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page Count"},"result":{"anyOf":[{"$ref":"#/components/schemas/ExtractionResult"},{"type":"null"}]},"holdings":{"items":{"$ref":"#/components/schemas/ParsedHoldingItem"},"type":"array","title":"Holdings"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","status"],"title":"DocumentImportJobResponse","description":"Poll response for a queued extraction."},"DocumentImportJobSummary":{"properties":{"id":{"type":"string","title":"Id"},"status":{"type":"string","title":"Status"},"doc_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Doc Type"},"original_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Original Name"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","status"],"title":"DocumentImportJobSummary","description":"One row in the job list."},"DocumentInfo":{"properties":{"doc_type":{"anyOf":[{"type":"string","enum":["trade_confirmation","positions_statement","holdings_list","activity_statement","tax_form_1099b","unknown"]},{"type":"null"}],"title":"Doc Type"},"broker":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Broker"},"document_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Title"},"statement_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Statement Date"},"period_start":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period Start"},"period_end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period End"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"page_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page Count"},"pages_used":{"items":{"type":"integer"},"type":"array","title":"Pages Used"}},"type":"object","title":"DocumentInfo"},"DocumentPortfolioRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","title":"DocumentPortfolioRequest","description":"Body for POST /parse-portfolio-file/{job_id}/portfolio.\n\nOptional throughout: without a name the broker on the statement names the portfolio,\nso a caller with nothing better to offer can save it as it stands."},"DocumentUpdate":{"properties":{"key":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Key"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"ordering":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ordering"}},"type":"object","title":"DocumentUpdate"},"DownloadProtectedDocument":{"properties":{"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email","default":""},"first_name":{"type":"string","title":"First Name","default":""},"last_name":{"type":"string","title":"Last Name","default":""},"company":{"type":"string","title":"Company","default":""}},"type":"object","title":"DownloadProtectedDocument"},"EditMessageRequest":{"properties":{"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"session_id":{"type":"string","title":"Session Id"},"question":{"type":"string","title":"Question"}},"type":"object","required":["session_id","question"],"title":"EditMessageRequest"},"EmailLinkStart":{"properties":{"email":{"type":"string","maxLength":120,"format":"email","title":"Email"},"turnstile_token":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}],"title":"Turnstile Token"},"professional":{"anyOf":[{"$ref":"#/components/schemas/ProfessionalDetails"},{"type":"null"}]},"connect":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Connect"},"request_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Request Id"},"promo":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Promo"},"password":{"anyOf":[{"type":"string","maxLength":128,"minLength":8},{"type":"null"}],"title":"Password"}},"type":"object","required":["email"],"title":"EmailLinkStart"},"EmailLinkVerify":{"properties":{"request_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Request Id"},"code":{"anyOf":[{"type":"string","maxLength":12},{"type":"null"}],"title":"Code"},"token":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Token"},"turnstile_token":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}],"title":"Turnstile Token"}},"type":"object","title":"EmailLinkVerify"},"EntitlementUpdate":{"properties":{"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"free_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Free Days"},"trial_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Trial Days"},"access_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Access Until"},"trial_ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Trial Ends At"}},"type":"object","title":"EntitlementUpdate","description":"Superadmin set/modify of a user's platform entitlement (free period / status).\nProvide a window as days-from-now (free_days / trial_days) or an explicit\ndatetime (access_until / trial_ends_at). free_days omitted = indefinite."},"ExtractionModels":{"properties":{"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"},"vision":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vision"}},"type":"object","title":"ExtractionModels","description":"Which account and which models read this document.\n\nRecorded on every extraction, not just a bring-your-own-key one. Without it a\nuser on their own models has no way to tell whether their models were actually\nused, and neither do we -- the last silent-substitution bug in this pipeline was\na whole verification pass that stopped running while every check still passed,\nbecause a reading that does not happen looks exactly like one that agrees.\n\nNever carries a key."},"ExtractionQuality":{"properties":{"text_pass":{"anyOf":[{"type":"string","enum":["ok","empty","error","skipped"]},{"type":"null"}],"title":"Text Pass"},"vision_pass":{"anyOf":[{"type":"string","enum":["ok","empty","error","skipped"]},{"type":"null"}],"title":"Vision Pass"},"second_reading":{"anyOf":[{"type":"string","enum":["vision","text_repeat","none"]},{"type":"null"}],"title":"Second Reading"},"rows_total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rows Total"},"rows_in_conflict":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rows In Conflict"},"rows_failing_checks":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rows Failing Checks"},"rows_needing_review":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rows Needing Review"},"needs_review":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Needs Review"},"models":{"anyOf":[{"$ref":"#/components/schemas/ExtractionModels"},{"type":"null"}]},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings"}},"type":"object","title":"ExtractionQuality"},"ExtractionResult":{"properties":{"document":{"anyOf":[{"$ref":"#/components/schemas/DocumentInfo"},{"type":"null"}]},"accounts":{"items":{"$ref":"#/components/schemas/AccountInfo"},"type":"array","title":"Accounts"},"transactions":{"items":{"$ref":"#/components/schemas/TransactionItem"},"type":"array","title":"Transactions"},"positions":{"items":{"$ref":"#/components/schemas/PositionItem"},"type":"array","title":"Positions"},"cash_activity":{"items":{"$ref":"#/components/schemas/CashActivityItem"},"type":"array","title":"Cash Activity"},"balances":{"items":{"$ref":"#/components/schemas/BalanceItem"},"type":"array","title":"Balances"},"totals":{"anyOf":[{"$ref":"#/components/schemas/ExtractionTotals"},{"type":"null"}]},"quality":{"anyOf":[{"$ref":"#/components/schemas/ExtractionQuality"},{"type":"null"}]}},"type":"object","title":"ExtractionResult","description":"The full typed payload stored in document_import_jobs.result."},"ExtractionTotals":{"properties":{"transaction_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Transaction Count"},"buy_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Buy Count"},"sell_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sell Count"},"buys_principal":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Buys Principal"},"buys_net":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Buys Net"},"sells_principal":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sells Principal"},"sells_net":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sells Net"},"fees_total":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Fees Total"},"cash_delta":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cash Delta"},"positions_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Positions Count"},"positions_market_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Positions Market Value"},"total_cash":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Cash"},"reported_total_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Reported Total Value"},"by_account":{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object","title":"By Account"}},"type":"object","title":"ExtractionTotals"},"FeatureAccessUpdate":{"properties":{"features":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"type":"object","title":"Features"}},"type":"object","title":"FeatureAccessUpdate"},"FolderCreate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","title":"FolderCreate"},"FolderCreateOrAdd":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"type":{"anyOf":[{"type":"string","enum":["OdinChat","CommonApi","ForecastEquities","Macro","Sectors","Industries"]},{"type":"null"}],"title":"Type"},"command":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Command"},"folder_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Folder Id"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"}},"type":"object","title":"FolderCreateOrAdd","description":"Union schema - either create folder or add saved data."},"ForecastsDemoRequest":{"properties":{"turnstile_token":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}],"title":"Turnstile Token"},"email":{"type":"string","maxLength":150,"format":"email","title":"Email"},"full_name":{"type":"string","maxLength":100,"minLength":1,"title":"Full Name"},"company_name":{"type":"string","maxLength":100,"minLength":1,"title":"Company Name"},"message":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Message"},"phone":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Phone"}},"type":"object","required":["email","full_name","company_name"],"title":"ForecastsDemoRequest","description":"The \"Schedule a Demo\" form at the bottom of the /forecasts landing page.\n\nPublic and unauthenticated, so the lengths are capped here as well as in the\nbrowser — the frontend limits are a courtesy to the visitor, not a guarantee.\nThe message is optional on this form, unlike on ContactUs."},"GenerateExcelFile":{"properties":{"name":{"type":"string","title":"Name"},"sheets":{"items":{"$ref":"#/components/schemas/GenerateExcelSheet"},"type":"array","minItems":1,"title":"Sheets"}},"type":"object","required":["name","sheets"],"title":"GenerateExcelFile"},"GenerateExcelSheet":{"properties":{"name":{"type":"string","title":"Name"},"data":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Data"}},"type":"object","required":["name","data"],"title":"GenerateExcelSheet"},"GenerateSessionTitleRequest":{"properties":{"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"GenerateSessionTitleRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"InAppNotificationOut":{"properties":{"id":{"type":"integer","title":"Id"},"type":{"type":"string","title":"Type"},"title":{"type":"string","title":"Title"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"},"action_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action Url"},"extra_data":{"anyOf":[{},{"type":"null"}],"title":"Extra Data"},"is_read":{"type":"boolean","title":"Is Read"},"is_dismissed":{"type":"boolean","title":"Is Dismissed"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"read_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Read At"}},"type":"object","required":["id","type","title","is_read","is_dismissed","created_at"],"title":"InAppNotificationOut"},"IndividualSignup":{"properties":{"ticket":{"type":"string","maxLength":128,"minLength":10,"title":"Ticket"},"first_name":{"type":"string","maxLength":250,"minLength":1,"title":"First Name"},"last_name":{"type":"string","maxLength":250,"minLength":1,"title":"Last Name"},"country":{"type":"string","maxLength":2,"minLength":2,"title":"Country"},"language":{"anyOf":[{"type":"string","maxLength":8},{"type":"null"}],"title":"Language"},"certify_individual":{"type":"boolean","title":"Certify Individual","default":false},"self_certification":{"type":"boolean","title":"Self Certification","default":false},"accept_terms":{"type":"boolean","title":"Accept Terms","default":false},"marketing_opt_in":{"type":"boolean","title":"Marketing Opt In","default":false}},"type":"object","required":["ticket","first_name","last_name","country"],"title":"IndividualSignup"},"InvestmentGoalsUpdate":{"properties":{"investment_goals":{"items":{"type":"string"},"type":"array","maxItems":20,"minItems":1,"title":"Investment Goals"}},"type":"object","required":["investment_goals"],"title":"InvestmentGoalsUpdate","description":"PUT /profile/investment-goals — at least one `InvestmentGoal` key; the endpoint\nchecks the keys and drops duplicates."},"JoinWatchlist":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"user_type":{"type":"string","enum":["individual","broker","financial-advisor","portfolio-manager","analyst"],"title":"User Type"}},"type":"object","required":["email","user_type"],"title":"JoinWatchlist"},"LineRequest":{"properties":{"session_id":{"type":"string","maxLength":64,"minLength":1,"title":"Session Id"},"line_id":{"type":"string","pattern":"^\\d{1,24}$","title":"Line Id"},"parent_id":{"anyOf":[{"type":"string","pattern":"^\\d{1,24}$"},{"type":"null"}],"title":"Parent Id"},"text":{"type":"string","maxLength":4000,"minLength":1,"title":"Text"},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id"}},"type":"object","required":["session_id","line_id","text"],"title":"LineRequest","description":"A line the voice said about a question already in the chat, or, without parent_id, before\nanything was asked (its greeting): the conversation's opening, which creates the chat when it\nis new. The phone generates the id when the line is spoken (ids are time-ordered, so the line\nsorts where it was said)."},"ManualPortfolioCreate":{"properties":{"holdings":{"items":{"$ref":"#/components/schemas/ManualPortfolioHoldingSchema"},"type":"array","title":"Holdings"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","required":["holdings"],"title":"ManualPortfolioCreate"},"ManualPortfolioHoldingSchema":{"properties":{"ticker":{"type":"string","title":"Ticker"},"shares":{"type":"number","title":"Shares"},"price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price","description":"Polygon snapshot price on responses; omit on create/update requests."},"change":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Change","description":"Deprecated alias of `day_change` (kept for back-compat); populated on responses, omit on create/update requests."},"day_change":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Day Change","description":"Absolute daily change vs previous regular-session close (price − prev_close); populated on responses."},"day_change_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Day Change Pct","description":"Daily percent change vs previous close; populated on responses."},"prev_close":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Prev Close","description":"Previous regular-session close from Polygon; populated on responses."}},"type":"object","required":["ticker","shares"],"title":"ManualPortfolioHoldingSchema"},"ManualPortfolioResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"is_demo":{"type":"boolean","title":"Is Demo","default":false},"holdings":{"items":{"$ref":"#/components/schemas/ManualPortfolioHoldingSchema"},"type":"array","title":"Holdings"},"total_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Value","description":"Sum of shares×price over priced holdings."},"total_day_change":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Day Change","description":"Dollar-weighted daily change vs previous close (Σ shares×day_change)."},"total_day_change_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Day Change Pct","description":"Portfolio daily percent change vs previous total value."},"priced_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Priced Count","description":"Holdings with a Polygon quote (basis of the totals)."},"holdings_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Holdings Count","description":"Total holdings in the portfolio."},"holdings_as_of":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Holdings As Of","description":"When the share counts were entered (UTC): the latest holding write — an edit replaces every holding — else the portfolio's creation. Manual portfolios assume these share counts stay the same from then on."}},"type":"object","required":["id","holdings"],"title":"ManualPortfolioResponse"},"ManualPortfolioSummary":{"properties":{"id":{"type":"string","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"holdings":{"items":{"type":"string"},"type":"array","title":"Holdings","default":[]},"holdings_as_of":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Holdings As Of","description":"When the share counts were entered (UTC): the latest holding write — an edit replaces every holding — else the portfolio's creation. Manual portfolios assume these share counts stay the same from then on."}},"type":"object","required":["id"],"title":"ManualPortfolioSummary","description":"User-created manual portfolios for workspace dropdown (includes ticker list)."},"ManualPortfolioUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"holdings":{"anyOf":[{"items":{"$ref":"#/components/schemas/ManualPortfolioHoldingSchema"},"type":"array"},{"type":"null"}],"title":"Holdings"}},"type":"object","title":"ManualPortfolioUpdate","description":"Replace holdings and/or update name for a user manual portfolio."},"MarkAsReadRequest":{"properties":{"ids":{"items":{"type":"integer"},"type":"array","title":"Ids"}},"type":"object","required":["ids"],"title":"MarkAsReadRequest"},"MessageFeedbackRequest":{"properties":{"status":{"anyOf":[{"type":"string","enum":["upvote","downvote"]},{"type":"null"}],"title":"Status"},"message":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Message"},"feedback":{"anyOf":[{"type":"string","enum":["upvote","downvote"]},{"type":"null"}],"title":"Feedback"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"}},"type":"object","title":"MessageFeedbackRequest","description":"Like (``status: upvote``) / dislike (``downvote``) an AI answer, with the user's optional\ntext (``message``); ``status: null`` takes the vote back. Replaces the whole vote: a request\nwithout ``message`` leaves none. ``session_id`` lets the vote land on an answer whose\nbackground DB write has not happened yet.\n\n``feedback`` is the field older web builds send instead of ``status`` (same values)."},"MoveExamplePromptRequest":{"properties":{"sub_category_id":{"type":"integer","title":"Sub Category Id"},"order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Order"}},"type":"object","required":["sub_category_id"],"title":"MoveExamplePromptRequest"},"NotificationListResponse":{"properties":{"notifications":{"items":{"$ref":"#/components/schemas/InAppNotificationOut"},"type":"array","title":"Notifications"},"total":{"type":"integer","title":"Total"},"unread_count":{"type":"integer","title":"Unread Count"}},"type":"object","required":["notifications","total","unread_count"],"title":"NotificationListResponse"},"NotificationPreferenceIn":{"properties":{"notification_type":{"type":"string","title":"Notification Type"},"email_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Email Enabled"},"sms_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Sms Enabled"},"push_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Push Enabled"}},"type":"object","required":["notification_type"],"title":"NotificationPreferenceIn","description":"One type's choices. A field left out keeps its stored value (or its default on a\nnew row: email off, SMS off, push on), so the web, which sends email/SMS only, never\nresets push, and the app can send push only."},"NotificationPreferenceOut":{"properties":{"notification_type":{"type":"string","title":"Notification Type"},"email_enabled":{"type":"boolean","title":"Email Enabled"},"sms_enabled":{"type":"boolean","title":"Sms Enabled"},"push_enabled":{"type":"boolean","title":"Push Enabled","default":true}},"type":"object","required":["notification_type","email_enabled","sms_enabled"],"title":"NotificationPreferenceOut"},"NotificationPreferencesResponse":{"properties":{"preferences":{"items":{"$ref":"#/components/schemas/NotificationPreferenceOut"},"type":"array","title":"Preferences"},"push_enabled":{"type":"boolean","title":"Push Enabled","default":true}},"type":"object","required":["preferences"],"title":"NotificationPreferencesResponse"},"NotificationPreferencesUpdate":{"properties":{"preferences":{"items":{"$ref":"#/components/schemas/NotificationPreferenceIn"},"type":"array","title":"Preferences"}},"type":"object","required":["preferences"],"title":"NotificationPreferencesUpdate"},"OpenRecommendedPromptRequest":{"properties":{"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"prompt_id":{"type":"integer","title":"Prompt Id"},"prompt_ids":{"items":{"type":"integer"},"type":"array","title":"Prompt Ids"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id"}},"type":"object","required":["prompt_id","prompt_ids"],"title":"OpenRecommendedPromptRequest","description":"A card picked from a set of recommended prompts (`/chat?recommended_prompts=...`).\n\n`prompt_ids` is the whole set the card belongs to, as the page's URL names it; the\nset's chat is found (or created) by it. `session_id` is the chat the page has open, when\nit has one; it must be that set's chat. `project_id` only files a newly created chat."},"OptionDetail":{"properties":{"underlying":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Underlying"},"expiration":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expiration"},"strike":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Strike"},"option_type":{"anyOf":[{"type":"string","enum":["CALL","PUT"]},{"type":"null"}],"title":"Option Type"},"contract_multiplier":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Contract Multiplier"},"open_close":{"anyOf":[{"type":"string","enum":["OPEN","CLOSE"]},{"type":"null"}],"title":"Open Close"}},"type":"object","title":"OptionDetail"},"OrderExamplesRequest":{"properties":{"categories":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Categories"},"sub_categories":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Sub Categories"},"prompts":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Prompts"}},"type":"object","title":"OrderExamplesRequest"},"OrderRequest":{"properties":{"broker":{"type":"string","title":"Broker"},"user_id":{"type":"integer","title":"User Id"},"account_id":{"type":"string","title":"Account Id"},"symbol":{"type":"string","title":"Symbol"},"quantity":{"type":"string","title":"Quantity"},"order_type":{"type":"string","title":"Order Type"},"trade_action":{"type":"string","title":"Trade Action"},"client_order_id":{"type":"string","title":"Client Order Id"},"time_in_force":{"type":"string","title":"Time In Force","default":"DAY"},"limit_price":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Limit Price"},"stop_price":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stop Price"},"route":{"type":"string","title":"Route","default":"Intelligent"},"order_class":{"type":"string","title":"Order Class","default":"equity"},"option_symbol":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Option Symbol"},"sim":{"type":"boolean","title":"Sim","default":true},"preview":{"type":"boolean","title":"Preview","default":false},"source_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Ref"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"}},"type":"object","required":["broker","user_id","account_id","symbol","quantity","order_type","trade_action","client_order_id"],"title":"OrderRequest","description":"Superset order request across brokers. Callers speak the canonical\n(TS-style) vocabulary; each adapter consumes the fields it supports and\nrejects unsupported non-default values (e.g. `route` on Tradier,\n`order_class`/`preview` on TradeStation)."},"ParsePortfolioFileResponse":{"properties":{"holdings":{"items":{"$ref":"#/components/schemas/ParsedHoldingItem"},"type":"array","title":"Holdings"},"job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Id"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"duplicate_of":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Duplicate Of"}},"type":"object","title":"ParsePortfolioFileResponse","description":"Response for POST /workspace/parse-portfolio-file.\n\nTwo shapes over one model, distinguished by HTTP status:\n  * 200 — `holdings` populated. The deterministic spreadsheet path, unchanged:\n    no upload, no job, no LLM call.\n  * 202 — `job_id` populated. Queued for extraction; poll\n    GET /workspace/parse-portfolio-file/{job_id}."},"ParsedHoldingItem":{"properties":{"ticker":{"type":"string","title":"Ticker"},"shares":{"type":"number","title":"Shares"}},"type":"object","required":["ticker","shares"],"title":"ParsedHoldingItem","description":"A single holding row, as the original endpoint returned it."},"PhoneSendOTP":{"properties":{"phone":{"type":"string","minLength":5,"title":"Phone"},"sms_consent":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Sms Consent"}},"type":"object","required":["phone"],"title":"PhoneSendOTP"},"PhoneSetVerified":{"properties":{"phone":{"type":"string","minLength":5,"title":"Phone"},"sms_consent":{"type":"boolean","title":"Sms Consent","default":false}},"type":"object","required":["phone"],"title":"PhoneSetVerified"},"PhoneVerifyOTP":{"properties":{"otp":{"type":"string","maxLength":6,"minLength":6,"title":"Otp"},"verification_token":{"type":"string","title":"Verification Token"}},"type":"object","required":["otp","verification_token"],"title":"PhoneVerifyOTP"},"PortfolioAllocation":{"properties":{"start_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End Date"},"allocation":{"type":"integer","title":"Allocation"}},"type":"object","required":["allocation"],"title":"PortfolioAllocation"},"PortfolioAnalysisRequest":{"properties":{"source":{"type":"string","enum":["snaptrade","tradestation","tradier","webull","manual"],"title":"Source"},"account_id":{"type":"string","title":"Account Id"}},"type":"object","required":["source","account_id"],"title":"PortfolioAnalysisRequest"},"PortfolioAnalysisResponse":{"properties":{"task_id":{"type":"string","title":"Task Id"},"portfolio_id":{"type":"string","title":"Portfolio Id"},"status":{"type":"string","title":"Status"},"missing_tickers_skipped":{"type":"boolean","title":"Missing Tickers Skipped","default":false}},"type":"object","required":["task_id","portfolio_id","status"],"title":"PortfolioAnalysisResponse"},"PortfolioAnalysisResultResponse":{"properties":{"id":{"type":"string","title":"Id"},"portfolio_id":{"type":"string","title":"Portfolio Id"},"status":{"type":"string","title":"Status"},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","portfolio_id","status"],"title":"PortfolioAnalysisResultResponse"},"PortfolioCreate":{"properties":{"name":{"type":"string","minLength":1,"title":"Name"},"config":{"additionalProperties":true,"type":"object","title":"Config"},"is_template":{"type":"boolean","title":"Is Template","default":false},"show_on_home":{"type":"boolean","title":"Show On Home","default":false},"description":{"type":"string","title":"Description","default":""}},"type":"object","required":["name","config"],"title":"PortfolioCreate"},"PortfolioDuplicate":{"properties":{"name":{"type":"string","minLength":1,"title":"Name"},"is_template":{"type":"boolean","title":"Is Template","default":false}},"type":"object","required":["name"],"title":"PortfolioDuplicate"},"PortfolioLivePerformance":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"portfolio_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Portfolio Id"},"is_template":{"type":"integer","title":"Is Template","default":0},"config":{"additionalProperties":true,"type":"object","title":"Config"},"is_async":{"type":"string","title":"Is Async","default":""}},"type":"object","required":["config"],"title":"PortfolioLivePerformance"},"PortfolioNotificationCountOut":{"properties":{"portfolio_id":{"type":"string","title":"Portfolio Id"},"total_count":{"type":"integer","title":"Total Count"},"unread_count":{"type":"integer","title":"Unread Count"},"latest_at":{"type":"string","format":"date-time","title":"Latest At"}},"type":"object","required":["portfolio_id","total_count","unread_count","latest_at"],"title":"PortfolioNotificationCountOut"},"PortfolioPermission":{"properties":{"user_id":{"type":"integer","title":"User Id"},"has_read":{"type":"boolean","title":"Has Read"},"has_write":{"type":"boolean","title":"Has Write"},"has_delete":{"type":"boolean","title":"Has Delete"}},"type":"object","required":["user_id","has_read","has_write","has_delete"],"title":"PortfolioPermission"},"PortfolioPermissions":{"properties":{"permissions":{"items":{"$ref":"#/components/schemas/PortfolioPermission"},"type":"array","title":"Permissions"}},"type":"object","required":["permissions"],"title":"PortfolioPermissions"},"PortfolioSetDefaultFlag":{"properties":{"is_default":{"type":"boolean","title":"Is Default"}},"type":"object","required":["is_default"],"title":"PortfolioSetDefaultFlag"},"PortfolioUpdate":{"properties":{"name":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Name"},"config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config"},"is_template":{"type":"boolean","title":"Is Template","default":false},"show_on_home":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Show On Home"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"PortfolioUpdate"},"PortfolioVolumeItem":{"properties":{"kind":{"type":"string","enum":["manual","snaptrade","tradestation","tradier","webull"],"title":"Kind"},"id":{"type":"string","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Number","description":"Broker account number (e.g. SnapTrade `number` 'PA3ZP1PEJRU7'). Null for manual portfolios and for brokers whose account id already is the number (TradeStation/Tradier)."},"volume":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume","description":"Positions market value (Σ Polygon price × shares), uniform across sources. Null when the value could not be resolved (broker down / no priced holdings)."},"day_change":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Day Change","description":"Today's change in dollars (Σ shares×day_change over quoted holdings). Null when no holding has a quote."},"day_change_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Day Change Pct","description":"Today's change in percent of the quoted holdings' previous value, computed like the Home card's. Null when unknown."},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Set when this portfolio's value could not be resolved; volume is null."}},"type":"object","required":["kind","id"],"title":"PortfolioVolumeItem","description":"One selectable portfolio (manual or connected broker account) with its current\nmarket value (\"volume\"). Demo portfolios are excluded.\n\n`id` is the frontend selection key: the raw manual-portfolio UUID for manual\nportfolios, or the broker account_id for broker accounts (the client prefixes\nmanual ids with `manual:` on its side, mirroring toManualPortfolioSelectionKey)."},"PortfoliosOverviewResponse":{"properties":{"portfolios":{"items":{"$ref":"#/components/schemas/PortfolioVolumeItem"},"type":"array","title":"Portfolios"}},"type":"object","title":"PortfoliosOverviewResponse","description":"One-shot overview of every selectable portfolio + its volume, fetched early on\napp entry. Feeds the portfolio dropdown's volume badges and (future) active-portfolio\nauto-selection. One source failing never fails the whole response — it is reported\nper item via `error` with `volume: null`."},"PositionItem":{"properties":{"row_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Row Id"},"checks_passed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Checks Passed"},"agreement":{"anyOf":[{"type":"string","enum":["both_agree","conflict","text_only","vision_only"]},{"type":"null"}],"title":"Agreement"},"confidence":{"anyOf":[{"type":"string","enum":["high","medium","low"]},{"type":"null"}],"title":"Confidence"},"row_warnings":{"items":{"type":"string"},"type":"array","title":"Row Warnings"},"account_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Account Index"},"symbol":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Symbol"},"cusip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cusip"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"security_type":{"anyOf":[{"type":"string","enum":["EQUITY","ETF","OPTION","MUTUAL_FUND","BOND","PREFERRED","WARRANT","CRYPTO","CASH","OTHER","UNKNOWN"]},{"type":"null"}],"title":"Security Type"},"quantity":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Quantity"},"price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price"},"market_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Market Value"},"cost_basis_total":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost Basis Total"},"cost_basis_per_share":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost Basis Per Share"},"unrealized_pl":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Unrealized Pl"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"as_of_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"As Of Date"},"source_page":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Source Page"},"option_detail":{"anyOf":[{"$ref":"#/components/schemas/OptionDetail"},{"type":"null"}]},"weight_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Weight Pct"},"candidates":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Candidates"}},"type":"object","title":"PositionItem"},"ProfessionalDetails":{"properties":{"first_name":{"type":"string","maxLength":250,"minLength":1,"title":"First Name"},"last_name":{"type":"string","maxLength":250,"minLength":1,"title":"Last Name"},"company_name":{"type":"string","maxLength":250,"minLength":1,"title":"Company Name"},"company_type":{"type":"string","maxLength":100,"minLength":1,"title":"Company Type"},"referral_source":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Referral Source"},"country":{"type":"string","maxLength":2,"minLength":2,"title":"Country"},"language":{"anyOf":[{"type":"string","maxLength":8},{"type":"null"}],"title":"Language"},"self_certification":{"type":"boolean","title":"Self Certification","default":false},"accept_terms":{"type":"boolean","title":"Accept Terms","default":false}},"type":"object","required":["first_name","last_name","company_name","company_type","country"],"title":"ProfessionalDetails"},"ProfessionalSignup":{"properties":{"first_name":{"type":"string","maxLength":250,"minLength":1,"title":"First Name"},"last_name":{"type":"string","maxLength":250,"minLength":1,"title":"Last Name"},"company_name":{"type":"string","maxLength":250,"minLength":1,"title":"Company Name"},"company_type":{"type":"string","maxLength":100,"minLength":1,"title":"Company Type"},"referral_source":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Referral Source"},"country":{"type":"string","maxLength":2,"minLength":2,"title":"Country"},"language":{"anyOf":[{"type":"string","maxLength":8},{"type":"null"}],"title":"Language"},"self_certification":{"type":"boolean","title":"Self Certification","default":false},"accept_terms":{"type":"boolean","title":"Accept Terms","default":false},"ticket":{"type":"string","maxLength":128,"minLength":10,"title":"Ticket"}},"type":"object","required":["first_name","last_name","company_name","company_type","country","ticket"],"title":"ProfessionalSignup"},"PushDeviceRegister":{"properties":{"token":{"type":"string","maxLength":512,"minLength":1,"title":"Token"},"platform":{"type":"string","enum":["ios","android","macos"],"title":"Platform"},"env":{"anyOf":[{"type":"string","maxLength":16},{"type":"null"}],"title":"Env"},"app_build":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"App Build"},"locale":{"anyOf":[{"type":"string","maxLength":35},{"type":"null"}],"title":"Locale"}},"type":"object","required":["token","platform"],"title":"PushDeviceRegister"},"PushDeviceUnregister":{"properties":{"token":{"type":"string","maxLength":512,"minLength":1,"title":"Token"}},"type":"object","required":["token"],"title":"PushDeviceUnregister"},"RefreshToken":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","minLength":8,"title":"Password"},"turnstile_token":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}],"title":"Turnstile Token"}},"type":"object","required":["email","password"],"title":"RefreshToken"},"ReorderScreenerRequest":{"properties":{"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"screeners":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Screeners"}},"type":"object","required":["screeners"],"title":"ReorderScreenerRequest"},"ReorderStrategyRequest":{"properties":{"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"strategies":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Strategies"}},"type":"object","required":["strategies"],"title":"ReorderStrategyRequest"},"ReportedQuestionRequest":{"properties":{"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"message_id":{"type":"string","title":"Message Id"},"description":{"type":"string","title":"Description","default":""},"is_error":{"type":"boolean","title":"Is Error","default":false}},"type":"object","required":["message_id"],"title":"ReportedQuestionRequest"},"RerunMessageRequest":{"properties":{"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"session_id":{"type":"string","title":"Session Id"}},"type":"object","required":["session_id"],"title":"RerunMessageRequest"},"RoboAdvisorOptimizedRequest":{"properties":{"investment_goal":{"type":"string","enum":["Income Focused","Income & Stability","Balanced","Growth & Income","Growth Focused"],"title":"Investment Goal","default":"Income Focused"},"risk_level":{"type":"string","enum":["Conservative","Moderate","Assertive","Aggressive"],"title":"Risk Level","default":"Moderate"},"activity_level":{"type":"string","enum":["Low","Medium","High"],"title":"Activity Level","default":"Medium"},"esg":{"type":"integer","maximum":1.0,"minimum":0.0,"title":"Esg","default":0},"small_cap":{"type":"integer","maximum":1.0,"minimum":0.0,"title":"Small Cap","default":0},"mid_cap":{"type":"integer","maximum":1.0,"minimum":0.0,"title":"Mid Cap","default":0},"large_cap":{"type":"integer","maximum":1.0,"minimum":0.0,"title":"Large Cap","default":1},"international":{"type":"integer","maximum":1.0,"minimum":0.0,"title":"International","default":0},"domestic":{"type":"integer","maximum":1.0,"minimum":0.0,"title":"Domestic","default":1},"aum":{"type":"number","exclusiveMinimum":0.0,"title":"Aum","description":"Assets under management in USD","default":10000000},"min_weight":{"type":"integer","maximum":100.0,"minimum":0.0,"title":"Min Weight","description":"Min allocation (%) per holding","default":0},"max_weight":{"type":"integer","maximum":100.0,"minimum":0.0,"title":"Max Weight","description":"Max allocation (%) per holding","default":100}},"type":"object","title":"RoboAdvisorOptimizedRequest"},"RoboAdvisorRequest":{"properties":{"goal":{"type":"integer","maximum":5.0,"minimum":1.0,"title":"Goal","description":"1 = highest income, 5 = highest growth"},"risk":{"type":"integer","maximum":5.0,"minimum":1.0,"title":"Risk","description":"1 = lowest risk, 5 = highest risk"},"esg":{"type":"integer","maximum":1.0,"minimum":0.0,"title":"Esg","default":0},"small_cap":{"type":"integer","maximum":1.0,"minimum":0.0,"title":"Small Cap","default":0},"mid_cap":{"type":"integer","maximum":1.0,"minimum":0.0,"title":"Mid Cap","default":0},"large_cap":{"type":"integer","maximum":1.0,"minimum":0.0,"title":"Large Cap","default":0},"international":{"type":"integer","maximum":1.0,"minimum":0.0,"title":"International","default":0},"domestic":{"type":"integer","maximum":1.0,"minimum":0.0,"title":"Domestic","default":0},"aum":{"type":"number","exclusiveMinimum":0.0,"title":"Aum","description":"Assets under management in USD"}},"type":"object","required":["goal","risk","aum"],"title":"RoboAdvisorRequest"},"RoboAdvisorResponse":{"properties":{"task_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Id"},"status":{"type":"string","title":"Status"},"result":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Result"},"config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config"},"completed_at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Completed At"},"started_at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Started At"}},"type":"object","required":["status"],"title":"RoboAdvisorResponse"},"S3DownloadRequest":{"properties":{"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"key":{"type":"string","title":"Key"}},"type":"object","required":["key"],"title":"S3DownloadRequest"},"SavedDataCreate":{"properties":{"type":{"type":"string","enum":["OdinChat","CommonApi","ForecastEquities","Macro","Sectors","Industries"],"title":"Type"},"command":{"type":"string","title":"Command"},"folder_id":{"type":"integer","title":"Folder Id"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"}},"type":"object","required":["type","command","folder_id"],"title":"SavedDataCreate"},"SavedDataUpdate":{"properties":{"command":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Command"},"action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action"},"folder_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Folder Id"}},"type":"object","title":"SavedDataUpdate"},"StrategyConfigDefault":{"properties":{"trading_instrument":{"type":"string","title":"Trading Instrument"},"entry_condition":{"items":{"type":"string"},"type":"array","title":"Entry Condition"},"exit_condition":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Exit Condition"},"start_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End Date"},"type":{"type":"string","title":"Type"},"benchmark":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Benchmark"}},"additionalProperties":true,"type":"object","required":["trading_instrument","entry_condition","type"],"title":"StrategyConfigDefault"},"StrategyCreate":{"properties":{"name":{"type":"string","minLength":1,"title":"Name"},"config":{"$ref":"#/components/schemas/StrategyConfigDefault"},"meta":{"anyOf":[{},{"type":"null"}],"title":"Meta"},"show_on_home":{"type":"boolean","title":"Show On Home","default":false},"description":{"type":"string","title":"Description","default":""}},"type":"object","required":["name","config"],"title":"StrategyCreate"},"StrategyDuplicate":{"properties":{"name":{"type":"string","minLength":1,"title":"Name"}},"type":"object","required":["name"],"title":"StrategyDuplicate"},"StrategyLivePerformance":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"strategy_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Strategy Id"},"is_template":{"type":"integer","title":"Is Template","default":0},"config":{"additionalProperties":true,"type":"object","title":"Config"},"is_async":{"type":"string","title":"Is Async","default":""}},"type":"object","required":["config"],"title":"StrategyLivePerformance"},"StrategyPermission":{"properties":{"user_id":{"type":"integer","title":"User Id"},"has_read":{"type":"boolean","title":"Has Read"},"has_write":{"type":"boolean","title":"Has Write"},"has_delete":{"type":"boolean","title":"Has Delete"}},"type":"object","required":["user_id","has_read","has_write","has_delete"],"title":"StrategyPermission"},"StrategyPermissions":{"properties":{"permissions":{"items":{"$ref":"#/components/schemas/StrategyPermission"},"type":"array","title":"Permissions"}},"type":"object","required":["permissions"],"title":"StrategyPermissions"},"StrategyUpdate":{"properties":{"name":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Name"},"config":{"anyOf":[{"$ref":"#/components/schemas/StrategyConfigDefault"},{"type":"null"}]},"meta":{"anyOf":[{},{"type":"null"}],"title":"Meta"},"show_on_home":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Show On Home"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"StrategyUpdate"},"TestNotificationRequest":{"properties":{"user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Id"},"type":{"type":"string","title":"Type","default":"system"},"subject":{"type":"string","maxLength":255,"minLength":1,"title":"Subject"},"body":{"type":"string","maxLength":2000,"title":"Body","default":""},"reference_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reference Key"},"sms_text":{"anyOf":[{"type":"string","maxLength":320},{"type":"null"}],"title":"Sms Text"},"channels":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Channels"}},"type":"object","required":["subject"],"title":"TestNotificationRequest"},"TickerCompanyNamesRequest":{"properties":{"tickers":{"items":{"type":"string"},"type":"array","maxItems":200,"minItems":1,"title":"Tickers"}},"type":"object","required":["tickers"],"title":"TickerCompanyNamesRequest"},"TickerPricesRequest":{"properties":{"tickers":{"items":{"type":"string"},"type":"array","title":"Tickers"}},"type":"object","required":["tickers"],"title":"TickerPricesRequest","description":"Request body for POST /ticker-prices."},"TickerPricesResponse":{"properties":{"prices":{"additionalProperties":{"type":"number"},"type":"object","title":"Prices"}},"type":"object","required":["prices"],"title":"TickerPricesResponse","description":"Latest US equities prices from Polygon snapshot (tickers with no data omitted)."},"TickerQuote":{"properties":{"price":{"type":"number","title":"Price"},"change":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Change"},"change_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Change Pct"},"prev_close":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Prev Close"}},"type":"object","required":["price"],"title":"TickerQuote"},"TickerQuotesResponse":{"properties":{"quotes":{"additionalProperties":{"$ref":"#/components/schemas/TickerQuote"},"type":"object","title":"Quotes"}},"type":"object","required":["quotes"],"title":"TickerQuotesResponse","description":"Latest price + change vs previous close per ticker (tickers with no data omitted)."},"TickerSuggestion":{"properties":{"ticker":{"type":"string","title":"Ticker"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","required":["ticker"],"title":"TickerSuggestion"},"TickerSuggestionsResponse":{"properties":{"suggestions":{"additionalProperties":{"items":{"$ref":"#/components/schemas/TickerSuggestion"},"type":"array"},"type":"object","title":"Suggestions"}},"type":"object","required":["suggestions"],"title":"TickerSuggestionsResponse","description":"Covered tickers each requested ticker most likely meant (tickers with none omitted)."},"TitleRequest":{"properties":{"session_id":{"type":"string","maxLength":64,"minLength":1,"title":"Session Id"},"question":{"type":"string","maxLength":4000,"minLength":1,"title":"Question"}},"type":"object","required":["session_id","question"],"title":"TitleRequest"},"TokenRequest":{"properties":{"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"}},"type":"object","title":"TokenRequest"},"TradierInjectTokenRequest":{"properties":{"user_id":{"type":"integer","title":"User Id"},"access_token":{"type":"string","title":"Access Token"},"refresh_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refresh Token"},"personal_token":{"type":"boolean","title":"Personal Token","default":false}},"type":"object","required":["user_id","access_token"],"title":"TradierInjectTokenRequest"},"TransactionFees":{"properties":{"commission":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Commission"},"cat_fee":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cat Fee"},"clearing_fee":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Clearing Fee"},"sec_fee":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sec Fee"},"taf_fee":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Taf Fee"},"other":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Other"},"total":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total"}},"type":"object","title":"TransactionFees"},"TransactionItem":{"properties":{"row_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Row Id"},"checks_passed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Checks Passed"},"agreement":{"anyOf":[{"type":"string","enum":["both_agree","conflict","text_only","vision_only"]},{"type":"null"}],"title":"Agreement"},"confidence":{"anyOf":[{"type":"string","enum":["high","medium","low"]},{"type":"null"}],"title":"Confidence"},"row_warnings":{"items":{"type":"string"},"type":"array","title":"Row Warnings"},"account_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Account Index"},"trade_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trade Number"},"trade_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trade Date"},"settlement_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Settlement Date"},"execution_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Execution Time"},"side":{"anyOf":[{"type":"string","enum":["BUY","SELL","SELL_SHORT","BUY_TO_COVER","UNKNOWN"]},{"type":"null"}],"title":"Side"},"symbol":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Symbol"},"cusip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cusip"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"security_class":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Security Class"},"security_type":{"anyOf":[{"type":"string","enum":["EQUITY","ETF","OPTION","MUTUAL_FUND","BOND","PREFERRED","WARRANT","CRYPTO","CASH","OTHER","UNKNOWN"]},{"type":"null"}],"title":"Security Type"},"quantity":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Quantity"},"price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price"},"principal":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Principal"},"fees":{"anyOf":[{"$ref":"#/components/schemas/TransactionFees"},{"type":"null"}]},"net_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Net Amount"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"settlement_type_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Settlement Type Code"},"capacity_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Capacity Code"},"source_page":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Source Page"},"option_detail":{"anyOf":[{"$ref":"#/components/schemas/OptionDetail"},{"type":"null"}]},"candidates":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Candidates"}},"type":"object","title":"TransactionItem"},"TurnRequest":{"properties":{"session_id":{"type":"string","maxLength":64,"minLength":1,"title":"Session Id"},"question_id":{"type":"string","pattern":"^\\d{1,24}$","title":"Question Id"},"answer_id":{"type":"string","pattern":"^\\d{1,24}$","title":"Answer Id"},"question":{"type":"string","maxLength":4000,"minLength":1,"title":"Question"},"answer":{"type":"string","maxLength":8000,"minLength":1,"title":"Answer"},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id"}},"type":"object","required":["session_id","question_id","answer_id","question","answer"],"title":"TurnRequest","description":"One exchange the voice answered itself: what the user said and what the voice replied.\nThe phone generates both message ids (as for a typed question), so its own copies match."},"UnreadCountResponse":{"properties":{"unread_count":{"type":"integer","title":"Unread Count"}},"type":"object","required":["unread_count"],"title":"UnreadCountResponse"},"UnsubscribeRequest":{"properties":{"email":{"type":"string","maxLength":150,"format":"email","title":"Email"}},"type":"object","required":["email"],"title":"UnsubscribeRequest","description":"The /unsubscribe page, opened from the link at the bottom of our emails."},"UpdateExampleCategoryRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Order"}},"type":"object","title":"UpdateExampleCategoryRequest"},"UpdateExamplePromptRequest":{"properties":{"question":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Question"},"answer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Answer"},"display_name":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Display Name"},"order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Order"},"sub_category_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sub Category Id"},"hidden":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Hidden"}},"type":"object","title":"UpdateExamplePromptRequest"},"UpdateExampleRequest":{"properties":{"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"question":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Question"},"answer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Answer"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Order"}},"type":"object","title":"UpdateExampleRequest"},"UpdateExampleSubCategoryRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Order"},"category_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Category Id"}},"type":"object","title":"UpdateExampleSubCategoryRequest"},"UpdateProjectRequest":{"properties":{"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["name"],"title":"UpdateProjectRequest"},"UpdateReportedQuestionRequest":{"properties":{"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"seen":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Seen"}},"type":"object","title":"UpdateReportedQuestionRequest"},"UpdateScreenerRequest":{"properties":{"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active"},"data":{"anyOf":[{},{"type":"null"}],"title":"Data"},"config":{"anyOf":[{},{"type":"null"}],"title":"Config"},"meta":{"anyOf":[{},{"type":"null"}],"title":"Meta"},"order":{"type":"integer","title":"Order","default":0}},"type":"object","title":"UpdateScreenerRequest"},"UpdateSessionRequest":{"properties":{"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id"}},"type":"object","title":"UpdateSessionRequest"},"UpdateStrategyRequest":{"properties":{"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active"},"config":{"anyOf":[{},{"type":"null"}],"title":"Config"},"meta":{"anyOf":[{},{"type":"null"}],"title":"Meta"},"performance":{"anyOf":[{},{"type":"null"}],"title":"Performance"},"order":{"type":"integer","title":"Order","default":0}},"type":"object","title":"UpdateStrategyRequest"},"UserInvite":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"role":{"type":"string","title":"Role"},"company_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Id"},"is_personal":{"type":"boolean","title":"Is Personal","default":false},"free_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Free Days"}},"type":"object","required":["email","role"],"title":"UserInvite"},"UserModifyAccess":{"properties":{"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"}},"type":"object","title":"UserModifyAccess"},"UserRegisterTrial":{"properties":{"turnstile_token":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}],"title":"Turnstile Token"},"email":{"type":"string","maxLength":120,"format":"email","title":"Email"},"password":{"type":"string","minLength":8,"title":"Password"},"first_name":{"type":"string","maxLength":250,"minLength":1,"title":"First Name"},"last_name":{"type":"string","maxLength":250,"minLength":1,"title":"Last Name"},"promo":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Promo"},"company_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Company Name"},"company_type":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Company Type"},"referral_source":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Referral Source"},"mcp_rid":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Mcp Rid"},"country":{"anyOf":[{"type":"string","maxLength":2,"minLength":2},{"type":"null"}],"title":"Country"},"language":{"anyOf":[{"type":"string","maxLength":8},{"type":"null"}],"title":"Language"}},"type":"object","required":["email","password","first_name","last_name"],"title":"UserRegisterTrial"},"UserRegisterViaInvite":{"properties":{"token":{"type":"string","title":"Token"},"password":{"type":"string","minLength":8,"title":"Password"},"first_name":{"type":"string","minLength":1,"title":"First Name"},"last_name":{"type":"string","minLength":1,"title":"Last Name"},"country":{"anyOf":[{"type":"string","maxLength":2,"minLength":2},{"type":"null"}],"title":"Country"},"language":{"anyOf":[{"type":"string","maxLength":8},{"type":"null"}],"title":"Language"}},"type":"object","required":["token","password","first_name","last_name"],"title":"UserRegisterViaInvite"},"UserResetPassword":{"properties":{"token":{"type":"string","title":"Token"},"password":{"type":"string","minLength":1,"title":"Password"}},"type":"object","required":["token","password"],"title":"UserResetPassword"},"UserResetPasswordRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"turnstile_token":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}],"title":"Turnstile Token"}},"type":"object","required":["email"],"title":"UserResetPasswordRequest"},"UserUpdate":{"properties":{"password":{"anyOf":[{"type":"string","minLength":8},{"type":"null"}],"title":"Password"},"current_password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Password"},"first_name":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Last Name"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"sms_consent":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Sms Consent"},"country":{"anyOf":[{"type":"string","maxLength":2,"minLength":2},{"type":"null"}],"title":"Country"},"language":{"anyOf":[{"type":"string","maxLength":8},{"type":"null"}],"title":"Language"}},"type":"object","title":"UserUpdate"},"UserUpdateEmailConfirm":{"properties":{"verification_token":{"type":"string","title":"Verification Token"},"otp":{"type":"string","maxLength":6,"minLength":6,"title":"Otp"}},"type":"object","required":["verification_token","otp"],"title":"UserUpdateEmailConfirm"},"UserUpdateEmailRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"UserUpdateEmailRequest"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"Valuations":{"properties":{"index":{"type":"string","enum":["S&P 500","Nasdaq 100","Dow 30","Information Technology Sector","Energy Sector","Real Estate Sector","Consumer Staples Sector","Financials Sector","Communication Services Sector","Health Care Sector","Industrials Sector","Consumer Discretionary Sector","Materials","Utilities Sector"],"title":"Index"},"metric":{"type":"string","enum":["Price-to-Sales","Price-to-Earnings","Price-to-Ebitda"],"title":"Metric"},"start_date":{"type":"string","title":"Start Date","default":"2015-01-01"},"end_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End Date"}},"type":"object","required":["index","metric"],"title":"Valuations"},"WarRoomConfig":{"properties":{"change_rate":{"type":"number","title":"Change Rate"},"horizon":{"type":"integer","title":"Horizon"},"portfolio_leverage":{"type":"number","title":"Portfolio Leverage"},"portfolio_beta":{"type":"number","title":"Portfolio Beta"},"min_interval":{"type":"number","title":"Min Interval"},"max_interval":{"type":"number","title":"Max Interval"},"econ_metric":{"type":"string","enum":["Fed Rate","CPI","Yield Curve","Real GDP QoQ","Nominal GDP QoQ","2Yr Treasury","10Yr Treasury"],"title":"Econ Metric","default":"Fed Rate"},"assets":{"items":{"type":"string"},"type":"array","title":"Assets"},"scenario_type":{"type":"string","enum":["multi_asset","equity_sectors","fixed_income","commodities","custom"],"title":"Scenario Type","default":"multi_asset"},"include_current_state":{"type":"boolean","title":"Include Current State","default":false},"portfolio_returns":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Portfolio Returns"}},"type":"object","required":["change_rate","horizon","portfolio_leverage","portfolio_beta","min_interval","max_interval","assets"],"title":"WarRoomConfig"},"WatchlistItemCreate":{"properties":{"ticker":{"type":"string","maxLength":50,"minLength":1,"title":"Ticker"},"market":{"type":"string","enum":["stocks","etfs","crypto","forex","otc","instrument"],"title":"Market"},"name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Name"}},"type":"object","required":["ticker","market"],"title":"WatchlistItemCreate"},"WatchlistReorder":{"properties":{"items":{"items":{"$ref":"#/components/schemas/WatchlistReorderItem"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"WatchlistReorder"},"WatchlistReorderItem":{"properties":{"id":{"type":"integer","title":"Id"},"order":{"type":"integer","title":"Order"}},"type":"object","required":["id","order"],"title":"WatchlistReorderItem"},"WeightSchemeList":{"properties":{"tickers":{"type":"string","title":"Tickers"}},"type":"object","required":["tickers"],"title":"WeightSchemeList"},"WorkspacePortfolioAnalysisIdsResponse":{"properties":{"demo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Demo"},"manual":{"items":{"type":"string"},"type":"array","title":"Manual"},"brokers":{"items":{"type":"string"},"type":"array","title":"Brokers"}},"type":"object","title":"WorkspacePortfolioAnalysisIdsResponse","description":"Workspace analysis row keys (portfolio_id on PortfolioAnalysisResult) grouped by UI slot.\nMatches frontend localStorage fai_portfolio_analysis_map slot keys:\n- demo: reserved demo manual row id\n- manual: user manual portfolio ids (non-demo)\n- brokers: SnapTrade / TradeStation account ids"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}