{"openapi":"3.1.0","info":{"title":"Savoy AI API","version":"0.1.0"},"paths":{"/v1/signup":{"post":{"summary":"Customer Signup","operationId":"customer_signup_v1_signup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerSignupIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerSignupOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/login":{"post":{"summary":"Customer Login","operationId":"customer_login_v1_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerLoginIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerLoginOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/logout":{"post":{"summary":"Customer Logout","operationId":"customer_logout_v1_logout_post","parameters":[{"name":"customer_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/support":{"post":{"summary":"Support Request","operationId":"support_request_v1_support_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupportRequestIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/forgot-password":{"post":{"summary":"Forgot Password","operationId":"forgot_password_v1_forgot_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgotPasswordIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/reset-password":{"post":{"summary":"Reset Password","operationId":"reset_password_v1_reset_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/account/me":{"get":{"summary":"Get My Account","operationId":"get_my_account_v1_account_me_get","parameters":[{"name":"customer_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerAccountOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/account/sites":{"get":{"summary":"List My Sites","operationId":"list_my_sites_v1_account_sites_get","parameters":[{"name":"customer_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomerSiteOut"},"title":"Response List My Sites V1 Account Sites Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/account/sites/{site_id}/ingest":{"post":{"summary":"Customer Trigger Ingest","operationId":"customer_trigger_ingest_v1_account_sites__site_id__ingest_post","parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string","title":"Site Id"}},{"name":"customer_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/account/sites/{site_id}/ingest-status":{"get":{"summary":"Customer Ingest Status","operationId":"customer_ingest_status_v1_account_sites__site_id__ingest_status_get","parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string","title":"Site Id"}},{"name":"customer_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/widget-config":{"get":{"summary":"Widget Config","operationId":"widget_config_v1_widget_config_get","parameters":[{"name":"site_id","in":"query","required":true,"schema":{"type":"string","title":"Site Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WidgetConfigOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/chat-history":{"get":{"summary":"Chat History","description":"Return recent conversation messages for a session (last 24h).","operationId":"chat_history_v1_chat_history_get","parameters":[{"name":"site_id","in":"query","required":true,"schema":{"type":"string","title":"Site Id"}},{"name":"session_id","in":"query","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"}}}}}}},"/v1/chat":{"post":{"summary":"Chat","operationId":"chat_v1_chat_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/leads":{"post":{"summary":"Create Lead","operationId":"create_lead_v1_leads_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/docs/process-status":{"get":{"summary":"Doc Process Status","description":"Poll endpoint for on-demand PDF processing status.","operationId":"doc_process_status_v1_docs_process_status_get","parameters":[{"name":"site_id","in":"query","required":true,"schema":{"type":"string","title":"Site Id"}},{"name":"job_id","in":"query","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"}}}}}}},"/v1/docs/{site_id}/by-url":{"get":{"summary":"Doc Viewer By Url","description":"Look up a document by its original PDF URL. If not found, trigger on-demand processing.","operationId":"doc_viewer_by_url_v1_docs__site_id__by_url_get","parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string","title":"Site Id"}},{"name":"url","in":"query","required":true,"schema":{"type":"string","title":"Url"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/docs/{site_id}/{doc_id}":{"get":{"summary":"Doc Viewer","operationId":"doc_viewer_v1_docs__site_id___doc_id__get","parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string","title":"Site Id"}},{"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"}}}}}}},"/v1/report-pdfs":{"post":{"summary":"Report Pdfs","description":"Widget reports PDF URLs found on the page. Queues them for background processing.\nSupports authentication via site_id in payload OR X-Api-Key header (for plugin users).","operationId":"report_pdfs_v1_report_pdfs_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/doc-chat":{"post":{"summary":"Doc Chat","operationId":"doc_chat_v1_doc_chat_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocChatIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/plugin/verify":{"get":{"summary":"Plugin Verify","description":"Verify an API key and return account status.","operationId":"plugin_verify_v1_plugin_verify_get","parameters":[{"name":"site_url","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site Url"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/plugin/settings":{"post":{"summary":"Plugin Update Settings","description":"Accept plugin settings pushes from the WordPress plugin.\n\nHistorically this also wrote `ai_chat_enabled` on site_settings; chat\ngating now lives on `chatbot_enabled` (set by the plan) and is not\nuser-configurable from the plugin, so that field is accepted but ignored.\n\n`pdf_allowed_domains` IS persisted — the plugin pushes its admin-configured\nPDF domain allowlist here on every settings save, mirroring it into\nsite_settings so the server-side conversion gate in /report-pdfs (see\n_effective_pdf_domains) enforces the same list the WordPress admin set.","operationId":"plugin_update_settings_v1_plugin_settings_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/plugin/register-webhook":{"post":{"summary":"Plugin Register Webhook","description":"A WordPress install (or, on Multisite, one subsite) registers its own\nhome_url to be pushed a notification when one of its documents finishes\nconverting, instead of only finding out on its next 30-minute poll.\n\nIdempotent by design (upsert on the (site_id, home_url) unique\nconstraint) -- safe for the plugin to call this on every scheduled\nscan without needing its own \"have I already registered\" bookkeeping,\nthough it still keeps one client-side to avoid the redundant call.","operationId":"plugin_register_webhook_v1_plugin_register_webhook_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/plugin/doc-status":{"get":{"summary":"Plugin Doc Status","description":"Check the processing status of a document by its PDF URL.","operationId":"plugin_doc_status_v1_plugin_doc_status_get","parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","title":"Url"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/plugin/doc-status-bulk":{"post":{"summary":"Plugin Doc Status Bulk","description":"Check the processing status of multiple documents in one request.\n\nUsed by the WordPress plugin's status-refresh poll so a site with many\ndocuments doesn't need one HTTP round trip per document per poll tick.","operationId":"plugin_doc_status_bulk_v1_plugin_doc_status_bulk_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/plugin/doc":{"delete":{"summary":"Plugin Delete Doc","description":"Delete a document so it can be reprocessed.\n\nScoped to the plugin's canonical site only so reprocessing one site's doc\ndoesn't delete a matching filename on another site of the same account.","operationId":"plugin_delete_doc_v1_plugin_doc_delete","parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","title":"Url"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/plugin/doc-html":{"get":{"summary":"Plugin Doc Html","description":"Fetch the accessible HTML for a document. Used by the WordPress plugin to create local posts.","operationId":"plugin_doc_html_v1_plugin_doc_html_get","parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","title":"Url"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/plugin/view":{"get":{"summary":"Plugin View","description":"Browser-facing endpoint: render accessible view of a PDF for a plugin user.\n\nAccepts site_id (preferred, safe to put in URLs) or key (legacy, still\nsupported for backward compatibility and on-demand processing).","operationId":"plugin_view_v1_plugin_view_get","parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","title":"Url"}},{"name":"site_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site Id"}},{"name":"key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"}},{"name":"wp_url","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wp Url"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/checkout":{"post":{"summary":"Create Checkout Session","operationId":"create_checkout_session_v1_billing_checkout_post","parameters":[{"name":"site_user_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site User Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/buy-credits":{"post":{"summary":"Buy Credits","operationId":"buy_credits_v1_billing_buy_credits_post","parameters":[{"name":"site_user_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site User Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/buy-doc-credits":{"post":{"summary":"Buy Doc Credits","description":"One-time purchase of 50 extra document conversions for $39.","operationId":"buy_doc_credits_v1_billing_buy_doc_credits_post","parameters":[{"name":"site_user_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site User Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/portal":{"post":{"summary":"Create Portal Session","operationId":"create_portal_session_v1_billing_portal_post","parameters":[{"name":"site_user_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site User Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/webhook":{"post":{"summary":"Stripe Webhook","operationId":"stripe_webhook_v1_billing_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/analytics/summary":{"get":{"summary":"Summary","operationId":"summary_v1_analytics_summary_get","parameters":[{"name":"site_id","in":"query","required":true,"schema":{"type":"string","title":"Site Id"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}},{"name":"site_user_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site User Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsSummaryOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/analytics/top-questions":{"get":{"summary":"Top Questions","operationId":"top_questions_v1_analytics_top_questions_get","parameters":[{"name":"site_id","in":"query","required":true,"schema":{"type":"string","title":"Site Id"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}},{"name":"site_user_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site User Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/analytics/unanswered":{"get":{"summary":"Unanswered","operationId":"unanswered_v1_analytics_unanswered_get","parameters":[{"name":"site_id","in":"query","required":true,"schema":{"type":"string","title":"Site Id"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}},{"name":"site_user_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site User Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/login":{"post":{"summary":"Admin Login","operationId":"admin_login_admin_login_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"Admin Login Page","operationId":"admin_login_page_admin_login_get","parameters":[{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/logout":{"post":{"summary":"Admin Logout","operationId":"admin_logout_admin_logout_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin/sites":{"post":{"summary":"Create Site","operationId":"create_site_admin_sites_post","parameters":[{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"List Sites","operationId":"list_sites_admin_sites_get","parameters":[{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SiteOut"},"title":"Response List Sites Admin Sites Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/sites/{site_id}/shadow":{"post":{"summary":"Shadow Customer","description":"Create a short-lived shadow token the admin JS can use to open the portal\nas this customer in a new tab — without touching any existing session cookies.","operationId":"shadow_customer_admin_sites__site_id__shadow_post","parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string","title":"Site Id"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/sites/{site_id}":{"get":{"summary":"Get Site","operationId":"get_site_admin_sites__site_id__get","parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string","title":"Site Id"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Site","operationId":"delete_site_admin_sites__site_id__delete","parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string","title":"Site Id"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteDeleteOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/sites/{site_id}/settings":{"put":{"summary":"Update Site Settings","operationId":"update_site_settings_admin_sites__site_id__settings_put","parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string","title":"Site Id"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteSettingsUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/sites/{site_id}/conversations":{"get":{"summary":"Get Conversations","operationId":"get_conversations_admin_sites__site_id__conversations_get","parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string","title":"Site Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Per Page"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/sites/{site_id}/leads":{"get":{"summary":"Get Leads","operationId":"get_leads_admin_sites__site_id__leads_get","parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string","title":"Site Id"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/sites-with-stats":{"get":{"summary":"List Sites With Stats","operationId":"list_sites_with_stats_admin_sites_with_stats_get","parameters":[{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/stats":{"get":{"summary":"Admin Stats","description":"Return business KPIs + breakdowns for the super-admin Stats Dashboard.","operationId":"admin_stats_admin_stats_get","parameters":[{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/recent-activity":{"get":{"summary":"Admin Recent Activity","description":"Snapshot of platform activity over the last N hours for the admin dashboard.","operationId":"admin_recent_activity_admin_recent_activity_get","parameters":[{"name":"hours","in":"query","required":false,"schema":{"type":"integer","default":24,"title":"Hours"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/signup-clusters":{"get":{"summary":"Admin Signup Clusters","description":"Group recent signups by IP and by 60-second timestamp windows so suspicious\nbursts of accounts surface together. Returns clusters of size >= 2 only.","operationId":"admin_signup_clusters_admin_signup_clusters_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":14,"title":"Days"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/recent-activity/email-now":{"post":{"summary":"Admin Email Activity Now","description":"Manually trigger the daily activity report email (for testing the format).\nAlways bypasses the once-per-day guard — this is an explicit manual action,\nso it should send even if the automatic daily report already went out today.","operationId":"admin_email_activity_now_admin_recent_activity_email_now_post","parameters":[{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/api/accounts":{"get":{"summary":"List Accounts","operationId":"list_accounts_admin_api_accounts_get","parameters":[{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/api/accounts/{account_id}/free-forever":{"post":{"summary":"Toggle Free Forever","operationId":"toggle_free_forever_admin_api_accounts__account_id__free_forever_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/api/accounts/{account_id}/resync-subscription":{"post":{"summary":"Resync Subscription","description":"Rebuild the account's plan/status/feature flags from its live Stripe\nsubscription -- the same code path the webhook runs -- for when our copy has\ndrifted (e.g. a missed or misapplied webhook).","operationId":"resync_subscription_admin_api_accounts__account_id__resync_subscription_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/api/accounts/{account_id}/toggle-active":{"post":{"summary":"Toggle Active","operationId":"toggle_active_admin_api_accounts__account_id__toggle_active_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToggleActiveIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/api/accounts/{account_id}":{"delete":{"summary":"Delete Account","description":"Permanently delete a customer account and everything it owns.\n\nDoes NOT touch Stripe. If the account has an active/trialing subscription,\nthat keeps billing on its own until it's cancelled separately — the\nresponse flags this so it isn't missed.","operationId":"delete_account_admin_api_accounts__account_id__delete","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/api/accounts/spam-candidates":{"get":{"summary":"List Spam Candidates","description":"Accounts flagged by the signup-time spam scorer (see spam_score.py),\nfor admin review before a bulk cleanup delete. safe_to_delete mirrors the\nguard bulk_delete_spam_accounts enforces server-side — zero lifetime\nrevenue and no subscription ever started — so the UI can flag anything\nthat slipped past that bar (a flagged name that later became a real,\npaying customer) before the admin even selects it.","operationId":"list_spam_candidates_admin_api_accounts_spam_candidates_get","parameters":[{"name":"min_score","in":"query","required":false,"schema":{"type":"number","default":0.5,"title":"Min Score"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/api/accounts/bulk-delete-spam":{"post":{"summary":"Bulk Delete Spam Accounts","description":"Delete a batch of accounts the admin reviewed and selected from the\nspam-candidates preview. Independently re-checks the safety bar for each\none server-side (zero revenue, never subscribed) rather than trusting the\nids the client sent — protects against something changing between preview\nand this call (e.g. a flagged account converting to a real paying\ncustomer in the interim). Anything that fails the check is skipped, not\ndeleted, and reported back.","operationId":"bulk_delete_spam_accounts_admin_api_accounts_bulk_delete_spam_post","parameters":[{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteSpamIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/sites/{site_id}/ingest":{"post":{"summary":"Trigger Ingest","operationId":"trigger_ingest_admin_sites__site_id__ingest_post","parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string","title":"Site Id"}},{"name":"force_refresh","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Force Refresh"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/sites/{site_id}/ingest-status":{"get":{"summary":"Get Ingest Status","operationId":"get_ingest_status_admin_sites__site_id__ingest_status_get","parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string","title":"Site Id"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestStatusOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/sites/{site_id}/documents":{"post":{"summary":"Upload Document","operationId":"upload_document_admin_sites__site_id__documents_post","parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string","title":"Site Id"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_document_admin_sites__site_id__documents_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"List Documents","operationId":"list_documents_admin_sites__site_id__documents_get","parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string","title":"Site Id"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/api/accounts/{account_id}/documents":{"get":{"summary":"List Account Documents","description":"All documents converted by this customer, across every site they\nown (most customers have exactly one site, but multisite WordPress\ninstalls share one account across several) -- most recent first,\npaginated the same way the WordPress plugin's own Documents list is.","operationId":"list_account_documents_admin_api_accounts__account_id__documents_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account 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":20,"title":"Per Page"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/sites/{site_id}/documents/{doc_id}/generate-html":{"post":{"summary":"Generate Document Html","description":"Generate accessible HTML for a specific document on demand.","operationId":"generate_document_html_admin_sites__site_id__documents__doc_id__generate_html_post","parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string","title":"Site Id"}},{"name":"doc_id","in":"path","required":true,"schema":{"type":"integer","title":"Doc Id"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/sites/{site_id}/documents/{doc_id}/reprocess":{"post":{"summary":"Reprocess Document","description":"Re-run the full pipeline (download → OCR → HTML) for a document.","operationId":"reprocess_document_admin_sites__site_id__documents__doc_id__reprocess_post","parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string","title":"Site Id"}},{"name":"doc_id","in":"path","required":true,"schema":{"type":"integer","title":"Doc Id"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/sites/{site_id}/documents/{doc_id}/reprocess-vision":{"post":{"summary":"Reprocess Document With Vision","description":"Re-run the full pipeline, forcing every page through vision OCR even\nwhere plain text extraction technically succeeds -- for a document whose\nlayout (a grid, a calendar, a multi-column table) gets scrambled by\nlinear text extraction even though extraction produces enough characters\nto look successful. Confirmed for real: a school lunch calendar PDF read\nall its date headers first, then every day's menu items as one flat\nundifferentiated list, with no way to recover which item belonged to\nwhich day from the extracted text alone. Real added OpenAI cost per\npage -- an explicit super-admin action, not something to trigger\nautomatically.","operationId":"reprocess_document_with_vision_admin_sites__site_id__documents__doc_id__reprocess_vision_post","parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string","title":"Site Id"}},{"name":"doc_id","in":"path","required":true,"schema":{"type":"integer","title":"Doc Id"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/sites/{site_id}/documents/{doc_id}":{"delete":{"summary":"Delete Document","operationId":"delete_document_admin_sites__site_id__documents__doc_id__delete","parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string","title":"Site Id"}},{"name":"doc_id","in":"path","required":true,"schema":{"type":"integer","title":"Doc Id"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/api/failed-conversions":{"get":{"summary":"List Failed Conversions","description":"Every failed document conversion across all sites, newest first --\nthe error_detail was already being captured and stored per-document\n(see _persist_pdf_error in routes/public.py), just never surfaced\nanywhere except by clicking into each site's Documents tab individually.","operationId":"list_failed_conversions_admin_api_failed_conversions_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/api/active-jobs":{"get":{"summary":"List Active Jobs","description":"Every PDF conversion currently queued or in progress, across every\nsite/account -- a live view into the same per-job status (queued ->\ndownloading -> extracting -> generating -> saving) that a single site's\nDocuments tab already shows scoped to one site, and that a customer\nwatches on their own doc_processing.html page while waiting.","operationId":"list_active_jobs_admin_api_active_jobs_get","parameters":[{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/api/pdf-cache/stats":{"get":{"summary":"Pdf Cache Stats","operationId":"pdf_cache_stats_admin_api_pdf_cache_stats_get","parameters":[{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/api/pdf-cache":{"get":{"summary":"List Pdf Cache","operationId":"list_pdf_cache_admin_api_pdf_cache_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/api/pdf-cache/{content_hash}":{"delete":{"summary":"Delete Pdf Cache Entry","operationId":"delete_pdf_cache_entry_admin_api_pdf_cache__content_hash__delete","parameters":[{"name":"content_hash","in":"path","required":true,"schema":{"type":"string","title":"Content Hash"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/api/pdf-cache/clear":{"post":{"summary":"Clear Pdf Cache","operationId":"clear_pdf_cache_admin_api_pdf_cache_clear_post","parameters":[{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/api/conversion-economics":{"get":{"summary":"Conversion Economics","description":"Real OpenAI $ cost of document conversions vs. Accessible plan revenue,\nfor margin visibility. Cost figures come from conversion_cost_micros,\ncomputed once per document at conversion time (see cost_tracking.py) --\nnever recomputed from a possibly-since-changed price table, so this stays\naccurate even after pricing updates.","operationId":"conversion_economics_admin_api_conversion_economics_get","parameters":[{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/accounts/{account_id}/enterprise-checkout":{"post":{"summary":"Create Enterprise Checkout","description":"Generate a Stripe Checkout link for an enterprise deal.\n\nWorkflow:\n1. Pick the recurring rate: either an existing plan price (stripe_price_id,\n   e.g. the standard $99/mo Accessible Pro price), or a custom monthly amount\n   (recurring_amount_cents) which gets its own Stripe Price created here.\n2. Optionally add a one-time bulk/setup fee (one_time_amount_cents, e.g.\n   $5,500 flat for a one-off bulk document conversion) — also created here,\n   or pass an existing one_time_price_id if you already made one in Stripe.\n3. Call this endpoint with the account ID; no need to touch the Stripe\n   dashboard first unless you want to reuse a price you already created.\n4. Send the returned checkout_url to the customer.\n5. They enter payment info once; the one-time fee (if any) is billed on the\n   first invoice alongside the first recurring charge, then the subscription\n   continues at the recurring price.\n6. Stripe webhook fires, account plan + doc_access are updated automatically.\n\nSee USAGE.md (\"Enterprise / Custom Deals\") for the full runbook.","operationId":"create_enterprise_checkout_admin_accounts__account_id__enterprise_checkout_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnterpriseCheckoutIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/accounts/{account_id}/one-time-invoice":{"post":{"summary":"Create One Time Invoice","description":"Bills a one-off amount as a standalone Stripe Invoice with\ncollection_method='send_invoice'. Stripe emails the customer a link to\npay, due in days_until_due days -- they can also ignore that link and\npay by check/wire outside Stripe entirely, in which case mark the\ninvoice paid manually in the Stripe dashboard once it clears.\n\nTest it on yourself first: POST with test_email set to your own\naddress. That runs the exact same Stripe calls against a throwaway\ntest customer, so you get the real email Stripe would send, without\ntouching the real account's Stripe customer, subscription, or\ndatabase fields, and without applying doc_credit_topup.","operationId":"create_one_time_invoice_admin_accounts__account_id__one_time_invoice_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OneTimeInvoiceIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/accounts/{account_id}/invoice-subscription":{"post":{"summary":"Create Invoice Subscription","description":"Creates a recurring Stripe Subscription billed via emailed invoices\n(collection_method='send_invoice') instead of auto-charging a card on\nfile. Stripe generates and emails a fresh invoice automatically every\nbilling period from here on -- no extra code needed for renewals.\n\nUnlike create_enterprise_checkout above, this never goes through\nStripe Checkout (send_invoice billing doesn't collect a payment method\nupfront, so there's no checkout link to send), which means\ncheckout.session.completed -- the only webhook event this app's\nbilling.py currently acts on to apply a plan -- never fires for a\nsubscription created this way. So this endpoint updates the account\nrecord itself, inline, rather than waiting on a webhook that won't\ncome for this kind of subscription.\n\nTest it on yourself first: POST with test_email set to your own\naddress. Creates the subscription on a throwaway test Stripe customer\nso Stripe sends you the real first invoice email, and leaves the real\naccount's Stripe customer, subscription, and database fields\ncompletely untouched.","operationId":"create_invoice_subscription_admin_accounts__account_id__invoice_subscription_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceSubscriptionIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/accounts/{account_id}":{"get":{"summary":"Get Account","operationId":"get_account_admin_accounts__account_id__get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/api/accounts/{account_id}/doc-limit":{"post":{"summary":"Admin Set Doc Limit","description":"Override the monthly document conversion limit for an account.","operationId":"admin_set_doc_limit_admin_api_accounts__account_id__doc_limit_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocLimitUpdateIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/cron/requeue-limit-reached":{"post":{"summary":"Admin Requeue Limit Reached","description":"Manually trigger the daily re-queue of documents whose owners\nhit their monthly conversion limit. Runs automatically once a day too.","operationId":"admin_requeue_limit_reached_admin_cron_requeue_limit_reached_post","parameters":[{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin":{"get":{"summary":"Admin Home","operationId":"admin_home_admin_get","parameters":[{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/sites/{site_id}/dashboard":{"get":{"summary":"Admin Site Dashboard","operationId":"admin_site_dashboard_admin_sites__site_id__dashboard_get","parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string","title":"Site Id"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/sites/{site_id}/documents/{doc_id}/view":{"get":{"summary":"Admin Document View","description":"Same viewer template the public doc_viewer route renders, but for\nadmin use -- deliberately does NOT check settings.doc_access_enabled,\nsince that's a separate customer-facing plan toggle unrelated to\nwhether admin should be able to see a document that was converted.","operationId":"admin_document_view_admin_sites__site_id__documents__doc_id__view_get","parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string","title":"Site Id"}},{"name":"doc_id","in":"path","required":true,"schema":{"type":"integer","title":"Doc Id"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/portal/logout":{"post":{"summary":"Unified Logout","operationId":"unified_logout_portal_logout_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/portal/api/resend-verification":{"post":{"summary":"Portal Resend Verification","description":"Resend the email-verification link for the owner of the site the current\nportal session is bound to. Used by the unverified banner.","operationId":"portal_resend_verification_portal_api_resend_verification_post","parameters":[{"name":"site_user_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site User Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/portal/api/dashboard":{"get":{"summary":"Portal Dashboard","operationId":"portal_dashboard_portal_api_dashboard_get","parameters":[{"name":"site_id","in":"query","required":true,"schema":{"type":"string","title":"Site Id"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}},{"name":"site_user_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site User Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/portal/api/conversations/{convo_id}/mark-answered":{"post":{"summary":"Portal Mark Answered","operationId":"portal_mark_answered_portal_api_conversations__convo_id__mark_answered_post","parameters":[{"name":"convo_id","in":"path","required":true,"schema":{"type":"integer","title":"Convo Id"}},{"name":"site_id","in":"query","required":true,"schema":{"type":"string","title":"Site Id"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}},{"name":"site_user_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site User Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/portal/api/documents":{"get":{"summary":"Portal List Documents","operationId":"portal_list_documents_portal_api_documents_get","parameters":[{"name":"site_id","in":"query","required":true,"schema":{"type":"string","title":"Site Id"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}},{"name":"site_user_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site User Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Portal Upload Document","operationId":"portal_upload_document_portal_api_documents_post","parameters":[{"name":"site_id","in":"query","required":true,"schema":{"type":"string","title":"Site Id"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}},{"name":"site_user_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site User Session"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_portal_upload_document_portal_api_documents_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/portal/api/documents/from-urls":{"post":{"summary":"Portal Add Document Urls","description":"Convert PDFs by link without installing anything on the customer's site.\nThe owner names the files, so unlike the widget's report-pdfs there is no\ndomain allowlist; the SSRF guard on the download itself still applies.","operationId":"portal_add_document_urls_portal_api_documents_from_urls_post","parameters":[{"name":"site_id","in":"query","required":true,"schema":{"type":"string","title":"Site Id"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}},{"name":"site_user_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site User Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddDocumentUrlsIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/portal/api/documents/upload-pdf":{"post":{"summary":"Portal Upload Pdf","description":"Upload a PDF file to convert. Returns at once; the document shows as\nPending until the background conversion finishes.","operationId":"portal_upload_pdf_portal_api_documents_upload_pdf_post","parameters":[{"name":"site_id","in":"query","required":true,"schema":{"type":"string","title":"Site Id"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}},{"name":"site_user_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site User Session"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_portal_upload_pdf_portal_api_documents_upload_pdf_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/portal/api/documents/{doc_id}":{"delete":{"summary":"Portal Delete Document","operationId":"portal_delete_document_portal_api_documents__doc_id__delete","parameters":[{"name":"doc_id","in":"path","required":true,"schema":{"type":"integer","title":"Doc Id"}},{"name":"site_id","in":"query","required":true,"schema":{"type":"string","title":"Site Id"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}},{"name":"site_user_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site User Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/portal/api/training":{"post":{"summary":"Portal Add Training","operationId":"portal_add_training_portal_api_training_post","parameters":[{"name":"site_id","in":"query","required":true,"schema":{"type":"string","title":"Site Id"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}},{"name":"site_user_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site User Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainingEntryIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/portal/api/training/{doc_id}":{"put":{"summary":"Portal Update Training","operationId":"portal_update_training_portal_api_training__doc_id__put","parameters":[{"name":"doc_id","in":"path","required":true,"schema":{"type":"integer","title":"Doc Id"}},{"name":"site_id","in":"query","required":true,"schema":{"type":"string","title":"Site Id"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}},{"name":"site_user_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site User Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainingEntryIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/portal/api/settings":{"get":{"summary":"Portal Get Settings","operationId":"portal_get_settings_portal_api_settings_get","parameters":[{"name":"site_id","in":"query","required":true,"schema":{"type":"string","title":"Site Id"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}},{"name":"site_user_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site User Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"summary":"Portal Update Settings","operationId":"portal_update_settings_portal_api_settings_put","parameters":[{"name":"site_id","in":"query","required":true,"schema":{"type":"string","title":"Site Id"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}},{"name":"site_user_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site User Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalSettingsUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/portal/api/ingest-status":{"get":{"summary":"Portal Ingest Status","operationId":"portal_ingest_status_portal_api_ingest_status_get","parameters":[{"name":"site_id","in":"query","required":true,"schema":{"type":"string","title":"Site Id"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}},{"name":"site_user_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site User Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/portal/api/crawled-pages":{"get":{"summary":"Portal Crawled Pages","operationId":"portal_crawled_pages_portal_api_crawled_pages_get","parameters":[{"name":"site_id","in":"query","required":true,"schema":{"type":"string","title":"Site Id"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}},{"name":"site_user_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site User Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/portal/api/crawled-pages/delete":{"post":{"summary":"Portal Delete Crawled Page","operationId":"portal_delete_crawled_page_portal_api_crawled_pages_delete_post","parameters":[{"name":"site_id","in":"query","required":true,"schema":{"type":"string","title":"Site Id"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}},{"name":"site_user_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site User Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteCrawledPage"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/portal/api/base-url":{"put":{"summary":"Portal Update Base Url","operationId":"portal_update_base_url_portal_api_base_url_put","parameters":[{"name":"site_id","in":"query","required":true,"schema":{"type":"string","title":"Site Id"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}},{"name":"site_user_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site User Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseUrlUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/portal/api/billing-status":{"get":{"summary":"Portal Billing Status","operationId":"portal_billing_status_portal_api_billing_status_get","parameters":[{"name":"site_id","in":"query","required":true,"schema":{"type":"string","title":"Site Id"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}},{"name":"site_user_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site User Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/portal/api/help-chat":{"post":{"summary":"Help Chat","description":"Portal help chatbot — answers questions about how to use the portal.\nUses a curated help doc baked into the app, not the customer's site content.","operationId":"help_chat_portal_api_help_chat_post","parameters":[{"name":"site_user_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site User Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HelpChatIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/portal/api/ingest":{"post":{"summary":"Portal Trigger Ingest","operationId":"portal_trigger_ingest_portal_api_ingest_post","parameters":[{"name":"site_id","in":"query","required":true,"schema":{"type":"string","title":"Site Id"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}},{"name":"site_user_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site User Session"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestRequest","default":{"ignore_robots":false}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/portal/api/generate-api-key":{"post":{"summary":"Portal Generate Api Key","operationId":"portal_generate_api_key_portal_api_generate_api_key_post","parameters":[{"name":"site_id","in":"query","required":true,"schema":{"type":"string","title":"Site Id"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}},{"name":"site_user_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site User Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/portal/api/revoke-api-key":{"post":{"summary":"Portal Revoke Api Key","operationId":"portal_revoke_api_key_portal_api_revoke_api_key_post","parameters":[{"name":"site_id","in":"query","required":true,"schema":{"type":"string","title":"Site Id"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}},{"name":"site_user_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site User Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/portal/api/reveal-api-key":{"post":{"summary":"Portal Reveal Api Key","operationId":"portal_reveal_api_key_portal_api_reveal_api_key_post","parameters":[{"name":"site_id","in":"query","required":true,"schema":{"type":"string","title":"Site Id"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}},{"name":"site_user_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site User Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/portal/api/api-key-status":{"get":{"summary":"Portal Api Key Status","operationId":"portal_api_key_status_portal_api_api_key_status_get","parameters":[{"name":"site_id","in":"query","required":true,"schema":{"type":"string","title":"Site Id"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}},{"name":"site_user_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site User Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/portal/api/accessibility-settings":{"get":{"summary":"Portal Get Accessibility Settings","description":"Returns the accessibility-tab-specific settings (hardening toggles + statement fields).\nUsed to populate the accessibility tab on tab load.","operationId":"portal_get_accessibility_settings_portal_api_accessibility_settings_get","parameters":[{"name":"site_id","in":"query","required":true,"schema":{"type":"string","title":"Site Id"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}},{"name":"site_user_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site User Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/portal/api/accessibility-hardening":{"post":{"summary":"Portal Update Accessibility Hardening","operationId":"portal_update_accessibility_hardening_portal_api_accessibility_hardening_post","parameters":[{"name":"site_id","in":"query","required":true,"schema":{"type":"string","title":"Site Id"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}},{"name":"site_user_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site User Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessibilityHardeningUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/portal/api/accessibility-statement":{"post":{"summary":"Portal Update Accessibility Statement","description":"Persist the accessibility-statement form fields and return the rendered\nHTML so the portal can display it for the customer to copy or download.\nNote: `published` is intentionally ignored here — new customers use the\ndownload-for-self-host flow, not the legacy hosted URL.","operationId":"portal_update_accessibility_statement_portal_api_accessibility_statement_post","parameters":[{"name":"site_id","in":"query","required":true,"schema":{"type":"string","title":"Site Id"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}},{"name":"site_user_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site User Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessibilityStatementUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/portal/api/accessibility-statement-html":{"get":{"summary":"Portal Get Accessibility Statement Html","description":"Return the rendered accessibility statement HTML built from the\nalready-saved settings. Used by the Accessibility tab to populate the\ncode block on tab load without forcing a save.","operationId":"portal_get_accessibility_statement_html_portal_api_accessibility_statement_html_get","parameters":[{"name":"site_id","in":"query","required":true,"schema":{"type":"string","title":"Site Id"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}},{"name":"site_user_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site User Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/portal/docs/{doc_id}/edit":{"get":{"summary":"Portal Doc Editor","description":"HTML editor for a single accessible document — scoped to the session's site.","operationId":"portal_doc_editor_portal_docs__doc_id__edit_get","parameters":[{"name":"doc_id","in":"path","required":true,"schema":{"type":"integer","title":"Doc Id"}},{"name":"saved","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Saved"}},{"name":"site_user_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site User Session"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Portal Doc Editor Save","description":"Save edited accessible HTML — scoped to the session's site.","operationId":"portal_doc_editor_save_portal_docs__doc_id__edit_post","parameters":[{"name":"doc_id","in":"path","required":true,"schema":{"type":"integer","title":"Doc Id"}},{"name":"site_user_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site User Session"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_portal_doc_editor_save_portal_docs__doc_id__edit_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/portal/login":{"get":{"summary":"Portal Login Redirect","operationId":"portal_login_redirect_portal_login_get","responses":{"307":{"description":"Successful Response"}}},"post":{"summary":"Unified Login","operationId":"unified_login_portal_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/portal":{"get":{"summary":"Portal Page","operationId":"portal_page_portal_get","parameters":[{"name":"site_user_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site User Session"}}],"responses":{"307":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/portal/view":{"get":{"summary":"Portal View","operationId":"portal_view_portal_view_get","parameters":[{"name":"site_user_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site User Session"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/portal/api/users":{"get":{"summary":"List Users","operationId":"list_users_portal_api_users_get","parameters":[{"name":"site_id","in":"query","required":true,"schema":{"type":"string","title":"Site Id"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}},{"name":"site_user_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site User Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/portal/api/users/invite":{"post":{"summary":"Invite User","operationId":"invite_user_portal_api_users_invite_post","parameters":[{"name":"site_id","in":"query","required":true,"schema":{"type":"string","title":"Site Id"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}},{"name":"site_user_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site User Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteUserIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/portal/api/users/{user_id}/resend-invite":{"post":{"summary":"Resend Invite","operationId":"resend_invite_portal_api_users__user_id__resend_invite_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}},{"name":"site_id","in":"query","required":true,"schema":{"type":"string","title":"Site Id"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}},{"name":"site_user_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site User Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/portal/api/users/{user_id}":{"put":{"summary":"Update User","operationId":"update_user_portal_api_users__user_id__put","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}},{"name":"site_id","in":"query","required":true,"schema":{"type":"string","title":"Site Id"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}},{"name":"site_user_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site User Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete User","operationId":"delete_user_portal_api_users__user_id__delete","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}},{"name":"site_id","in":"query","required":true,"schema":{"type":"string","title":"Site Id"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}},{"name":"site_user_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site User Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/portal/invite/accept":{"get":{"summary":"Invite Accept Page","operationId":"invite_accept_page_portal_invite_accept_get","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Invite Accept","operationId":"invite_accept_portal_invite_accept_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptInviteIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/portal/shadow-entry":{"get":{"summary":"Shadow Entry","description":"One-use endpoint that converts an admin shadow token into a portal session.\nOpens in a new tab so the admin's own session is never touched.","operationId":"shadow_entry_portal_shadow_entry_get","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/portal/api/training-suggestions":{"post":{"summary":"Submit Suggestion","operationId":"submit_suggestion_portal_api_training_suggestions_post","parameters":[{"name":"site_id","in":"query","required":true,"schema":{"type":"string","title":"Site Id"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}},{"name":"site_user_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site User Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainingSuggestionIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"List Suggestions","operationId":"list_suggestions_portal_api_training_suggestions_get","parameters":[{"name":"site_id","in":"query","required":true,"schema":{"type":"string","title":"Site Id"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}},{"name":"site_user_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site User Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/portal/api/training-suggestions/{suggestion_id}/moderate":{"post":{"summary":"Moderate Suggestion","operationId":"moderate_suggestion_portal_api_training_suggestions__suggestion_id__moderate_post","parameters":[{"name":"suggestion_id","in":"path","required":true,"schema":{"type":"integer","title":"Suggestion Id"}},{"name":"site_id","in":"query","required":true,"schema":{"type":"string","title":"Site Id"}},{"name":"admin_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Session"}},{"name":"site_user_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site User Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModerateSuggestionIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/robots.txt":{"get":{"summary":"Robots Txt","operationId":"robots_txt_robots_txt_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/sitemap.xml":{"get":{"summary":"Sitemap Xml","operationId":"sitemap_xml_sitemap_xml_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/":{"get":{"summary":"Landing Page","operationId":"landing_page__get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/landing":{"get":{"summary":"Old Landing Page","operationId":"old_landing_page_landing_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/accessible":{"get":{"summary":"Accessible Redirect","operationId":"accessible_redirect_accessible_get","responses":{"307":{"description":"Successful Response"}}}},"/conversations":{"get":{"summary":"Conversations Landing","operationId":"conversations_landing_conversations_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/app":{"get":{"summary":"App Root","operationId":"app_root_app_get","responses":{"307":{"description":"Successful Response"}}}},"/signup":{"get":{"summary":"Signup Page","operationId":"signup_page_signup_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/login":{"get":{"summary":"Login Page","operationId":"login_page_login_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/app/login":{"get":{"summary":"Old Login Redirect","operationId":"old_login_redirect_app_login_get","responses":{"307":{"description":"Successful Response"}}}},"/app/onboarding":{"get":{"summary":"Onboarding Page","operationId":"onboarding_page_app_onboarding_get","parameters":[{"name":"site_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/dashboard":{"get":{"summary":"Dashboard Page","operationId":"dashboard_page_app_dashboard_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/dashboard":{"get":{"summary":"Dashboard Page","operationId":"dashboard_page_dashboard_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/widget-test":{"get":{"summary":"Widget Test Page","operationId":"widget_test_page_widget_test_get","parameters":[{"name":"site_id","in":"query","required":false,"schema":{"type":"string","default":"a37fc4d9891b","title":"Site Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/demo/sjcsd":{"get":{"summary":"Demo Sjcsd Page","operationId":"demo_sjcsd_page_demo_sjcsd_get","parameters":[{"name":"site_id","in":"query","required":false,"schema":{"type":"string","default":"94dd051e8bfe","title":"Site Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/billing":{"get":{"summary":"Billing Page","operationId":"billing_page_app_billing_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/integrations":{"get":{"summary":"Integrations Page","operationId":"integrations_page_integrations_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/documents/{site_id}":{"get":{"summary":"Site Documents Page","description":"Public \"accessible documents\" page: every converted document for a site,\nlinking to its accessible viewer. Customers share this link when they\ncannot add the script or plugin to their own pages.","operationId":"site_documents_page_documents__site_id__get","parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string","title":"Site Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/support":{"get":{"summary":"Support Page","operationId":"support_page_support_get","parameters":[{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/guides":{"get":{"summary":"Guides Page","operationId":"guides_page_guides_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/guides/ada-title-ii-pdf-accessibility":{"get":{"summary":"Guide Ada Title Ii","operationId":"guide_ada_title_ii_guides_ada_title_ii_pdf_accessibility_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/guides/section-508-pdf-accessibility":{"get":{"summary":"Guide Section 508","operationId":"guide_section_508_guides_section_508_pdf_accessibility_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/guides/pdf-to-accessible-html":{"get":{"summary":"Guide Pdf To Html","operationId":"guide_pdf_to_html_guides_pdf_to_accessible_html_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/terms":{"get":{"summary":"Terms Page","operationId":"terms_page_terms_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/privacy":{"get":{"summary":"Privacy Page","operationId":"privacy_page_privacy_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/app/terms":{"get":{"summary":"Old Terms Redirect","operationId":"old_terms_redirect_app_terms_get","responses":{"307":{"description":"Successful Response"}}}},"/app/privacy":{"get":{"summary":"Old Privacy Redirect","operationId":"old_privacy_redirect_app_privacy_get","responses":{"307":{"description":"Successful Response"}}}},"/app/forgot-password":{"get":{"summary":"Forgot Password Page","operationId":"forgot_password_page_app_forgot_password_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/verify-email":{"get":{"summary":"Verify Email","description":"Verify email address from the link sent during signup.","operationId":"verify_email_verify_email_get","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/reset-password":{"get":{"summary":"Reset Password Page","operationId":"reset_password_page_app_reset_password_get","parameters":[{"name":"token","in":"query","required":false,"schema":{"type":"string","default":"","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/u/{site_id}/accessibility-statement":{"get":{"summary":"Hosted Accessibility Statement","description":"Public hosted accessibility statement page for a customer's site.\nOnly rendered when the customer has flipped the published flag on in the portal.\nThe customer's custom_html is rendered as raw HTML (trusted, gated by owner-only portal auth).","operationId":"hosted_accessibility_statement_u__site_id__accessibility_statement_get","parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string","title":"Site Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/free-report":{"get":{"summary":"Free Report Page","operationId":"free_report_page_free_report_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}},"post":{"summary":"Start Report","operationId":"start_report_free_report_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/free-report/{report_id}":{"get":{"summary":"Free Report View","operationId":"free_report_view_free_report__report_id__get","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/free-report/{report_id}/status":{"get":{"summary":"Report Status","operationId":"report_status_free_report__report_id__status_get","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"}}}}}}},"/free-report/{report_id}/request-more":{"post":{"summary":"Request More","operationId":"request_more_free_report__report_id__request_more_post","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","title":"Report Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoreIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/widget.js":{"get":{"summary":" Serve Widget Js","operationId":"_serve_widget_js_widget_js_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/downloads/savoy-accessible-wporg.zip":{"get":{"summary":" Redirect Plugin Zip","operationId":"_redirect_plugin_zip_downloads_savoy_accessible_wporg_zip_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/downloads/savoy-accessible.zip":{"get":{"summary":" Redirect Plugin Zip","operationId":"_redirect_plugin_zip_downloads_savoy_accessible_zip_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/plugin-update-check":{"get":{"summary":" Plugin Update Check","description":"WordPress update checker endpoint.","operationId":"_plugin_update_check_api_plugin_update_check_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/og-image.svg":{"get":{"summary":" Serve Og Image","operationId":"_serve_og_image_og_image_svg_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/og-image.png":{"get":{"summary":" Serve Og Png","operationId":"_serve_og_png_og_image_png_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/apple-touch-icon.png":{"get":{"summary":" Serve Apple Touch Icon","operationId":"_serve_apple_touch_icon_apple_touch_icon_png_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/favicon.ico":{"get":{"summary":" Serve Favicon","operationId":"_serve_favicon_favicon_ico_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"AcceptInviteIn":{"properties":{"token":{"type":"string","title":"Token"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"password":{"type":"string","title":"Password"}},"type":"object","required":["token","password"],"title":"AcceptInviteIn"},"AccessibilityHardeningUpdate":{"properties":{"harden_lang":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Harden Lang"},"harden_focus":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Harden Focus"},"harden_reduce_motion":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Harden Reduce Motion"},"skip_link":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Skip Link"}},"type":"object","title":"AccessibilityHardeningUpdate"},"AccessibilityStatementUpdate":{"properties":{"org_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Name"},"contact_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Email"},"conformance_level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conformance Level"},"custom_html":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custom Html"},"published":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Published"}},"type":"object","title":"AccessibilityStatementUpdate"},"AddDocumentUrlsIn":{"properties":{"urls":{"items":{"type":"string"},"type":"array","title":"Urls"}},"type":"object","required":["urls"],"title":"AddDocumentUrlsIn"},"AnalyticsSummaryOut":{"properties":{"total_chats":{"type":"integer","title":"Total Chats"},"unanswered_count":{"type":"integer","title":"Unanswered Count"},"leads_count":{"type":"integer","title":"Leads Count"}},"type":"object","required":["total_chats","unanswered_count","leads_count"],"title":"AnalyticsSummaryOut"},"BaseUrlUpdate":{"properties":{"base_url":{"type":"string","title":"Base Url"},"clear_old":{"type":"boolean","title":"Clear Old","default":false},"recrawl":{"type":"boolean","title":"Recrawl","default":false}},"type":"object","required":["base_url"],"title":"BaseUrlUpdate"},"Body_portal_doc_editor_save_portal_docs__doc_id__edit_post":{"properties":{"html":{"type":"string","title":"Html"}},"type":"object","required":["html"],"title":"Body_portal_doc_editor_save_portal_docs__doc_id__edit_post"},"Body_portal_upload_document_portal_api_documents_post":{"properties":{"title":{"type":"string","title":"Title"},"content":{"type":"string","title":"Content"},"file":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"File"}},"type":"object","title":"Body_portal_upload_document_portal_api_documents_post"},"Body_portal_upload_pdf_portal_api_documents_upload_pdf_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_portal_upload_pdf_portal_api_documents_upload_pdf_post"},"Body_upload_document_admin_sites__site_id__documents_post":{"properties":{"title":{"type":"string","title":"Title"},"content":{"type":"string","title":"Content"},"file":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"File"}},"type":"object","title":"Body_upload_document_admin_sites__site_id__documents_post"},"BulkDeleteSpamIn":{"properties":{"account_ids":{"items":{"type":"string"},"type":"array","title":"Account Ids"}},"type":"object","required":["account_ids"],"title":"BulkDeleteSpamIn"},"ChatIn":{"properties":{"site_id":{"type":"string","maxLength":64,"minLength":1,"title":"Site Id"},"session_id":{"type":"string","maxLength":128,"minLength":1,"title":"Session Id"},"message":{"type":"string","maxLength":2000,"minLength":1,"title":"Message"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"}},"type":"object","required":["site_id","session_id","message"],"title":"ChatIn"},"ChatOut":{"properties":{"answer":{"type":"string","title":"Answer"},"unsure":{"type":"boolean","title":"Unsure"}},"type":"object","required":["answer","unsure"],"title":"ChatOut"},"CheckoutIn":{"properties":{"plan":{"type":"string","title":"Plan"}},"type":"object","required":["plan"],"title":"CheckoutIn"},"CustomerAccountOut":{"properties":{"account_id":{"type":"string","title":"Account Id"},"email":{"type":"string","format":"email","title":"Email"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name"},"subscription_status":{"type":"string","title":"Subscription Status"},"subscription_plan":{"type":"string","title":"Subscription Plan"},"is_shadow":{"type":"boolean","title":"Is Shadow","default":false}},"type":"object","required":["account_id","email","full_name","company_name","subscription_status","subscription_plan"],"title":"CustomerAccountOut"},"CustomerLoginIn":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","maxLength":255,"minLength":1,"title":"Password"}},"type":"object","required":["email","password"],"title":"CustomerLoginIn"},"CustomerLoginOut":{"properties":{"account_id":{"type":"string","title":"Account Id"},"email":{"type":"string","format":"email","title":"Email"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name"},"subscription_status":{"type":"string","title":"Subscription Status"},"subscription_plan":{"type":"string","title":"Subscription Plan"},"message":{"type":"string","title":"Message","default":"Logged in successfully"}},"type":"object","required":["account_id","email","full_name","company_name","subscription_status","subscription_plan"],"title":"CustomerLoginOut"},"CustomerSignupIn":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","maxLength":255,"minLength":8,"title":"Password"},"full_name":{"type":"string","maxLength":255,"minLength":1,"title":"Full Name"},"company_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Company Name"},"site_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Site Name"},"base_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Base Url"},"contact_email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Contact Email"},"allowed_domains":{"items":{"type":"string"},"type":"array","title":"Allowed Domains"},"allow_paths":{"items":{"type":"string"},"type":"array","title":"Allow Paths"},"deny_paths":{"items":{"type":"string"},"type":"array","title":"Deny Paths"},"bot_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Bot Name"},"bot_avatar":{"type":"string","title":"Bot Avatar","default":"spark"},"plan":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Plan"},"turnstile_token":{"type":"string","minLength":1,"title":"Turnstile Token"},"utm_source":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Utm Source"},"utm_medium":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Utm Medium"},"utm_campaign":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Utm Campaign"},"gclid":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Gclid"}},"type":"object","required":["email","password","full_name","turnstile_token"],"title":"CustomerSignupIn"},"CustomerSignupOut":{"properties":{"account_id":{"type":"string","title":"Account Id"},"site_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site Id"},"email":{"type":"string","format":"email","title":"Email"},"subscription_status":{"type":"string","title":"Subscription Status"},"subscription_plan":{"type":"string","title":"Subscription Plan"},"widget_snippet":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Widget Snippet"},"portal_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Portal Url"},"next_step":{"type":"string","title":"Next Step"}},"type":"object","required":["account_id","email","subscription_status","subscription_plan","next_step"],"title":"CustomerSignupOut"},"CustomerSiteOut":{"properties":{"site_id":{"type":"string","title":"Site Id"},"name":{"type":"string","title":"Name"},"base_url":{"type":"string","title":"Base Url"},"contact_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Email"},"widget_snippet":{"type":"string","title":"Widget Snippet"},"ingest_status":{"type":"string","title":"Ingest Status"},"ingest_pages_found":{"type":"integer","title":"Ingest Pages Found"},"ingest_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ingest Error"},"portal_url":{"type":"string","title":"Portal Url"},"show_lead_form":{"type":"boolean","title":"Show Lead Form","default":false}},"type":"object","required":["site_id","name","base_url","contact_email","widget_snippet","ingest_status","ingest_pages_found","ingest_error","portal_url"],"title":"CustomerSiteOut"},"DeleteCrawledPage":{"properties":{"url":{"type":"string","title":"Url"}},"type":"object","required":["url"],"title":"DeleteCrawledPage"},"DocChatIn":{"properties":{"site_id":{"type":"string","title":"Site Id"},"doc_id":{"type":"integer","title":"Doc Id"},"session_id":{"type":"string","title":"Session Id"},"message":{"type":"string","title":"Message"}},"type":"object","required":["site_id","doc_id","session_id","message"],"title":"DocChatIn"},"DocLimitUpdateIn":{"properties":{"monthly_doc_limit":{"type":"integer","title":"Monthly Doc Limit"}},"type":"object","required":["monthly_doc_limit"],"title":"DocLimitUpdateIn"},"EnterpriseCheckoutIn":{"properties":{"stripe_price_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Price Id"},"recurring_amount_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Recurring Amount Cents"},"recurring_interval":{"type":"string","title":"Recurring Interval","default":"month"},"one_time_price_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"One Time Price Id"},"one_time_amount_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"One Time Amount Cents"},"one_time_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"One Time Label"},"plan_label":{"type":"string","title":"Plan Label","default":"enterprise"},"monthly_convo_limit":{"type":"integer","title":"Monthly Convo Limit","default":100000},"monthly_doc_limit":{"type":"integer","title":"Monthly Doc Limit","default":1000},"doc_access":{"type":"boolean","title":"Doc Access","default":true},"trial_days":{"type":"integer","title":"Trial Days","default":14},"doc_credit_topup":{"type":"integer","title":"Doc Credit Topup","default":0}},"type":"object","title":"EnterpriseCheckoutIn"},"ForgotPasswordIn":{"properties":{"email":{"type":"string","title":"Email"}},"type":"object","required":["email"],"title":"ForgotPasswordIn"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HelpChatIn":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"HelpChatIn"},"IngestOut":{"properties":{"site_id":{"type":"string","title":"Site Id"},"status":{"type":"string","title":"Status"}},"type":"object","required":["site_id","status"],"title":"IngestOut"},"IngestRequest":{"properties":{"ignore_robots":{"type":"boolean","title":"Ignore Robots","default":false}},"type":"object","title":"IngestRequest"},"IngestStatusOut":{"properties":{"site_id":{"type":"string","title":"Site Id"},"status":{"type":"string","title":"Status"},"pages_crawled":{"type":"integer","title":"Pages Crawled"},"chunks_indexed":{"type":"integer","title":"Chunks Indexed"},"last_ingested_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Ingested At"},"ingest_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ingest Error"}},"type":"object","required":["site_id","status","pages_crawled","chunks_indexed","last_ingested_at","ingest_error"],"title":"IngestStatusOut"},"InviteUserIn":{"properties":{"email":{"type":"string","title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"role":{"type":"string","title":"Role"}},"type":"object","required":["email","role"],"title":"InviteUserIn"},"InvoiceSubscriptionIn":{"properties":{"stripe_price_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Price Id"},"recurring_amount_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Recurring Amount Cents"},"recurring_interval":{"type":"string","title":"Recurring Interval","default":"month"},"days_until_due":{"type":"integer","title":"Days Until Due","default":30},"plan_label":{"type":"string","title":"Plan Label","default":"plugin_pro"},"monthly_convo_limit":{"type":"integer","title":"Monthly Convo Limit","default":0},"monthly_doc_limit":{"type":"integer","title":"Monthly Doc Limit","default":250},"test_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Test Email"}},"type":"object","title":"InvoiceSubscriptionIn"},"LeadIn":{"properties":{"site_id":{"type":"string","maxLength":64,"minLength":1,"title":"Site Id"},"session_id":{"type":"string","maxLength":128,"minLength":1,"title":"Session Id"},"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"email":{"type":"string","maxLength":255,"minLength":3,"title":"Email"},"message":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Message"}},"type":"object","required":["site_id","session_id","name","email"],"title":"LeadIn"},"LoginIn":{"properties":{"email":{"type":"string","title":"Email"},"password":{"type":"string","title":"Password"},"site_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site Id"}},"type":"object","required":["email","password"],"title":"LoginIn"},"LoginPayload":{"properties":{"password":{"type":"string","title":"Password"}},"type":"object","required":["password"],"title":"LoginPayload"},"ModerateSuggestionIn":{"properties":{"action":{"type":"string","title":"Action"}},"type":"object","required":["action"],"title":"ModerateSuggestionIn"},"MoreIn":{"properties":{"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","title":"MoreIn"},"OneTimeInvoiceIn":{"properties":{"amount_cents":{"type":"integer","title":"Amount Cents"},"description":{"type":"string","title":"Description"},"days_until_due":{"type":"integer","title":"Days Until Due","default":30},"doc_credit_topup":{"type":"integer","title":"Doc Credit Topup","default":0},"test_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Test Email"}},"type":"object","required":["amount_cents","description"],"title":"OneTimeInvoiceIn"},"PortalSettingsUpdate":{"properties":{"org_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Name"},"contact_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Email"},"contact_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Phone"},"contact_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Url"},"custom_instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custom Instructions"},"bot_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bot Name"},"bot_avatar":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bot Avatar"},"show_lead_form":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Show Lead Form"},"primary_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Color"},"wildcard_domains":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Wildcard Domains"},"allowed_domains":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Allowed Domains"},"deny_paths":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Deny Paths"},"doc_access_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Doc Access Enabled"},"pdf_allowed_domains":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Pdf Allowed Domains"}},"type":"object","title":"PortalSettingsUpdate"},"ReportIn":{"properties":{"url":{"type":"string","title":"Url"},"org_name":{"type":"string","title":"Org Name"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"email":{"type":"string","title":"Email"},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website"},"turnstile_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Turnstile Token"}},"type":"object","required":["url","org_name","first_name","last_name","email"],"title":"ReportIn"},"ResetPasswordIn":{"properties":{"token":{"type":"string","title":"Token"},"new_password":{"type":"string","title":"New Password"}},"type":"object","required":["token","new_password"],"title":"ResetPasswordIn"},"SiteCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"base_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Base Url"},"contact_email":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Contact Email"},"allowed_domains":{"items":{"type":"string"},"type":"array","title":"Allowed Domains"},"allow_paths":{"items":{"type":"string"},"type":"array","title":"Allow Paths"},"deny_paths":{"items":{"type":"string"},"type":"array","title":"Deny Paths"}},"type":"object","required":["name","base_url"],"title":"SiteCreate"},"SiteDeleteOut":{"properties":{"site_id":{"type":"string","title":"Site Id"},"deleted":{"type":"boolean","title":"Deleted"}},"type":"object","required":["site_id","deleted"],"title":"SiteDeleteOut"},"SiteOut":{"properties":{"site_id":{"type":"string","title":"Site Id"},"name":{"type":"string","title":"Name"},"base_url":{"type":"string","title":"Base Url"},"contact_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Email"},"widget_snippet":{"type":"string","title":"Widget Snippet"}},"type":"object","required":["site_id","name","base_url","contact_email","widget_snippet"],"title":"SiteOut"},"SiteSettingsUpdate":{"properties":{"allowed_domains":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Allowed Domains"},"allow_paths":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Allow Paths"},"deny_paths":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Deny Paths"},"contact_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Email"},"contact_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Phone"},"top_k":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Top K"},"min_similarity":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min Similarity"},"portal_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Portal Username"},"portal_password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Portal Password"},"bot_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bot Name"},"bot_avatar":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bot Avatar"},"show_lead_form":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Show Lead Form"},"custom_instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custom Instructions"},"doc_access_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Doc Access Enabled"}},"type":"object","title":"SiteSettingsUpdate"},"SupportRequestIn":{"properties":{"name":{"type":"string","title":"Name"},"email":{"type":"string","title":"Email"},"message":{"type":"string","title":"Message"},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"turnstile_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Turnstile Token"}},"type":"object","required":["name","email","message"],"title":"SupportRequestIn"},"ToggleActiveIn":{"properties":{"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","title":"ToggleActiveIn"},"TrainingEntryIn":{"properties":{"question":{"type":"string","title":"Question"},"answer":{"type":"string","title":"Answer"}},"type":"object","required":["question","answer"],"title":"TrainingEntryIn"},"TrainingSuggestionIn":{"properties":{"question":{"type":"string","title":"Question"},"suggested_answer":{"type":"string","title":"Suggested Answer"},"feedback_type":{"type":"string","title":"Feedback Type","default":"edit"}},"type":"object","required":["question","suggested_answer"],"title":"TrainingSuggestionIn"},"UpdateUserIn":{"properties":{"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"UpdateUserIn"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WidgetConfigOut":{"properties":{"site_id":{"type":"string","title":"Site Id"},"name":{"type":"string","title":"Name"},"theme":{"additionalProperties":true,"type":"object","title":"Theme"},"contact_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Email"},"contact_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Phone"},"show_lead_form":{"type":"boolean","title":"Show Lead Form","default":false},"doc_access":{"type":"boolean","title":"Doc Access","default":false},"chat_enabled":{"type":"boolean","title":"Chat Enabled","default":true},"harden_lang":{"type":"boolean","title":"Harden Lang","default":false},"harden_focus":{"type":"boolean","title":"Harden Focus","default":false},"harden_reduce_motion":{"type":"boolean","title":"Harden Reduce Motion","default":false},"skip_link":{"type":"boolean","title":"Skip Link","default":false}},"type":"object","required":["site_id","name","theme","contact_email","contact_phone"],"title":"WidgetConfigOut"}}}}