{"openapi":"3.1.0","info":{"title":"OrbitRoute API","description":"Intelligent workload orchestration for space-based AI compute. Routes inference and training jobs between orbital GPUs, terrestrial cloud, and edge compute in real-time.","version":"0.1.0"},"paths":{"/api/v1/route":{"post":{"tags":["routing"],"summary":"Route Job","description":"Route an AI inference/training job to the optimal compute target.\n\nEvaluates orbital vs. terrestrial endpoints based on:\n- Current satellite positions and ground station pass windows\n- Weather conditions at optical ground stations\n- Cost comparison across providers\n- Queue depth and utilization\n- Job priority and latency requirements","operationId":"route_job_api_v1_route_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoutingRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoutingDecision"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v1/cost-compare":{"post":{"tags":["routing"],"summary":"Compare Costs","description":"Get a side-by-side cost comparison for a job across all compute targets.","operationId":"compare_costs_api_v1_cost_compare_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoutingRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CostComparison"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v1/jobs":{"post":{"tags":["jobs"],"summary":"Submit Job","description":"Route AND execute: makes a routing decision, then manages the job through\nits full lifecycle (pass-window scheduling, dispatch, completion, SLA grading).","operationId":"submit_job_api_v1_jobs_post","security":[{"APIKeyHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoutingRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobRecord"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["jobs"],"summary":"List Jobs","operationId":"list_jobs_api_v1_jobs_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/JobRecord"},"title":"Response List Jobs Api V1 Jobs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/jobs/{job_id}":{"get":{"tags":["jobs"],"summary":"Get Job","operationId":"get_job_api_v1_jobs__job_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobRecord"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["jobs"],"summary":"Cancel Job","description":"Cancel a job that hasn't started running yet.","operationId":"cancel_job_api_v1_jobs__job_id__delete","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobRecord"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/jobs-stats/sla":{"get":{"tags":["jobs"],"summary":"Sla Summary","description":"Public honesty scoreboard: predicted vs actual across completed jobs.","operationId":"sla_summary_api_v1_jobs_stats_sla_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/federation/operators":{"post":{"tags":["federation"],"summary":"Register Operator","description":"Register an orbital-compute operator. Returns the operator key ONCE.","operationId":"register_operator_api_v1_federation_operators_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperatorRegistration"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/federation/nodes":{"get":{"tags":["federation"],"summary":"List Nodes","description":"Public federation directory: advertised nodes, live positions, illumination.","operationId":"list_nodes_api_v1_federation_nodes_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/FederatedNode"},"type":"array","title":"Response List Nodes Api V1 Federation Nodes Get"}}}}}},"post":{"tags":["federation"],"summary":"Advertise Node","description":"Publish/refresh a capability advertisement for a node. Advertisements are\nupserts: re-advertise whenever power, pricing, thermal margin, or ISL\ntopology changes. A node becomes routable when its orbit is propagatable\n(known NORAD id or supplied TLE).","operationId":"advertise_node_api_v1_federation_nodes_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CapabilityAdvertisement"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v1/federation/nodes/mine":{"get":{"tags":["federation"],"summary":"List My Nodes","operationId":"list_my_nodes_api_v1_federation_nodes_mine_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/FederatedNode"},"type":"array","title":"Response List My Nodes Api V1 Federation Nodes Mine Get"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v1/satellites/positions":{"get":{"tags":["satellites"],"summary":"Get Satellite Positions","description":"Get current positions of all orbital compute assets.","operationId":"get_satellite_positions_api_v1_satellites_positions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/ground-stations":{"get":{"tags":["satellites"],"summary":"Get Ground Stations","description":"Get all ground stations with current weather/link status.","operationId":"get_ground_stations_api_v1_ground_stations_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/satellites/{asset_id}/passes":{"get":{"tags":["satellites"],"summary":"Get Next Passes","description":"Get upcoming ground station passes for an orbital asset.","operationId":"get_next_passes_api_v1_satellites__asset_id__passes_get","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","title":"Asset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/fleet/live":{"get":{"tags":["satellites"],"summary":"Get Live Fleet","description":"Real-time fleet status — live satellite-ground connections,\ntracking count, and pass windows. Updated every 10 minutes\nby the growth engine from real orbital mechanics data.","operationId":"get_live_fleet_api_v1_fleet_live_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/market/intelligence":{"get":{"tags":["satellites"],"summary":"Get Market Intelligence","description":"Real-time satellite market intelligence from Growth Engine 2.0.\nScans 14,700+ satellites across CelesTrak feeds every 60 minutes.\nReturns market coverage, compute-eligible satellites, fleet expansion\ncandidates, connection density, and ground station utilization.\nAll data from real CelesTrak catalog and SGP4 orbital propagation.","operationId":"get_market_intelligence_api_v1_market_intelligence_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/fleet/expansion":{"get":{"tags":["satellites"],"summary":"Get Fleet Expansion","description":"Growth Engine 3.0 — Automated fleet expansion status.\nShows total fleet size, auto-integrated count, expansion rate,\nand recent satellite integrations.","operationId":"get_fleet_expansion_api_v1_fleet_expansion_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/weather/{station_id}":{"get":{"tags":["satellites"],"summary":"Get Station Weather","description":"Get detailed weather for a specific ground station.","operationId":"get_station_weather_api_v1_weather__station_id__get","parameters":[{"name":"station_id","in":"path","required":true,"schema":{"type":"string","title":"Station Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/viz/snapshot":{"get":{"tags":["satellites"],"summary":"Get Viz Snapshot","description":"Compact single-call payload for the /viz command center.\nPositions as packed arrays (~20x smaller than /satellites/positions),\nstations with live weather, and the strongest active links.","operationId":"get_viz_snapshot_api_v1_viz_snapshot_get","parameters":[{"name":"max_links","in":"query","required":false,"schema":{"type":"integer","default":80,"title":"Max Links"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/viz/pass-timeline":{"get":{"tags":["satellites"],"summary":"Get Viz Pass Timeline","description":"Upcoming ground-station pass windows for the core compute assets\nover the next 6 hours. CPU-heavy — computed off the event loop and\ncached for 5 minutes.","operationId":"get_viz_pass_timeline_api_v1_viz_pass_timeline_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/viz/jobs":{"get":{"tags":["satellites"],"summary":"Get Viz Jobs","description":"Public summary of live job activity for the /viz overlay.\nSanitized: statuses, targets, asset/station names, and schedule times\nonly — never customer emails, key hashes, or model names.","operationId":"get_viz_jobs_api_v1_viz_jobs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/viz/compute-assets":{"get":{"tags":["satellites"],"summary":"Get Viz Compute Assets","description":"Current positions + GPU type of the core compute assets, for the /viz\ncoverage-footprint layer. Light payload, empty on any failure.","operationId":"get_viz_compute_assets_api_v1_viz_compute_assets_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/viz/snapshot-at":{"get":{"tags":["satellites"],"summary":"Get Viz Snapshot At","description":"Constellation snapshot propagated at an arbitrary time t (ISO 8601),\nfor the /viz replay scrubber. Downsampled to ~2000 satellites; t must\nfall within ±6h of now. Cached per rounded minute.","operationId":"get_viz_snapshot_at_api_v1_viz_snapshot_at_get","parameters":[{"name":"t","in":"query","required":true,"schema":{"type":"string","title":"T"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/status":{"get":{"tags":["status"],"summary":"Get System Status","description":"Get overall system health and metrics — all real data.","operationId":"get_system_status_api_v1_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemStatus"}}}}}}},"/api/v1/metrics/routing-history":{"get":{"tags":["status"],"summary":"Get Routing History","description":"Get real routing decisions from the database for the last 24 hours.","operationId":"get_routing_history_api_v1_metrics_routing_history_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/keys":{"post":{"tags":["auth"],"summary":"Create Api Key","description":"Generate a new API key (admin only — customers self-serve via /onboard).","operationId":"create_api_key_api_v1_keys_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateKeyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/keys/demo":{"get":{"tags":["auth"],"summary":"Get Demo Key","description":"Get the demo API key for testing.","operationId":"get_demo_key_api_v1_keys_demo_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/usage":{"get":{"tags":["auth"],"summary":"Get Usage","description":"Get usage statistics for an API key.","operationId":"get_usage_api_v1_usage_get","parameters":[{"name":"api_key","in":"query","required":true,"schema":{"type":"string","title":"Api Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/pricing":{"get":{"tags":["billing"],"summary":"Get Pricing","description":"Get available pricing tiers.","operationId":"get_pricing_api_v1_pricing_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/billing/checkout":{"post":{"tags":["billing"],"summary":"Create Checkout","description":"Create a Stripe Checkout session to start a subscription.","operationId":"create_checkout_api_v1_billing_checkout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/webhook":{"post":{"tags":["billing"],"summary":"Stripe Webhook","description":"Handle incoming Stripe webhook events.","operationId":"stripe_webhook_api_v1_billing_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/billing/subscription/{email}":{"get":{"tags":["billing"],"summary":"Check Subscription","description":"Check subscription status for a customer.","operationId":"check_subscription_api_v1_billing_subscription__email__get","parameters":[{"name":"email","in":"path","required":true,"schema":{"type":"string","title":"Email"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/portal":{"post":{"tags":["billing"],"summary":"Create Portal","description":"Create a Stripe Customer Portal session for subscription management.","operationId":"create_portal_api_v1_billing_portal_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/subscription/{email}/usage":{"get":{"tags":["billing"],"summary":"Subscription Usage","description":"Get usage stats for all API keys associated with this email address.","operationId":"subscription_usage_api_v1_billing_subscription__email__usage_get","parameters":[{"name":"email","in":"path","required":true,"schema":{"type":"string","title":"Email"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/revenue":{"get":{"tags":["billing"],"summary":"Revenue Summary","description":"Get revenue summary with MRR, customer counts, and per-tier breakdown.","operationId":"revenue_summary_api_v1_billing_revenue_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/billing/fees/{amount}":{"get":{"tags":["billing"],"summary":"Fee Breakdown","description":"Show Stripe fee breakdown for a given price in cents.","operationId":"fee_breakdown_api_v1_billing_fees__amount__get","parameters":[{"name":"amount","in":"path","required":true,"schema":{"type":"integer","title":"Amount"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/onboard":{"post":{"tags":["onboarding"],"summary":"Onboard Customer","description":"Self-serve onboarding: creates an account, generates API key,\nand returns everything needed to make the first routing call.","operationId":"onboard_customer_api_v1_onboard_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/onboard/tiers":{"get":{"tags":["onboarding"],"summary":"Get Onboarding Tiers","description":"Get available tiers with features for the signup page.","operationId":"get_onboarding_tiers_api_v1_onboard_tiers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/leads":{"get":{"tags":["leads"],"summary":"List Leads","description":"Get all captured leads (admin endpoint).","operationId":"list_leads_api_v1_leads_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["leads"],"summary":"Capture Lead","description":"Capture a lead from the waitlist, demo request, or any source.\nTriggers: instant notification + schedules follow-up sequence.","operationId":"capture_lead_api_v1_leads_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadCapture"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/leads/follow-ups":{"get":{"tags":["leads"],"summary":"Get Pending Follow Ups","description":"Get follow-ups that are due (for manual sending or automation).","operationId":"get_pending_follow_ups_api_v1_leads_follow_ups_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/leads/follow-ups/{follow_up_id}/sent":{"post":{"tags":["leads"],"summary":"Mark Follow Up Sent","description":"Mark a follow-up as sent after you send the email.","operationId":"mark_follow_up_sent_api_v1_leads_follow_ups__follow_up_id__sent_post","parameters":[{"name":"follow_up_id","in":"path","required":true,"schema":{"type":"integer","title":"Follow Up Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/metrics/kpis":{"get":{"tags":["metrics"],"summary":"Get Kpis","description":"Core KPIs for the revenue dashboard.","operationId":"get_kpis_api_v1_metrics_kpis_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/metrics/revenue-timeline":{"get":{"tags":["metrics"],"summary":"Get Revenue Timeline","description":"Last 30 days of REAL daily activity data from the database.","operationId":"get_revenue_timeline_api_v1_metrics_revenue_timeline_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/metrics/unit-economics":{"get":{"tags":["metrics"],"summary":"Get Unit Economics","description":"Per-tier unit economics: margins, LTV, CAC, and profitability.","operationId":"get_unit_economics_api_v1_metrics_unit_economics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/metrics/optimization-tips":{"get":{"tags":["metrics"],"summary":"Get Optimization Tips","description":"Analyze current state and return actionable profit optimization tips.","operationId":"get_optimization_tips_api_v1_metrics_optimization_tips_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/metrics/sla":{"get":{"tags":["metrics"],"summary":"Get Sla Metrics","description":"Fleet uptime, SLA compliance, and incident history.","operationId":"get_sla_metrics_api_v1_metrics_sla_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/metrics/acquisition":{"get":{"tags":["metrics"],"summary":"Get Acquisition Metrics","description":"Acquisition-ready metrics for due diligence.\nALL numbers derived from real database data — zero fabrication.","operationId":"get_acquisition_metrics_api_v1_metrics_acquisition_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/referrals/generate":{"post":{"tags":["referrals"],"summary":"Generate Referral Link","description":"Generate a unique referral link for the given email.\n\nIf the user already has a referral code, the existing one is returned\ninstead of creating a duplicate.","operationId":"generate_referral_link_api_v1_referrals_generate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/referrals/track":{"post":{"tags":["referrals"],"summary":"Track Referral","description":"Record a referral conversion.\n\nAwards the referrer 1 free month of OrbitRoute compute and gives\nthe new user (referee) 20% off their first month.\n\nRaises 404 if the referral code is invalid, and 400 if the referee\nemail was already referred or is the same as the referrer.","operationId":"track_referral_api_v1_referrals_track_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrackRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrackResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/referrals/{email}/stats":{"get":{"tags":["referrals"],"summary":"Get Referral Stats","description":"Return referral statistics for a user.\n\nShows total referrals sent (always 1 link, but conceptually the\nnumber of times the link was shared is unknown — we report\nconversions instead), conversion count, and accumulated credits.","operationId":"get_referral_stats_api_v1_referrals__email__stats_get","parameters":[{"name":"email","in":"path","required":true,"schema":{"type":"string","title":"Email"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferralStats"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/referrals/leaderboard":{"get":{"tags":["referrals"],"summary":"Get Leaderboard","description":"Return the top 10 referrers ranked by conversion count.\n\nTies are broken by earliest referral creation date.","operationId":"get_leaderboard_api_v1_referrals_leaderboard_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/LeaderboardEntry"},"type":"array","title":"Response Get Leaderboard Api V1 Referrals Leaderboard Get"}}}}}}},"/api/v1/analytics/event":{"post":{"tags":["analytics"],"summary":"Track Event","description":"Record a single analytics event.","operationId":"track_event_api_v1_analytics_event_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrackEventRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrackEventResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/analytics/summary":{"get":{"tags":["analytics"],"summary":"Get Analytics Summary","description":"Aggregate event counts for the last 24 h, 7 d, and 30 d,\nplus a conversion funnel from page_view to checkout_completed.","operationId":"get_analytics_summary_api_v1_analytics_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsSummaryResponse"}}}}}}},"/api/v1/analytics/timeline":{"get":{"tags":["analytics"],"summary":"Get Events Timeline","description":"Hourly event counts for the last 24 hours, grouped by event_type.","operationId":"get_events_timeline_api_v1_analytics_timeline_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimelineResponse"}}}}}}},"/api/v1/analytics/growth":{"get":{"tags":["analytics"],"summary":"Get Growth Metrics","description":"- Daily active sessions (last 30 days)\n- Top referrer sources\n- Most clicked buttons\n- Signup sources breakdown","operationId":"get_growth_metrics_api_v1_analytics_growth_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrowthMetricsResponse"}}}}}}},"/api/v1/admin/login":{"post":{"tags":["admin"],"summary":"Admin Login","description":"Exchange the admin key for a short-lived session token (12h, in-memory).\nBrute-force protected: per-IP exponential lockout after repeated failures,\nwith each failure logged to the security_events table.","operationId":"admin_login_api_v1_admin_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminLoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/logout":{"post":{"tags":["admin"],"summary":"Admin Logout","description":"Invalidate the session token presented in X-Admin-Session.","operationId":"admin_logout_api_v1_admin_logout_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/admin/verify":{"get":{"tags":["admin"],"summary":"Verify Admin","description":"Verify admin credentials (session token or legacy key). Used by the\ndashboard login gate to re-validate a saved session.","operationId":"verify_admin_api_v1_admin_verify_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/admin/overview":{"get":{"tags":["admin"],"summary":"Admin Overview","description":"Aggregated snapshot for the admin command center.\nPulls from database so data persists across deploys.","operationId":"admin_overview_api_v1_admin_overview_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/admin/ops":{"get":{"tags":["admin"],"summary":"Admin Ops","description":"Single ops snapshot for the admin Ops tab: engine health with computed\nstaleness, full unresolved alert list, email gate state, automation rules,\npending work counts, and deploy info.","operationId":"admin_ops_api_v1_admin_ops_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/admin/bus/resolve/{event_id}":{"post":{"tags":["admin"],"summary":"Admin Resolve Event","description":"Manually mark a bus alert as resolved from the Ops tab.","operationId":"admin_resolve_event_api_v1_admin_bus_resolve__event_id__post","parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/users":{"get":{"tags":["admin-users"],"summary":"Admin Users","description":"Every customer/key holder with tier, signup, status and usage rollups,\nplus the demo aggregate and the 30-day platform usage series.","operationId":"admin_users_api_v1_admin_users_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/admin/users/{key_hash}":{"get":{"tags":["admin-users"],"summary":"Admin User Detail","description":"Full drill-down for one key holder: identity, usage timeline, jobs\nwith SLA outcomes, subscription, onboarding, and email touchpoints.","operationId":"admin_user_detail_api_v1_admin_users__key_hash__get","parameters":[{"name":"key_hash","in":"path","required":true,"schema":{"type":"string","title":"Key Hash"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/kpis":{"get":{"tags":["admin-users"],"summary":"Admin Kpis","description":"One fast payload for the command-center hero tiles.","operationId":"admin_kpis_api_v1_admin_kpis_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/admin/activity/demo":{"get":{"tags":["admin-users"],"summary":"Admin Demo Activity","description":"Demo/trial funnel: shared-demo-key usage + site analytics events\n(page views, demo requests, waitlist joins, distinct sessions).","operationId":"admin_demo_activity_api_v1_admin_activity_demo_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/jobs/recent":{"get":{"tags":["admin-users"],"summary":"Admin Recent Jobs","description":"Latest jobs with owner + SLA outcome — the ops feed.","operationId":"admin_recent_jobs_api_v1_admin_jobs_recent_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":25,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/signups/recent":{"get":{"tags":["admin-users"],"summary":"Admin Recent Signups","description":"Latest self-serve onboarding sessions.","operationId":"admin_recent_signups_api_v1_admin_signups_recent_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":15,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/federation/overview":{"get":{"tags":["admin-users"],"summary":"Admin Federation Overview","description":"Federation directory with operator contacts (admin-only view).","operationId":"admin_federation_overview_api_v1_admin_federation_overview_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/admin/audit/tiers":{"get":{"tags":["admin-audit"],"summary":"Audit Tiers","description":"The audit-tier catalog (name, price, included sections).","operationId":"audit_tiers_api_v1_admin_audit_tiers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/admin/audit/generate":{"post":{"tags":["admin-audit"],"summary":"Generate Audit","description":"Assemble an audit report. `json` returns the structured payload plus\nthe rendered markdown; `markdown`/`html` return the document directly.","operationId":"generate_audit_api_v1_admin_audit_generate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/investment/overview":{"get":{"tags":["admin-investment"],"summary":"Investment Overview","description":"Everything about the raise in one payload.","operationId":"investment_overview_api_v1_admin_investment_overview_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/admin/investment/checklist/{item_key}":{"post":{"tags":["admin-investment"],"summary":"Toggle Checklist","description":"Check/uncheck a get-investment task (persisted).","operationId":"toggle_checklist_api_v1_admin_investment_checklist__item_key__post","parameters":[{"name":"item_key","in":"path","required":true,"schema":{"type":"string","title":"Item Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChecklistToggle"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/investment/materials/{key}":{"get":{"tags":["admin-investment"],"summary":"Download Material","description":"Download an investor material file (deck, memo, spec, fact base).","operationId":"download_material_api_v1_admin_investment_materials__key__get","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/leadfinder/state":{"get":{"tags":["admin-leadfinder"],"summary":"Leadfinder State","description":"Engine status + prospect counts. outreach_enabled is always False in v1.","operationId":"leadfinder_state_api_v1_admin_leadfinder_state_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/admin/leadfinder/prospects":{"get":{"tags":["admin-leadfinder"],"summary":"List Prospects","description":"Discovered prospects (optionally filtered by status).","operationId":"list_prospects_api_v1_admin_leadfinder_prospects_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/leadfinder/companies":{"get":{"tags":["admin-leadfinder"],"summary":"List Companies","description":"The target-company registry the engine works through.","operationId":"list_companies_api_v1_admin_leadfinder_companies_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["admin-leadfinder"],"summary":"Add Company","description":"Add (or update) a target company. The engine scans it on the next cycle.","operationId":"add_company_api_v1_admin_leadfinder_companies_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routers__admin_leadfinder__CompanyIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/leadfinder/prospects/{lead_id}/review":{"post":{"tags":["admin-leadfinder"],"summary":"Review Prospect","description":"Approve/reject a discovered prospect. Never triggers a send.","operationId":"review_prospect_api_v1_admin_leadfinder_prospects__lead_id__review_post","parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"integer","title":"Lead Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/leadfinder/scan":{"post":{"tags":["admin-leadfinder"],"summary":"Scan Now","description":"Run one discovery cycle immediately (discovery only — no sending).","operationId":"scan_now_api_v1_admin_leadfinder_scan_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/admin/crm/pipeline":{"get":{"tags":["admin-crm"],"summary":"Crm Pipeline","description":"Full pipeline + funnel summary. Conversion counts come from real\nsubscription/api-key records, not from the stage field.","operationId":"crm_pipeline_api_v1_admin_crm_pipeline_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/admin/crm/followups":{"get":{"tags":["admin-crm"],"summary":"Crm Followups","description":"Accounts with a next-action date: overdue vs upcoming. The operator's\ndaily to-do list.","operationId":"crm_followups_api_v1_admin_crm_followups_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/admin/crm/company/{company_id}":{"get":{"tags":["admin-crm"],"summary":"Crm Company","operationId":"crm_company_api_v1_admin_crm_company__company_id__get","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","title":"Company Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["admin-crm"],"summary":"Crm Update Company","operationId":"crm_update_company_api_v1_admin_crm_company__company_id__patch","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","title":"Company Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin-crm"],"summary":"Crm Delete Company","operationId":"crm_delete_company_api_v1_admin_crm_company__company_id__delete","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","title":"Company Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/crm/company":{"post":{"tags":["admin-crm"],"summary":"Crm Add Company","description":"Add or update an account (idempotent on name; preserves human progress).","operationId":"crm_add_company_api_v1_admin_crm_company_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routers__admin_crm__CompanyIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/crm/company/{company_id}/stage":{"post":{"tags":["admin-crm"],"summary":"Crm Set Stage","operationId":"crm_set_stage_api_v1_admin_crm_company__company_id__stage_post","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","title":"Company Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StageIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/crm/company/{company_id}/activity":{"post":{"tags":["admin-crm"],"summary":"Crm Log Activity","description":"Log a touch (note / email_logged / call / meeting / task). Records only —\nnever sends anything.","operationId":"crm_log_activity_api_v1_admin_crm_company__company_id__activity_post","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","title":"Company Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/crm/seed":{"post":{"tags":["admin-crm"],"summary":"Crm Seed","description":"Bulk idempotent seed of the target-company list (WS2). Safe to re-run —\npreserves any account the operator has already advanced.","operationId":"crm_seed_api_v1_admin_crm_seed_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SeedIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/manage/overview":{"get":{"tags":["admin-manage"],"summary":"Manage Overview","description":"Everything the console needs in one payload.","operationId":"manage_overview_api_v1_admin_manage_overview_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/admin/manage/flags/{key}":{"post":{"tags":["admin-manage"],"summary":"Set Flag","description":"Toggle a runtime feature flag — takes effect on the next engine cycle.","operationId":"set_flag_api_v1_admin_manage_flags__key__post","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlagBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/manage/db-stats":{"get":{"tags":["admin-manage"],"summary":"Db Stats","description":"Live row counts per key table — the data-health view.","operationId":"db_stats_api_v1_admin_manage_db_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/admin/manage/engines":{"get":{"tags":["admin-manage"],"summary":"Engine Pause Status","description":"Pause state of every pausable engine.","operationId":"engine_pause_status_api_v1_admin_manage_engines_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/admin/manage/engines/{key}/pause":{"post":{"tags":["admin-manage"],"summary":"Set Engine Pause","description":"Pause or resume a background engine — the loop honours it next cycle.","operationId":"set_engine_pause_api_v1_admin_manage_engines__key__pause_post","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PauseBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/manage/export/{table}":{"get":{"tags":["admin-manage"],"summary":"Export Table","description":"Download an allowlisted table as JSON or CSV.","operationId":"export_table_api_v1_admin_manage_export__table__get","parameters":[{"name":"table","in":"path","required":true,"schema":{"type":"string","title":"Table"}},{"name":"fmt","in":"query","required":false,"schema":{"type":"string","default":"json","title":"Fmt"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/manage/activity":{"get":{"tags":["admin-manage"],"summary":"Activity","description":"Recent system activity merged from the engine bus, audit log, security\nevents, and automation log — one newest-first stream.","operationId":"activity_api_v1_admin_manage_activity_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":60,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/manage/config-health":{"get":{"tags":["admin-manage"],"summary":"Config Health","description":"Which expected env vars are set — names + set/unset only, never values.","operationId":"config_health_api_v1_admin_manage_config_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/admin/manage/keys":{"get":{"tags":["admin-manage"],"summary":"List Keys","description":"All API keys with tier/limit/active/created (never the raw secret).","operationId":"list_keys_api_v1_admin_manage_keys_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["admin-manage"],"summary":"Create Key","description":"Mint a new API key — the raw secret is returned ONCE, here only.","operationId":"create_key_api_v1_admin_manage_keys_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewKey"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/manage/keys/{key_hash}/revoke":{"post":{"tags":["admin-manage"],"summary":"Revoke Key","operationId":"revoke_key_api_v1_admin_manage_keys__key_hash__revoke_post","parameters":[{"name":"key_hash","in":"path","required":true,"schema":{"type":"string","title":"Key Hash"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/manage/keys/{key_hash}/reactivate":{"post":{"tags":["admin-manage"],"summary":"Reactivate Key","operationId":"reactivate_key_api_v1_admin_manage_keys__key_hash__reactivate_post","parameters":[{"name":"key_hash","in":"path","required":true,"schema":{"type":"string","title":"Key Hash"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/manage/keys/{key_hash}/limit":{"post":{"tags":["admin-manage"],"summary":"Set Key Limit","operationId":"set_key_limit_api_v1_admin_manage_keys__key_hash__limit_post","parameters":[{"name":"key_hash","in":"path","required":true,"schema":{"type":"string","title":"Key Hash"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyLimit"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/manage/actions/{action}":{"post":{"tags":["admin-manage"],"summary":"Run Action","description":"Trigger a real engine cycle / maintenance action on demand.","operationId":"run_action_api_v1_admin_manage_actions__action__post","parameters":[{"name":"action","in":"path","required":true,"schema":{"type":"string","title":"Action"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/manage/purge-synthetic":{"post":{"tags":["admin-manage"],"summary":"Purge Synthetic","description":"Delete ONLY internal synthetic-load jobs + their SLA/routing rows\n(regenerable internal test data — never touches customer jobs).","operationId":"purge_synthetic_api_v1_admin_manage_purge_synthetic_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/engines/overview":{"get":{"tags":["engines"],"summary":"Engines Overview","description":"Summary of all 12 engines — one key metric each.","operationId":"engines_overview_api_v1_engines_overview_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/engines/synthetic-load":{"get":{"tags":["engines"],"summary":"Get Synthetic Load","description":"Synthetic-load engine state — internal jobs that keep the flywheel fed.","operationId":"get_synthetic_load_api_v1_engines_synthetic_load_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/engines/moat":{"get":{"tags":["engines"],"summary":"Get Moat","description":"Full competitive moat state.","operationId":"get_moat_api_v1_engines_moat_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/engines/ip":{"get":{"tags":["engines"],"summary":"Get Ip","description":"Full IP portfolio state.","operationId":"get_ip_api_v1_engines_ip_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/engines/network":{"get":{"tags":["engines"],"summary":"Get Network","description":"Full network effect state.","operationId":"get_network_api_v1_engines_network_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/engines/learning":{"get":{"tags":["engines"],"summary":"Get Learning","description":"Full learning engine state.","operationId":"get_learning_api_v1_engines_learning_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/engines/upgrade":{"get":{"tags":["engines"],"summary":"Get Upgrade","description":"Full upgrade engine state.","operationId":"get_upgrade_api_v1_engines_upgrade_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/engines/validity":{"get":{"tags":["engines"],"summary":"Get Validity","description":"Full validity engine state.","operationId":"get_validity_api_v1_engines_validity_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/engines/real-data":{"get":{"tags":["engines"],"summary":"Get Real Data","description":"Full real data engine state.","operationId":"get_real_data_api_v1_engines_real_data_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/engines/revenue":{"get":{"tags":["engines"],"summary":"Get Revenue","description":"Full revenue engine state — MRR, pipeline, upsells, churn, forecast.","operationId":"get_revenue_api_v1_engines_revenue_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/engines/bus":{"get":{"tags":["engines"],"summary":"Get Bus","description":"Cross-engine event bus — events, signals, collaboration chains, and stats.","operationId":"get_bus_api_v1_engines_bus_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/engines/ip/drafts":{"get":{"tags":["engines"],"summary":"Get Ip Drafts","description":"Patent draft pipeline — all auto-generated patent applications.","operationId":"get_ip_drafts_api_v1_engines_ip_drafts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/engines/ip/filings":{"get":{"tags":["engines"],"summary":"Get Ip Filings","description":"Patent filing records and deadlines.","operationId":"get_ip_filings_api_v1_engines_ip_filings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/engines/ip/approve/{invention_id}":{"post":{"tags":["engines"],"summary":"Approve Patent Draft","description":"Manually approve a patent draft — skips the 48h auto-approve timeout.","operationId":"approve_patent_draft_api_v1_engines_ip_approve__invention_id__post","parameters":[{"name":"invention_id","in":"path","required":true,"schema":{"type":"string","title":"Invention Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/engines/moat/actions":{"get":{"tags":["engines"],"summary":"Get Moat Defense Actions","description":"Defensive actions taken by the Moat Engine + competitive alerts.","operationId":"get_moat_defense_actions_api_v1_engines_moat_actions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/engines/email":{"get":{"tags":["engines"],"summary":"Get Email","description":"Full email engine state — personality, analytics, drafts.","operationId":"get_email_api_v1_engines_email_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/engines/email/status":{"get":{"tags":["engines"],"summary":"Get Email Service Status","description":"Email service + send-gate status — the honest picture of what can send.\n\nTwo separate gates, both surfaced so the owner has full visibility:\n- the SERVICE gate (can any email leave at all): RESEND_API_KEY +\n  ENABLE_EMAILS + the DISABLE_EMAILS hard kill-switch.\n- the AUTONOMOUS gate (does the automation engine send unattended):\n  AUTONOMOUS_EMAIL_SEND, off by default.","operationId":"get_email_service_status_api_v1_engines_email_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/engines/email/inbox":{"get":{"tags":["engines"],"summary":"Get Email Inbox","description":"Email history — all sent/received, filterable by lead.","operationId":"get_email_inbox_api_v1_engines_email_inbox_get","parameters":[{"name":"lead_email","in":"query","required":false,"schema":{"type":"string","title":"Lead Email"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/engines/email/drafts":{"get":{"tags":["engines"],"summary":"Get Email Drafts Endpoint","description":"Pending auto-drafted emails awaiting owner review.","operationId":"get_email_drafts_endpoint_api_v1_engines_email_drafts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/engines/email/drafts/{draft_id}/approve":{"post":{"tags":["engines"],"summary":"Approve Email Draft","description":"Owner approval — the per-email send confirmation. Marks the draft\napproved, then immediately tries to dispatch it through the service\ngates; when the gates are closed it stays visibly queued as approved.","operationId":"approve_email_draft_api_v1_engines_email_drafts__draft_id__approve_post","parameters":[{"name":"draft_id","in":"path","required":true,"schema":{"type":"integer","title":"Draft Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/engines/email/drafts/approve-bulk":{"post":{"tags":["engines"],"summary":"Approve Email Drafts Bulk","description":"Approve several reviewed drafts in one action, then dispatch them.\nEach id is still an individual approval — invalid ids are reported,\nnever silently sent.","operationId":"approve_email_drafts_bulk_api_v1_engines_email_drafts_approve_bulk_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body","default":{}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/engines/email/drafts/{draft_id}/reject":{"post":{"tags":["engines"],"summary":"Reject Email Draft","description":"Reject a draft (also puts the address on the 30-day engine cool-off).","operationId":"reject_email_draft_api_v1_engines_email_drafts__draft_id__reject_post","parameters":[{"name":"draft_id","in":"path","required":true,"schema":{"type":"integer","title":"Draft Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/engines/email/drafts/{draft_id}/requeue":{"post":{"tags":["engines"],"summary":"Requeue Email Draft","description":"Undo a dismissal — pull a rejected/archived (or send-failed) draft\nback into the review queue as pending.","operationId":"requeue_email_draft_api_v1_engines_email_drafts__draft_id__requeue_post","parameters":[{"name":"draft_id","in":"path","required":true,"schema":{"type":"integer","title":"Draft Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/engines/email/drafts/{draft_id}/edit":{"post":{"tags":["engines"],"summary":"Edit Email Draft","description":"Edit a draft before sending — edits feed into personality learning.","operationId":"edit_email_draft_api_v1_engines_email_drafts__draft_id__edit_post","parameters":[{"name":"draft_id","in":"path","required":true,"schema":{"type":"integer","title":"Draft Id"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"default":{},"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/engines/email/compose":{"post":{"tags":["engines"],"summary":"Compose Email","description":"Manually compose and send an email from the dashboard.","operationId":"compose_email_api_v1_engines_email_compose_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body","default":{}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/engines/email/reset":{"post":{"tags":["engines"],"summary":"Reset Email Queues","description":"START FRESH — owner reset of everything waiting to be emailed.\n\nSoft-cancels every scheduled-but-unsent follow-up and archives every\npending/approved draft (rows preserved, nothing deleted). Defaults to a\ndry run; pass {\"dry_run\": false} to execute.","operationId":"reset_email_queues_api_v1_engines_email_reset_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body","default":{}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/engines/email/outreach/generate":{"post":{"tags":["engines"],"summary":"Generate Outreach Drafts","description":"Materialize the CRM target list into reviewable outreach drafts.\n\nOne draft per open-stage company that has a tailored outreach_message and\na contact address (buyer_email, else signup_email). Never sends — drafts\nland in the approval queue. Idempotent: an address with a live\n(pending/approved) draft or an already-sent outbound email is skipped.","operationId":"generate_outreach_drafts_api_v1_engines_email_outreach_generate_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body","default":{}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/engines/email/dispatch-approved":{"post":{"tags":["engines"],"summary":"Dispatch Approved Now","description":"Explicitly flush the approved queue through the service gates — the\nowner's manual 'send approved now' action (also runs unattended each\nscheduler cycle when autonomous_email_send is armed).","operationId":"dispatch_approved_now_api_v1_engines_email_dispatch_approved_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body","default":{}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/engines/email/outbox":{"get":{"tags":["engines"],"summary":"Get Email Outbox","description":"The full outreach-queue picture for the Email tab: what's awaiting\nreview, what's approved and waiting on the gates, what failed, what\nwent out, plus scheduled-follow-up counts and CRM accounts that still\nneed a contact address.","operationId":"get_email_outbox_api_v1_engines_email_outbox_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/engines/email/sequences":{"get":{"tags":["engines"],"summary":"Get Email Sequences","description":"The scheduled outreach sequence — every follow-up (2nd/3rd emails),\nwith stage, target, subject, template, send time, and sent status.","operationId":"get_email_sequences_api_v1_engines_email_sequences_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/engines/email/templates":{"get":{"tags":["engines"],"summary":"Get Email Templates Endpoint","description":"Render each outreach template so the owner can see exactly what the\nwelcome / follow-up / call-booking emails look like before any send.","operationId":"get_email_templates_endpoint_api_v1_engines_email_templates_get","parameters":[{"name":"name","in":"query","required":false,"schema":{"type":"string","default":"","title":"Name"}},{"name":"company","in":"query","required":false,"schema":{"type":"string","default":"","title":"Company"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/engines/email/sequences/{follow_up_id}/mark-sent":{"post":{"tags":["engines"],"summary":"Mark Sequence Sent","description":"Manually mark a scheduled follow-up as sent (owner sent it by hand).","operationId":"mark_sequence_sent_api_v1_engines_email_sequences__follow_up_id__mark_sent_post","parameters":[{"name":"follow_up_id","in":"path","required":true,"schema":{"type":"integer","title":"Follow Up Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/engines/email/personality":{"get":{"tags":["engines"],"summary":"Get Personality","description":"Current AI personality profile with traits and confidence.","operationId":"get_personality_api_v1_engines_email_personality_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/engines/email/analytics":{"get":{"tags":["engines"],"summary":"Get Email Analytics Endpoint","description":"Email engagement analytics over time.","operationId":"get_email_analytics_endpoint_api_v1_engines_email_analytics_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/engines/email/lead/{lead_email}":{"get":{"tags":["engines"],"summary":"Get Lead Email History","description":"Full email thread for a specific lead.","operationId":"get_lead_email_history_api_v1_engines_email_lead__lead_email__get","parameters":[{"name":"lead_email","in":"path","required":true,"schema":{"type":"string","title":"Lead Email"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/engines/safety":{"get":{"tags":["engines"],"summary":"Get Safety","description":"Full safety engine state — threats, score, audit, bus monitoring.","operationId":"get_safety_api_v1_engines_safety_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/engines/safety/events":{"get":{"tags":["engines"],"summary":"Get Security Events Endpoint","description":"Security event log.","operationId":"get_security_events_endpoint_api_v1_engines_safety_events_get","parameters":[{"name":"severity","in":"query","required":false,"schema":{"type":"string","title":"Severity"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/engines/safety/blocked":{"get":{"tags":["engines"],"summary":"Get Blocked Ips Endpoint","description":"Currently blocked IPs.","operationId":"get_blocked_ips_endpoint_api_v1_engines_safety_blocked_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/engines/safety/block-ip":{"post":{"tags":["engines"],"summary":"Block Ip Endpoint","description":"Manually block an IP address.","operationId":"block_ip_endpoint_api_v1_engines_safety_block_ip_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body","default":{}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/engines/safety/unblock-ip":{"post":{"tags":["engines"],"summary":"Unblock Ip Endpoint","description":"Manually unblock an IP address.","operationId":"unblock_ip_endpoint_api_v1_engines_safety_unblock_ip_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body","default":{}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/engines/safety/audit":{"get":{"tags":["engines"],"summary":"Get Audit Log Endpoint","description":"Audit log of all significant system actions.","operationId":"get_audit_log_endpoint_api_v1_engines_safety_audit_get","parameters":[{"name":"risk_level","in":"query","required":false,"schema":{"type":"string","title":"Risk Level"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/engines/safety/scans":{"get":{"tags":["engines"],"summary":"Get Security Scans Endpoint","description":"Recent security scan results.","operationId":"get_security_scans_endpoint_api_v1_engines_safety_scans_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/engines/automation":{"get":{"tags":["engines"],"summary":"Get Automation","description":"Full automation engine state — acquisition score, cycle stats, rules.","operationId":"get_automation_api_v1_engines_automation_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/engines/automation/log":{"get":{"tags":["engines"],"summary":"Get Automation Log Endpoint","description":"Recent automation actions with optional type filter.","operationId":"get_automation_log_endpoint_api_v1_engines_automation_log_get","parameters":[{"name":"action_type","in":"query","required":false,"schema":{"type":"string","title":"Action Type"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/engines/automation/acquisition":{"get":{"tags":["engines"],"summary":"Get Acquisition Readiness","description":"Detailed acquisition readiness score with 7-dimension breakdown.","operationId":"get_acquisition_readiness_api_v1_engines_automation_acquisition_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/engines/automation/rules":{"get":{"tags":["engines"],"summary":"Get Automation Rules","description":"All configurable automation rules.","operationId":"get_automation_rules_api_v1_engines_automation_rules_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["engines"],"summary":"Update Automation Rule","description":"Update an automation rule — enable/disable or change thresholds.","operationId":"update_automation_rule_api_v1_engines_automation_rules_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body","default":{}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/engines/credibility":{"get":{"tags":["engines"],"summary":"Get Credibility","description":"Public credibility snapshot — proof points, scores, engine status.\nThis endpoint is intentionally public (no auth) — it powers the pitch page.","operationId":"get_credibility_api_v1_engines_credibility_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/engines/revenue/dashboard":{"get":{"tags":["engines"],"summary":"Revenue Dashboard","description":"Full revenue dashboard data — MRR, ARR, subscribers, funnel, auto-emails.","operationId":"revenue_dashboard_api_v1_engines_revenue_dashboard_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/engines/leads/funnel":{"get":{"tags":["engines"],"summary":"Lead Funnel","description":"Lead funnel metrics — new, contacted, qualified, converted.","operationId":"lead_funnel_api_v1_engines_leads_funnel_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/engines/email/inbound":{"get":{"tags":["engines"],"summary":"Get Inbound Emails","description":"Get recent inbound emails with processing status.","operationId":"get_inbound_emails_api_v1_engines_email_inbound_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/engines/email/threads/{lead_email}":{"get":{"tags":["engines"],"summary":"Get Email Thread","description":"Get full conversation thread with a specific lead.","operationId":"get_email_thread_api_v1_engines_email_threads__lead_email__get","parameters":[{"name":"lead_email","in":"path","required":true,"schema":{"type":"string","title":"Lead Email"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/webhooks/email/inbound":{"post":{"tags":["webhooks"],"summary":"Handle Inbound Email","description":"Receive inbound emails from Resend webhook.\n\nResend sends an event envelope:\n{\n    \"type\": \"email.received\",\n    \"created_at\": \"...\",\n    \"data\": {\n        \"from\": \"sender@example.com\",\n        \"to\": \"inbox@orbitroute.ai\",\n        \"subject\": \"Re: Welcome to OrbitRoute\",\n        \"text\": \"plain text body\",\n        \"html\": \"<html>...</html>\",\n        \"headers\": {\"Message-ID\": \"...\", \"In-Reply-To\": \"...\"}\n    }\n}\n\nReturns 200 immediately (Resend requires fast response).","operationId":"handle_inbound_email_api_v1_webhooks_email_inbound_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/health":{"get":{"summary":"Health Check","description":"Lightweight healthcheck — no DB or TLE dependency. Responds instantly.","operationId":"health_check_api_v1_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/":{"get":{"summary":"Landing Page","description":"Serve the landing page HTML, or fall back to JSON info if not built.","operationId":"landing_page__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/sitemap.xml":{"get":{"summary":"Sitemap","description":"Serve sitemap for SEO.","operationId":"sitemap_sitemap_xml_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/robots.txt":{"get":{"summary":"Robots","description":"Serve robots.txt for SEO.","operationId":"robots_robots_txt_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/dashboard":{"get":{"summary":"Dashboard Redirect","description":"Redirect legacy /dashboard to /admin command center.","operationId":"dashboard_redirect_dashboard_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/dashboard/{full_path}":{"get":{"summary":"Dashboard Spa Redirect","description":"Redirect legacy /dashboard/* to /admin command center.","operationId":"dashboard_spa_redirect_dashboard__full_path__get","parameters":[{"name":"full_path","in":"path","required":true,"schema":{"type":"string","title":"Full Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/legal/terms.html":{"get":{"summary":"Terms Of Service","description":"Serve the Terms of Service page.","operationId":"terms_of_service_legal_terms_html_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/legal/terms":{"get":{"summary":"Terms Of Service","description":"Serve the Terms of Service page.","operationId":"terms_of_service_legal_terms_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/legal/privacy.html":{"get":{"summary":"Privacy Policy","description":"Serve the Privacy Policy page.","operationId":"privacy_policy_legal_privacy_html_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/legal/privacy":{"get":{"summary":"Privacy Policy","description":"Serve the Privacy Policy page.","operationId":"privacy_policy_legal_privacy_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/portal":{"get":{"summary":"Customer Portal","description":"Serve the customer portal (subscription management, billing).","operationId":"customer_portal_portal_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin":{"get":{"summary":"Admin Dashboard","description":"Serve the private admin command center (auth handled client-side).","operationId":"admin_dashboard_admin_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/signup/":{"get":{"summary":"Signup Page","description":"Self-serve signup — issues an API key via /api/v1/onboard.","operationId":"signup_page_signup__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/signup":{"get":{"summary":"Signup Page","description":"Self-serve signup — issues an API key via /api/v1/onboard.","operationId":"signup_page_signup_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/docs/":{"get":{"summary":"Docs Page","description":"Branded developer docs hub (quickstarts, auth, reference links).","operationId":"docs_page_docs__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/docs":{"get":{"summary":"Docs Page","description":"Branded developer docs hub (quickstarts, auth, reference links).","operationId":"docs_page_docs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/sla/":{"get":{"summary":"Sla Page","description":"Public SLA scoreboard — predicted-vs-actual grading, live.","operationId":"sla_page_sla__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/sla":{"get":{"summary":"Sla Page","description":"Public SLA scoreboard — predicted-vs-actual grading, live.","operationId":"sla_page_sla_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/status/":{"get":{"summary":"Status Page","description":"Public system-status page — live checks against production endpoints.","operationId":"status_page_status__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/status":{"get":{"summary":"Status Page","description":"Public system-status page — live checks against production endpoints.","operationId":"status_page_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/pricing/":{"get":{"summary":"Pricing Page","description":"Serve the standalone pricing page.","operationId":"pricing_page_pricing__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/pricing":{"get":{"summary":"Pricing Page","description":"Serve the standalone pricing page.","operationId":"pricing_page_pricing_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/pitch/":{"get":{"summary":"Pitch Page","description":"Serve the public pitch / capabilities page — powered by Credibility Engine.","operationId":"pitch_page_pitch__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/pitch":{"get":{"summary":"Pitch Page","description":"Serve the public pitch / capabilities page — powered by Credibility Engine.","operationId":"pitch_page_pitch_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/optimize/":{"get":{"summary":"Optimize Page","description":"Serve the OrbitRoute Optimize consulting / revenue landing page.","operationId":"optimize_page_optimize__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/optimize":{"get":{"summary":"Optimize Page","description":"Serve the OrbitRoute Optimize consulting / revenue landing page.","operationId":"optimize_page_optimize_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/viz":{"get":{"summary":"Viz Globe","description":"Serve the orbital visualization / network globe.","operationId":"viz_globe_viz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/viz/{full_path}":{"get":{"summary":"Viz Assets","description":"Serve visualization static assets (JS, CSS, textures).","operationId":"viz_assets_viz__full_path__get","parameters":[{"name":"full_path","in":"path","required":true,"schema":{"type":"string","title":"Full Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"ActivityIn":{"properties":{"kind":{"type":"string","title":"Kind","default":"note"},"detail":{"type":"string","minLength":1,"title":"Detail"}},"type":"object","required":["detail"],"title":"ActivityIn"},"AdminLoginRequest":{"properties":{"admin_key":{"type":"string","title":"Admin Key"}},"type":"object","required":["admin_key"],"title":"AdminLoginRequest"},"AnalyticsSummaryResponse":{"properties":{"event_counts":{"additionalProperties":{"$ref":"#/components/schemas/EventCountsByPeriod"},"type":"object","title":"Event Counts"},"funnel":{"items":{"$ref":"#/components/schemas/FunnelStep"},"type":"array","title":"Funnel"}},"type":"object","required":["event_counts","funnel"],"title":"AnalyticsSummaryResponse"},"AuditRequest":{"properties":{"tier":{"type":"string","title":"Tier","description":"snapshot | deep_dive | enterprise"},"client_name":{"type":"string","title":"Client Name","description":"Name on the report; defaults to the key owner","default":""},"key_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key Hash","description":"Customer API-key hash — omit for prospect mode"},"workload":{"anyOf":[{"$ref":"#/components/schemas/WorkloadOverrides"},{"type":"null"}]},"format":{"type":"string","title":"Format","description":"json | markdown | html","default":"json"}},"type":"object","required":["tier"],"title":"AuditRequest"},"CapabilityAdvertisement":{"properties":{"node_id":{"type":"string","minLength":2,"title":"Node Id","description":"Operator-scoped node identifier"},"name":{"type":"string","title":"Name","description":"Display name","default":""},"norad_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Norad Id","description":"NORAD catalog id (if publicly tracked)"},"tle_line1":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tle Line1","description":"TLE line 1 (operator-supplied ephemeris)"},"tle_line2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tle Line2","description":"TLE line 2"},"gpu_type":{"type":"string","title":"Gpu Type","default":"H100"},"gpu_count":{"type":"integer","minimum":1.0,"title":"Gpu Count","default":4},"power_budget_w":{"type":"number","minimum":0.0,"title":"Power Budget W","description":"Solar-derived power budget (W)","default":8000},"battery_fraction":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Battery Fraction","description":"Fraction of power budget available in eclipse","default":0.6},"thermal_margin_c":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Thermal Margin C","description":"Current thermal headroom (°C)"},"storage_gb":{"type":"number","minimum":0.0,"title":"Storage Gb","default":0},"supported_runtimes":{"items":{"type":"string"},"type":"array","title":"Supported Runtimes"},"isl_neighbors":{"items":{"type":"string"},"type":"array","title":"Isl Neighbors","description":"Node ids reachable over inter-satellite links"},"jurisdiction":{"type":"string","title":"Jurisdiction","default":"US"},"price_usd_per_gpu_hr":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Price Usd Per Gpu Hr","description":"Advertised price; unset = platform default"},"attestation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Attestation","description":"Execution-environment attestation evidence (opaque)"}},"type":"object","required":["node_id"],"title":"CapabilityAdvertisement","description":"Normalized capability advertisement for one orbital compute node.\nThis is the federation protocol's core message: operators describe the\nphysical and commercial state of a node; the scheduler routes against it."},"ChecklistToggle":{"properties":{"done":{"type":"boolean","title":"Done"}},"type":"object","required":["done"],"title":"ChecklistToggle"},"CheckoutRequest":{"properties":{"email":{"type":"string","title":"Email"},"tier":{"type":"string","title":"Tier","default":"starter"},"success_url":{"type":"string","title":"Success Url","default":"https://www.orbitroute.ai/pitch?subscribed=true"},"cancel_url":{"type":"string","title":"Cancel Url","default":"https://www.orbitroute.ai/pricing"}},"type":"object","required":["email"],"title":"CheckoutRequest"},"CompanyPatch":{"properties":{"buyer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Buyer Name"},"buyer_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Buyer Title"},"buyer_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Buyer Email"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"next_action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Action"},"next_action_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Action Date"},"signup_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signup Email"},"est_mrr":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Est Mrr"},"segment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Segment"},"priority":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Priority"},"outreach_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outreach Message"},"why_relevant":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Why Relevant"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain"}},"type":"object","title":"CompanyPatch"},"ComputeTarget":{"type":"string","enum":["orbital","terrestrial_aws","terrestrial_gcp","terrestrial_azure","edge"],"title":"ComputeTarget"},"CostComparison":{"properties":{"orbital_cost_usd":{"type":"number","title":"Orbital Cost Usd"},"aws_cost_usd":{"type":"number","title":"Aws Cost Usd"},"gcp_cost_usd":{"type":"number","title":"Gcp Cost Usd"},"azure_cost_usd":{"type":"number","title":"Azure Cost Usd"},"savings_pct":{"type":"number","title":"Savings Pct"},"recommendation":{"type":"string","title":"Recommendation"}},"type":"object","required":["orbital_cost_usd","aws_cost_usd","gcp_cost_usd","azure_cost_usd","savings_pct","recommendation"],"title":"CostComparison"},"CreateKeyRequest":{"properties":{"owner":{"type":"string","title":"Owner"},"tier":{"type":"string","title":"Tier","default":"starter"}},"type":"object","required":["owner"],"title":"CreateKeyRequest"},"EventCountsByPeriod":{"properties":{"last_24h":{"type":"integer","title":"Last 24H","default":0},"last_7d":{"type":"integer","title":"Last 7D","default":0},"last_30d":{"type":"integer","title":"Last 30D","default":0}},"type":"object","title":"EventCountsByPeriod"},"EventType":{"type":"string","enum":["page_view","button_click","form_submit","checkout_started","checkout_completed","demo_requested","waitlist_joined","referral_shared","api_key_generated","dashboard_viewed"],"title":"EventType"},"FederatedNode":{"properties":{"node_id":{"type":"string","title":"Node Id"},"operator_id":{"type":"string","title":"Operator Id"},"operator_name":{"type":"string","title":"Operator Name","default":""},"name":{"type":"string","title":"Name","default":""},"norad_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Norad Id"},"gpu_type":{"type":"string","title":"Gpu Type","default":"H100"},"gpu_count":{"type":"integer","title":"Gpu Count","default":4},"power_budget_w":{"type":"number","title":"Power Budget W","default":0},"battery_fraction":{"type":"number","title":"Battery Fraction","default":0.6},"storage_gb":{"type":"number","title":"Storage Gb","default":0},"supported_runtimes":{"items":{"type":"string"},"type":"array","title":"Supported Runtimes","default":[]},"isl_neighbors":{"items":{"type":"string"},"type":"array","title":"Isl Neighbors","default":[]},"jurisdiction":{"type":"string","title":"Jurisdiction","default":"US"},"price_usd_per_gpu_hr":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price Usd Per Gpu Hr"},"has_attestation":{"type":"boolean","title":"Has Attestation","default":false},"status":{"type":"string","title":"Status","default":"active"},"routable":{"type":"boolean","title":"Routable","default":false},"advertised_at":{"type":"string","title":"Advertised At","default":""},"position":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Position"},"sunlit":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Sunlit"}},"type":"object","required":["node_id","operator_id"],"title":"FederatedNode","description":"Public directory view of an advertised node."},"FlagBody":{"properties":{"enabled":{"type":"boolean","title":"Enabled"}},"type":"object","required":["enabled"],"title":"FlagBody"},"FunnelStep":{"properties":{"step":{"type":"string","title":"Step"},"count":{"type":"integer","title":"Count"},"conversion_rate":{"type":"number","title":"Conversion Rate","description":"Percentage of users reaching this step relative to the first step"}},"type":"object","required":["step","count","conversion_rate"],"title":"FunnelStep"},"GenerateRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"GenerateRequest","description":"Request body for generating a referral link."},"GenerateResponse":{"properties":{"referral_code":{"type":"string","title":"Referral Code"},"referral_link":{"type":"string","title":"Referral Link"},"message":{"type":"string","title":"Message"}},"type":"object","required":["referral_code","referral_link","message"],"title":"GenerateResponse","description":"Response after successfully creating a referral link."},"GrowthMetricsResponse":{"properties":{"daily_active_sessions":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Daily Active Sessions"},"top_referrers":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Top Referrers"},"most_clicked_buttons":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Most Clicked Buttons"},"signup_sources":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Signup Sources"}},"type":"object","required":["daily_active_sessions","top_referrers","most_clicked_buttons","signup_sources"],"title":"GrowthMetricsResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"JobRecord":{"properties":{"job_id":{"type":"string","title":"Job Id"},"status":{"$ref":"#/components/schemas/JobStatus"},"target":{"type":"string","title":"Target"},"target_name":{"type":"string","title":"Target Name","default":""},"asset_id":{"type":"string","title":"Asset Id","default":""},"gpu_type":{"type":"string","title":"Gpu Type","default":"H100"},"model_name":{"type":"string","title":"Model Name","default":""},"priority":{"type":"string","title":"Priority","default":"medium"},"station_name":{"type":"string","title":"Station Name","default":""},"scheduled_start":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scheduled Start"},"scheduled_end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scheduled End"},"deadline_utc":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deadline Utc"},"predicted_latency_ms":{"type":"number","title":"Predicted Latency Ms","default":0},"predicted_cost_usd":{"type":"number","title":"Predicted Cost Usd","default":0},"actual_latency_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Actual Latency Ms"},"actual_cost_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Actual Cost Usd"},"submitted_at":{"type":"string","title":"Submitted At"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At"},"failure_reason":{"type":"string","title":"Failure Reason","default":""},"remediation":{"type":"string","title":"Remediation","default":""}},"type":"object","required":["job_id","status","target","submitted_at"],"title":"JobRecord","description":"Public job lifecycle view returned by the jobs API."},"JobStatus":{"type":"string","enum":["queued","scheduled","dispatched","running","completed","failed","cancelled"],"title":"JobStatus"},"JobType":{"type":"string","enum":["inference","training","batch"],"title":"JobType"},"KeyLimit":{"properties":{"daily_limit":{"type":"integer","title":"Daily Limit"}},"type":"object","required":["daily_limit"],"title":"KeyLimit"},"LeadCapture":{"properties":{"email":{"type":"string","title":"Email"},"name":{"type":"string","title":"Name","default":""},"company":{"type":"string","title":"Company","default":""},"source":{"type":"string","title":"Source","default":"waitlist"}},"type":"object","required":["email"],"title":"LeadCapture"},"LeadResponse":{"properties":{"message":{"type":"string","title":"Message"},"lead_id":{"type":"integer","title":"Lead Id"}},"type":"object","required":["message","lead_id"],"title":"LeadResponse"},"LeaderboardEntry":{"properties":{"rank":{"type":"integer","title":"Rank"},"email":{"type":"string","title":"Email"},"conversions":{"type":"integer","title":"Conversions"}},"type":"object","required":["rank","email","conversions"],"title":"LeaderboardEntry","description":"A single row on the referral leaderboard."},"NewKey":{"properties":{"owner":{"type":"string","title":"Owner"},"tier":{"type":"string","title":"Tier","default":"starter"}},"type":"object","required":["owner"],"title":"NewKey"},"OnboardingRequest":{"properties":{"email":{"type":"string","title":"Email"},"company_name":{"type":"string","title":"Company Name"},"name":{"type":"string","title":"Name"},"use_case":{"type":"string","title":"Use Case","default":""},"tier":{"type":"string","title":"Tier","default":"starter"}},"type":"object","required":["email","company_name","name"],"title":"OnboardingRequest"},"OnboardingResponse":{"properties":{"welcome_message":{"type":"string","title":"Welcome Message"},"api_key":{"type":"string","title":"Api Key"},"quickstart":{"additionalProperties":true,"type":"object","title":"Quickstart"},"next_steps":{"items":{"type":"string"},"type":"array","title":"Next Steps"},"dashboard_url":{"type":"string","title":"Dashboard Url"},"docs_url":{"type":"string","title":"Docs Url"}},"type":"object","required":["welcome_message","api_key","quickstart","next_steps","dashboard_url","docs_url"],"title":"OnboardingResponse"},"OperatorRegistration":{"properties":{"name":{"type":"string","minLength":2,"title":"Name","description":"Operator legal/brand name"},"contact_email":{"type":"string","title":"Contact Email"},"jurisdiction":{"type":"string","title":"Jurisdiction","description":"Operator's regulatory jurisdiction (ISO country)","default":"US"}},"type":"object","required":["name","contact_email"],"title":"OperatorRegistration","description":"A satellite/orbital-compute operator joining the federation."},"PauseBody":{"properties":{"paused":{"type":"boolean","title":"Paused"}},"type":"object","required":["paused"],"title":"PauseBody"},"PortalRequest":{"properties":{"email":{"type":"string","title":"Email"},"return_url":{"type":"string","title":"Return Url","default":"https://www.orbitroute.ai/pitch"}},"type":"object","required":["email"],"title":"PortalRequest"},"Priority":{"type":"string","enum":["low","medium","high","critical"],"title":"Priority"},"ReferralStats":{"properties":{"email":{"type":"string","title":"Email"},"referral_code":{"type":"string","title":"Referral Code"},"referral_link":{"type":"string","title":"Referral Link"},"referrals_sent":{"type":"integer","title":"Referrals Sent"},"referrals_converted":{"type":"integer","title":"Referrals Converted"},"credits_earned":{"type":"string","title":"Credits Earned"}},"type":"object","required":["email","referral_code","referral_link","referrals_sent","referrals_converted","credits_earned"],"title":"ReferralStats","description":"Referral statistics for a single user."},"ReviewIn":{"properties":{"status":{"type":"string","title":"Status","description":"approved | rejected | discovered"}},"type":"object","required":["status"],"title":"ReviewIn"},"RoutingDecision":{"properties":{"job_id":{"type":"string","title":"Job Id"},"recommended_target":{"$ref":"#/components/schemas/ComputeTarget"},"target_name":{"type":"string","title":"Target Name"},"confidence":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Confidence"},"estimated_latency_ms":{"type":"number","title":"Estimated Latency Ms"},"estimated_cost_usd":{"type":"number","title":"Estimated Cost Usd"},"orbital_option":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Orbital Option"},"terrestrial_option":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Terrestrial Option"},"reasoning":{"items":{"type":"string"},"type":"array","title":"Reasoning"},"ground_station":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ground Station"},"next_orbital_window_utc":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Orbital Window Utc"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"}},"type":"object","required":["job_id","recommended_target","target_name","confidence","estimated_latency_ms","estimated_cost_usd","reasoning"],"title":"RoutingDecision"},"RoutingRequest":{"properties":{"job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Id"},"job_type":{"$ref":"#/components/schemas/JobType","default":"inference"},"priority":{"$ref":"#/components/schemas/Priority","default":"medium"},"model_name":{"type":"string","title":"Model Name","description":"AI model to run (e.g. llama-70b, stable-diffusion-xl)"},"input_size_mb":{"type":"number","minimum":0.0,"title":"Input Size Mb","description":"Input payload size in MB"},"max_latency_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Latency Ms","description":"Maximum acceptable latency in ms"},"gpu_required":{"type":"string","title":"Gpu Required","description":"GPU type required","default":"H100"},"estimated_compute_seconds":{"type":"number","minimum":0.0,"title":"Estimated Compute Seconds","default":10.0},"preferred_target":{"anyOf":[{"$ref":"#/components/schemas/ComputeTarget"},{"type":"null"}]},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region","description":"Preferred geographic region"},"deadline_utc":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deadline Utc","description":"Hard completion deadline (UTC). Managed jobs that cannot meet it in orbit are automatically offloaded to terrestrial cloud."}},"type":"object","required":["model_name","input_size_mb"],"title":"RoutingRequest"},"SeedIn":{"properties":{"companies":{"items":{"$ref":"#/components/schemas/app__routers__admin_crm__CompanyIn"},"type":"array","title":"Companies"}},"type":"object","required":["companies"],"title":"SeedIn"},"StageIn":{"properties":{"stage":{"type":"string","title":"Stage"}},"type":"object","required":["stage"],"title":"StageIn"},"SystemStatus":{"properties":{"total_orbital_assets":{"type":"integer","title":"Total Orbital Assets"},"online_assets":{"type":"integer","title":"Online Assets"},"total_ground_stations":{"type":"integer","title":"Total Ground Stations"},"stations_with_links":{"type":"integer","title":"Stations With Links"},"active_ground_links":{"type":"integer","title":"Active Ground Links"},"jobs_routed_today":{"type":"integer","title":"Jobs Routed Today"},"avg_latency_ms":{"type":"number","title":"Avg Latency Ms"},"orbital_utilization_pct":{"type":"number","title":"Orbital Utilization Pct"},"cost_savings_pct":{"type":"number","title":"Cost Savings Pct"},"cost_savings_basis":{"type":"string","title":"Cost Savings Basis","description":"Provenance of cost_savings_pct: 'modeled' = projected from the orbital pricing model, not measured on customer workloads.","default":"modeled"}},"type":"object","required":["total_orbital_assets","online_assets","total_ground_stations","stations_with_links","active_ground_links","jobs_routed_today","avg_latency_ms","orbital_utilization_pct","cost_savings_pct"],"title":"SystemStatus"},"TimelineBucket":{"properties":{"hour":{"type":"string","title":"Hour"},"counts":{"additionalProperties":{"type":"integer"},"type":"object","title":"Counts"}},"type":"object","required":["hour","counts"],"title":"TimelineBucket"},"TimelineResponse":{"properties":{"buckets":{"items":{"$ref":"#/components/schemas/TimelineBucket"},"type":"array","title":"Buckets"}},"type":"object","required":["buckets"],"title":"TimelineResponse"},"TrackEventRequest":{"properties":{"event_type":{"$ref":"#/components/schemas/EventType"},"properties":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Properties"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"},"referrer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referrer"},"user_agent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Agent"}},"type":"object","required":["event_type"],"title":"TrackEventRequest"},"TrackEventResponse":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"event_id":{"type":"string","title":"Event Id"},"session_id":{"type":"string","title":"Session Id"},"timestamp":{"type":"string","title":"Timestamp"}},"type":"object","required":["event_id","session_id","timestamp"],"title":"TrackEventResponse"},"TrackRequest":{"properties":{"referral_code":{"type":"string","title":"Referral Code"},"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["referral_code","email"],"title":"TrackRequest","description":"Request body for recording a referral conversion."},"TrackResponse":{"properties":{"message":{"type":"string","title":"Message"},"referrer_credit":{"type":"string","title":"Referrer Credit"},"referee_discount":{"type":"string","title":"Referee Discount"}},"type":"object","required":["message","referrer_credit","referee_discount"],"title":"TrackResponse","description":"Response after a referral conversion is recorded."},"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"},"WorkloadOverrides":{"properties":{"gpu_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gpu Type"},"jobs_per_day":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Jobs Per Day"},"avg_compute_seconds":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Avg Compute Seconds"}},"type":"object","title":"WorkloadOverrides","description":"Optional explicit workload profile — wins over customer history."},"app__routers__admin_crm__CompanyIn":{"properties":{"name":{"type":"string","minLength":2,"title":"Name"},"domain":{"type":"string","title":"Domain","default":""},"sector":{"type":"string","title":"Sector","default":""},"segment":{"type":"string","title":"Segment","default":""},"why_relevant":{"type":"string","title":"Why Relevant","default":""},"priority":{"type":"string","title":"Priority","default":"medium"},"buyer_name":{"type":"string","title":"Buyer Name","default":""},"buyer_title":{"type":"string","title":"Buyer Title","default":""},"buyer_email":{"type":"string","title":"Buyer Email","default":""},"est_mrr":{"type":"integer","title":"Est Mrr","default":0},"outreach_message":{"type":"string","title":"Outreach Message","default":""}},"type":"object","required":["name"],"title":"CompanyIn"},"app__routers__admin_leadfinder__CompanyIn":{"properties":{"name":{"type":"string","minLength":2,"title":"Name"},"domain":{"type":"string","title":"Domain","description":"e.g. acme.com — no scheme","default":""},"sector":{"type":"string","title":"Sector","default":""},"why_relevant":{"type":"string","title":"Why Relevant","default":""},"priority":{"type":"string","title":"Priority","default":"medium"}},"type":"object","required":["name"],"title":"CompanyIn"}},"securitySchemes":{"APIKeyHeader":{"type":"apiKey","in":"header","name":"X-Operator-Key"}}}}