{"openapi":"3.0.3","info":{"title":"The Block Pro API","description":"Self-service API access to The Block's data with Stripe billing","contact":{"name":"The Block","url":"https://theblock.co"},"license":{"name":""},"version":"1.0.0"},"servers":[{"url":"https://pro-api.theblock.co","description":"Production"},{"url":"http://localhost:8080","description":"Local development"}],"paths":{"/api/v1/api-keys":{"get":{"tags":["API Keys"],"summary":"List all API keys for the authenticated user","operationId":"list_api_keys","responses":{"200":{"description":"List of API keys","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyListResponse"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer_auth":[]}]},"post":{"tags":["API Keys"],"summary":"Create a new API key","operationId":"create_api_key","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyRequest"}}},"required":true},"responses":{"201":{"description":"API key created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreatedResponse"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Maximum API keys reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer_auth":[]}]}},"/api/v1/api-keys/{key_id}":{"delete":{"tags":["API Keys"],"summary":"Delete (revoke) an API key","operationId":"revoke_api_key","parameters":[{"name":"key_id","in":"path","description":"API key ID to revoke","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"API key revoked"},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"API key not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer_auth":[]}]}},"/api/v1/auth/login":{"post":{"tags":["Authentication"],"summary":"Login with email and password or API key","operationId":"login","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}},"required":true},"responses":{"200":{"description":"Login successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"No active products (launchpad)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/auth/logout":{"post":{"tags":["Authentication"],"summary":"Logout (revoke refresh token)","operationId":"logout","responses":{"204":{"description":"Logged out successfully"},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/auth/refresh":{"post":{"tags":["Authentication"],"summary":"Refresh access token","operationId":"refresh","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshRequest"}}},"required":true},"responses":{"200":{"description":"Token refreshed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}}},"401":{"description":"Invalid refresh token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/auth/register":{"post":{"tags":["Authentication"],"summary":"Register a new user","operationId":"register","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterRequest"}}},"required":true},"responses":{"201":{"description":"User created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Email already registered","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/billing/checkout":{"post":{"tags":["Billing"],"summary":"Create a Stripe checkout session for subscription","operationId":"create_checkout","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCheckoutRequest"}}},"required":true},"responses":{"200":{"description":"Checkout session created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSessionResponse"}}}},"400":{"description":"Invalid plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer_auth":[]}]}},"/api/v1/billing/plans":{"get":{"tags":["Billing"],"summary":"List available subscription plans","operationId":"list_plans","responses":{"200":{"description":"Available plans","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlansListResponse"}}}}}}},"/api/v1/billing/portal":{"post":{"tags":["Billing"],"summary":"Create a Stripe customer portal session","operationId":"create_portal_session","responses":{"200":{"description":"Portal session created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalSessionResponse"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No subscription found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer_auth":[]}]}},"/api/v1/billing/subscription":{"get":{"tags":["Billing"],"summary":"Get current subscription info","operationId":"get_subscription","responses":{"200":{"description":"Subscription info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionInfoResponse"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer_auth":[]}]}},"/api/v1/billing/usage":{"get":{"tags":["Billing"],"summary":"Get usage statistics","operationId":"get_usage_stats","responses":{"200":{"description":"Usage statistics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageStatsResponse"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer_auth":[]}]}},"/api/v1/data/charts":{"get":{"tags":["Charts"],"summary":"List available charts","operationId":"list_charts","responses":{"200":{"description":"List of available charts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChartsListResponse"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer_auth":[]}]}},"/api/v1/data/charts/batch":{"post":{"tags":["Charts"],"summary":"Batch fetch multiple charts","operationId":"batch_charts","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchChartsRequest"}}},"required":true},"responses":{"200":{"description":"Batch chart data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchChartsResponse"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer_auth":[]}]}},"/api/v1/data/charts/{slug}":{"get":{"tags":["Charts"],"summary":"Get chart data by slug","operationId":"get_chart","parameters":[{"name":"slug","in":"path","description":"Chart slug identifier","required":true,"schema":{"type":"string"}},{"name":"format","in":"query","description":"Response format: \"raw\" (default) or \"simplified\"","required":false,"schema":{"type":"string","nullable":true}}],"responses":{"200":{"description":"Chart data"},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Chart not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer_auth":[]}]}},"/api/v1/data/intel/alerts":{"get":{"tags":["Intel"],"summary":"Get intel alerts","operationId":"get_alerts","responses":{"200":{"description":"Intel alerts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntelAlertsResponse"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Feature not available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer_auth":[]}]}},"/api/v1/data/intel/companies":{"get":{"tags":["Intel"],"summary":"Search companies","operationId":"get_companies","parameters":[{"name":"name","in":"query","description":"Search by name (ILIKE)","required":false,"schema":{"type":"string","nullable":true}},{"name":"category","in":"query","description":"Filter by category","required":false,"schema":{"type":"string","nullable":true}},{"name":"limit","in":"query","description":"Maximum results (default 20, max 100)","required":false,"schema":{"type":"integer","format":"int64","nullable":true}}],"responses":{"200":{"description":"Companies with deals","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompaniesResponse"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer_auth":[]}]}},"/api/v1/data/intel/deals":{"get":{"tags":["Intel"],"summary":"Get funding deals with relations","operationId":"get_deals","parameters":[{"name":"limit","in":"query","description":"Maximum results (default 20, max 100)","required":false,"schema":{"type":"integer","format":"int64","nullable":true}},{"name":"amount_e","in":"query","description":"Exact deal amount","required":false,"schema":{"type":"number","format":"double","nullable":true}},{"name":"amount_gte","in":"query","description":"Minimum deal amount (>=)","required":false,"schema":{"type":"number","format":"double","nullable":true}},{"name":"amount_gt","in":"query","description":"Deal amount greater than (>)","required":false,"schema":{"type":"number","format":"double","nullable":true}},{"name":"amount_lte","in":"query","description":"Deal amount less than or equal (<=)","required":false,"schema":{"type":"number","format":"double","nullable":true}},{"name":"amount_lt","in":"query","description":"Deal amount less than (<)","required":false,"schema":{"type":"number","format":"double","nullable":true}},{"name":"valuation_e","in":"query","description":"Exact valuation","required":false,"schema":{"type":"number","format":"double","nullable":true}},{"name":"valuation_gte","in":"query","description":"Minimum valuation (>=)","required":false,"schema":{"type":"number","format":"double","nullable":true}},{"name":"valuation_gt","in":"query","description":"Valuation greater than (>)","required":false,"schema":{"type":"number","format":"double","nullable":true}},{"name":"valuation_lte","in":"query","description":"Valuation less than or equal (<=)","required":false,"schema":{"type":"number","format":"double","nullable":true}},{"name":"valuation_lt","in":"query","description":"Valuation less than (<)","required":false,"schema":{"type":"number","format":"double","nullable":true}},{"name":"deal_type","in":"query","description":"Filter by deal type","required":false,"schema":{"type":"string","nullable":true}},{"name":"round","in":"query","description":"Filter by round","required":false,"schema":{"type":"string","nullable":true}}],"responses":{"200":{"description":"Deals with company and investor data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealsResponse"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer_auth":[]}]}},"/api/v1/data/intel/funding":{"get":{"tags":["Intel"],"summary":"Get funding summary data (from Redis cache)","operationId":"get_funding","responses":{"200":{"description":"Funding summary data"},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer_auth":[]}]}},"/api/v1/data/intel/investors":{"get":{"tags":["Intel"],"summary":"Search investors","operationId":"get_investors","parameters":[{"name":"name","in":"query","description":"Search by name (ILIKE)","required":false,"schema":{"type":"string","nullable":true}},{"name":"type","in":"query","description":"Filter by investor type","required":false,"schema":{"type":"string","nullable":true}},{"name":"limit","in":"query","description":"Maximum results (default 20, max 100)","required":false,"schema":{"type":"integer","format":"int64","nullable":true}}],"responses":{"200":{"description":"Investors with deals","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestorsResponse"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer_auth":[]}]}},"/api/v1/data/intel/investors-data":{"get":{"tags":["Intel"],"summary":"Get investor summary data (from Redis cache)","operationId":"get_investors_data","responses":{"200":{"description":"Investor summary data"},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer_auth":[]}]}},"/api/v1/data/intel/research":{"get":{"tags":["Intel"],"summary":"List research reports","operationId":"list_research","parameters":[{"name":"report_type","in":"query","description":"Report type filter","required":false,"schema":{"type":"string","nullable":true}},{"name":"tag","in":"query","description":"Tag filter","required":false,"schema":{"type":"string","nullable":true}},{"name":"limit","in":"query","description":"Limit results","required":false,"schema":{"type":"integer","format":"int32","nullable":true,"minimum":0}}],"responses":{"200":{"description":"Research reports","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResearchListResponse"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Feature not available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer_auth":[]}]}},"/api/v1/data/intel/research/{slug}":{"get":{"tags":["Intel"],"summary":"Get single research report","operationId":"get_research","parameters":[{"name":"slug","in":"path","description":"Report slug","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Research report","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResearchReport"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Feature not available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer_auth":[]}]}},"/api/v1/data/intel/sentiment":{"get":{"tags":["Intel"],"summary":"Get market sentiment","operationId":"get_sentiment","responses":{"200":{"description":"Market sentiment","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketSentiment"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer_auth":[]}]}},"/api/v1/data/news":{"get":{"tags":["News"],"summary":"Search news articles","operationId":"get_news","parameters":[{"name":"q","in":"query","description":"Free-text search query","required":false,"schema":{"type":"string","nullable":true}},{"name":"vertical","in":"query","description":"Filter by vertical/category","required":false,"schema":{"type":"string","nullable":true}},{"name":"post_types","in":"query","description":"Filter by post types (comma-separated)","required":false,"schema":{"type":"string","nullable":true}},{"name":"start","in":"query","description":"Offset for pagination (default 0)","required":false,"schema":{"type":"integer","format":"int64","nullable":true}},{"name":"size","in":"query","description":"Page size (default 20, max 100)","required":false,"schema":{"type":"integer","format":"int64","nullable":true}},{"name":"publish_date_range","in":"query","description":"Publish date range filter","required":false,"schema":{"type":"string","nullable":true}}],"responses":{"200":{"description":"News search results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewsSearchResponse"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"CloudSearch unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer_auth":[]}]}},"/api/v1/data/news/categories":{"get":{"tags":["News"],"summary":"Get news categories/verticals","operationId":"get_categories","responses":{"200":{"description":"News categories","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer_auth":[]}]}},"/api/v1/data/news/{id}":{"get":{"tags":["News"],"summary":"Get single news article by ID","operationId":"get_article","parameters":[{"name":"id","in":"path","description":"Article ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Full article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArticleResponse"}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Article not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearer_auth":[]}]}},"/health":{"get":{"tags":["Health"],"summary":"Liveness probe - returns 200 if the service is running","description":"This endpoint is used by container orchestrators to determine if the\nservice is alive. It does not check external dependencies.","operationId":"health","responses":{"200":{"description":"Service is running","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}},"/ready":{"get":{"tags":["Health"],"summary":"Readiness probe - returns 200 if the service can accept traffic","description":"This endpoint checks all external dependencies (database, Redis,\nlaunchpad DB/Redis, CloudSearch) and returns their individual status.","operationId":"ready","responses":{"200":{"description":"Service is ready to accept traffic","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthStatus"}}}},"503":{"description":"Service is not ready","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthStatus"}}}}}}}},"components":{"schemas":{"ApiKeyCreatedResponse":{"type":"object","description":"API key response (returned on creation only)","required":["id","name","key","key_prefix","scopes","created_at"],"properties":{"created_at":{"type":"string"},"expires_at":{"type":"string","nullable":true},"id":{"type":"string","format":"uuid"},"key":{"type":"string"},"key_prefix":{"type":"string"},"name":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}}}},"ApiKeyListResponse":{"type":"object","description":"List of API keys","required":["api_keys","total"],"properties":{"api_keys":{"type":"array","items":{"$ref":"#/components/schemas/ApiKeyResponse"}},"total":{"type":"integer","minimum":0}}},"ApiKeyResponse":{"type":"object","description":"API key list item (never shows full key)","required":["id","name","key_prefix","scopes","created_at"],"properties":{"created_at":{"type":"string"},"expires_at":{"type":"string","nullable":true},"id":{"type":"string","format":"uuid"},"key_prefix":{"type":"string"},"last_used_at":{"type":"string","nullable":true},"name":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}}}},"ArticleResponse":{"type":"object","description":"Single article response","required":["id","data"],"properties":{"data":{},"id":{"type":"string"}}},"AuthResponse":{"type":"object","description":"Authentication response with tokens","required":["access_token","refresh_token","token_type","expires_in","user"],"properties":{"access_token":{"type":"string"},"expires_in":{"type":"integer","format":"int64","minimum":0},"refresh_token":{"type":"string"},"role":{"type":"string","nullable":true},"token_type":{"type":"string"},"user":{"$ref":"#/components/schemas/UserResponse"}}},"AvailablePlan":{"type":"object","description":"Available plan response","required":["plan","interval","name","price_cents","price_display","usage_limit","rate_limit_per_minute","features"],"properties":{"description":{"type":"string","nullable":true},"features":{"type":"array","items":{"type":"string"}},"interval":{"type":"string"},"name":{"type":"string"},"plan":{"type":"string"},"price_cents":{"type":"integer","format":"int64"},"price_display":{"type":"string"},"rate_limit_per_minute":{"type":"integer","format":"int32"},"usage_limit":{"type":"integer","format":"int64"}}},"BatchChartError":{"type":"object","description":"Error for a single chart in a batch","required":["slug","error"],"properties":{"error":{"type":"string"},"slug":{"type":"string"}}},"BatchChartsRequest":{"type":"object","description":"Batch charts request","required":["slugs"],"properties":{"format":{"type":"string","description":"Response format: \"raw\" (default) or \"simplified\"","nullable":true},"slugs":{"type":"array","items":{"type":"string"},"description":"Chart slugs to fetch (max 10)"}}},"BatchChartsResponse":{"type":"object","description":"Batch charts response","required":["charts","errors"],"properties":{"charts":{"type":"array","items":{}},"errors":{"type":"array","items":{"$ref":"#/components/schemas/BatchChartError"}}}},"ChartDataResponse":{"type":"object","description":"Single chart response (raw format)","required":["slug","data"],"properties":{"data":{"description":"Full chart data (Description, Series, Category, etc.)"},"slug":{"type":"string","description":"Chart slug identifier"}}},"ChartMeta":{"type":"object","description":"Chart metadata (from launchpad Redis index)","required":["slug"],"properties":{"slug":{"type":"string"},"title":{"type":"string","nullable":true}}},"ChartSimplifiedResponse":{"type":"object","description":"Simplified chart response","required":["slug","data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DataPoint"}},"slug":{"type":"string"}}},"ChartsListResponse":{"type":"object","description":"Charts list response","required":["charts"],"properties":{"charts":{"type":"array","items":{"$ref":"#/components/schemas/ChartMeta"}}}},"CheckoutSessionResponse":{"type":"object","description":"Checkout session response","required":["session_id","url"],"properties":{"session_id":{"type":"string"},"url":{"type":"string"}}},"CompaniesResponse":{"type":"object","description":"Companies list response","required":["companies"],"properties":{"companies":{"type":"array","items":{}}}},"CreateApiKeyRequest":{"type":"object","description":"Create API key request","required":["name"],"properties":{"expires_at":{"type":"string","description":"Optional expiration (ISO 8601)","nullable":true},"name":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"},"description":"Optional scopes to restrict the key"}}},"CreateCheckoutRequest":{"type":"object","description":"Checkout session request","required":["plan","success_url","cancel_url"],"properties":{"cancel_url":{"type":"string","description":"URL to redirect to on cancel"},"interval":{"type":"string","description":"Billing interval: \"month\" or \"year\" (default: \"month\")"},"plan":{"type":"string","description":"Plan to subscribe to: \"startup\", \"business\", or \"enterprise\""},"success_url":{"type":"string","description":"URL to redirect to on success"}}},"DataPoint":{"type":"object","description":"Simplified data point (timestamp + value)","required":["timestamp","value"],"properties":{"timestamp":{"type":"number","format":"double"},"value":{"type":"number","format":"double"}}},"DealsResponse":{"type":"object","description":"Deals list response","required":["deals"],"properties":{"deals":{"type":"array","items":{}}}},"EndpointUsage":{"type":"object","required":["endpoint","calls","percentage"],"properties":{"calls":{"type":"integer","format":"int64","minimum":0},"endpoint":{"type":"string"},"percentage":{"type":"number","format":"double"}}},"ErrorDetail":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}},"ErrorResponse":{"type":"object","description":"Error response","required":["error"],"properties":{"error":{"$ref":"#/components/schemas/ErrorDetail"}}},"HealthResponse":{"type":"object","description":"Simple liveness check response","required":["status"],"properties":{"status":{"type":"string"}}},"HealthStatus":{"type":"object","description":"Health check status response","required":["database","redis","redis_primary","redis_reader","launchpad_db","launchpad_redis","cloudsearch","status"],"properties":{"cloudsearch":{"type":"string"},"database":{"type":"string"},"launchpad_db":{"type":"string"},"launchpad_redis":{"type":"string"},"redis":{"type":"string"},"redis_primary":{"type":"string"},"redis_reader":{"type":"string"},"status":{"type":"string"}}},"IntelAlert":{"type":"object","description":"Intel alert","required":["id","title","description","severity","category","source","created_at"],"properties":{"category":{"type":"string"},"created_at":{"type":"integer","format":"int64"},"description":{"type":"string"},"expires_at":{"type":"integer","format":"int64","nullable":true},"id":{"type":"string","format":"uuid"},"severity":{"type":"string"},"source":{"type":"string"},"title":{"type":"string"}}},"IntelAlertsResponse":{"type":"object","description":"Intel alerts response","required":["alerts","unread_count"],"properties":{"alerts":{"type":"array","items":{"$ref":"#/components/schemas/IntelAlert"}},"unread_count":{"type":"integer","format":"int32","minimum":0}}},"InvestorsResponse":{"type":"object","description":"Investors list response","required":["investors"],"properties":{"investors":{"type":"array","items":{}}}},"LoginRequest":{"type":"object","description":"Login request","required":["email"],"properties":{"api_key":{"type":"string","description":"API key (alternative to password for legacy Pro users)","nullable":true},"email":{"type":"string"},"password":{"type":"string","description":"Password (required unless api_key is provided)","nullable":true}}},"MarketSentiment":{"type":"object","description":"Market sentiment endpoint","required":["overall","score","fear_greed_index","trending_topics","updated_at"],"properties":{"fear_greed_index":{"type":"integer","format":"int32","minimum":0},"overall":{"type":"string"},"score":{"type":"number","format":"double"},"trending_topics":{"type":"array","items":{"$ref":"#/components/schemas/TrendingTopic"}},"updated_at":{"type":"integer","format":"int64"}}},"NewsSearchResponse":{"type":"object","description":"News search response","required":["found","articles","query"],"properties":{"articles":{"type":"array","items":{},"description":"Articles in this page"},"found":{"type":"integer","format":"int64","description":"Total matching articles"},"query":{"$ref":"#/components/schemas/QueryEcho"}}},"PlansListResponse":{"type":"object","description":"Plans list response","required":["plans"],"properties":{"plans":{"type":"array","items":{"$ref":"#/components/schemas/AvailablePlan"}}}},"PortalSessionResponse":{"type":"object","description":"Portal session response","required":["url"],"properties":{"url":{"type":"string"}}},"QueryEcho":{"type":"object","description":"Echo of query parameters","required":["start","size"],"properties":{"q":{"type":"string","nullable":true},"size":{"type":"integer","format":"int64"},"start":{"type":"integer","format":"int64"},"vertical":{"type":"string","nullable":true}}},"RefreshRequest":{"type":"object","description":"Token refresh request","required":["refresh_token"],"properties":{"refresh_token":{"type":"string"}}},"RegisterRequest":{"type":"object","description":"User registration request","required":["email","password"],"properties":{"company":{"type":"string","nullable":true},"email":{"type":"string"},"name":{"type":"string","nullable":true},"password":{"type":"string"}}},"ResearchListResponse":{"type":"object","description":"Research list response","required":["reports","total"],"properties":{"reports":{"type":"array","items":{"$ref":"#/components/schemas/ResearchReport"}},"total":{"type":"integer","format":"int32","minimum":0}}},"ResearchReport":{"type":"object","description":"Research report","required":["id","title","slug","summary","report_type","authors","tags","published_at","required_feature"],"properties":{"authors":{"type":"array","items":{"type":"string"}},"content":{"type":"string","nullable":true},"id":{"type":"string","format":"uuid"},"pdf_url":{"type":"string","nullable":true},"published_at":{"type":"integer","format":"int64"},"report_type":{"type":"string"},"required_feature":{"type":"string"},"slug":{"type":"string"},"summary":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"title":{"type":"string"}}},"SubscriptionInfoResponse":{"type":"object","description":"Current subscription info","required":["plan","status","usage_limit","current_usage","rate_limit_per_minute","features","cancel_at_period_end"],"properties":{"cancel_at_period_end":{"type":"boolean"},"current_period_end":{"type":"string","nullable":true},"current_period_start":{"type":"string","nullable":true},"current_usage":{"type":"integer","format":"int64","minimum":0},"features":{"type":"array","items":{"type":"string"}},"plan":{"type":"string"},"rate_limit_per_minute":{"type":"integer","format":"int64","minimum":0},"status":{"type":"string"},"usage_limit":{"type":"integer","format":"int64","minimum":0}}},"SubscriptionResponse":{"type":"object","description":"Subscription info response","required":["plan","status","usage_limit"],"properties":{"current_period_end":{"type":"string","nullable":true},"plan":{"type":"string"},"status":{"type":"string"},"usage_limit":{"type":"integer","format":"int64","minimum":0}}},"TrendingTopic":{"type":"object","required":["topic","sentiment","mentions","change_24h"],"properties":{"change_24h":{"type":"number","format":"double"},"mentions":{"type":"integer","format":"int32","minimum":0},"sentiment":{"type":"string"},"topic":{"type":"string"}}},"UsagePeriod":{"type":"object","required":["start","end","total_calls","limit","percentage"],"properties":{"end":{"type":"string"},"limit":{"type":"integer","format":"int64","minimum":0},"percentage":{"type":"integer","format":"int32","minimum":0},"start":{"type":"string"},"total_calls":{"type":"integer","format":"int64","minimum":0}}},"UsageStatsResponse":{"type":"object","description":"Usage stats response","required":["current_period","endpoints"],"properties":{"current_period":{"$ref":"#/components/schemas/UsagePeriod"},"endpoints":{"type":"array","items":{"$ref":"#/components/schemas/EndpointUsage"}},"previous_period":{"allOf":[{"$ref":"#/components/schemas/UsagePeriod"}],"nullable":true}}},"UserResponse":{"type":"object","description":"User info response","required":["id","email"],"properties":{"company":{"type":"string","nullable":true},"email":{"type":"string"},"id":{"type":"string","format":"uuid"},"name":{"type":"string","nullable":true},"subscription":{"allOf":[{"$ref":"#/components/schemas/SubscriptionResponse"}],"nullable":true}}}},"securitySchemes":{"api_key":{"type":"apiKey","in":"header","name":"X-API-Key"},"bearer_auth":{"type":"http","scheme":"bearer"}}},"tags":[{"name":"Health","description":"Health check endpoints"},{"name":"Authentication","description":"User authentication and token management"},{"name":"API Keys","description":"API key management"},{"name":"Billing","description":"Subscription and usage management"},{"name":"Charts","description":"Chart and time series data"},{"name":"News","description":"News articles and feeds"},{"name":"Intel","description":"Research reports and market intelligence"}]}