General API
Endpoints for general operations.
Endpoints
- GET /api/analytics/metrics/system
- GET /
- GET /tools
- GET /api-explorer
- GET /health
- GET /api/health
- POST /api/onboard
- POST /api/webhook/gmail
- GET /api/stats
- POST /api/feedback
- GET /api/league/league_id"}
- GET /api/player-headshots/player_id"}
- GET /api/betting/opportunities
- GET /api/betting/trending
- GET /api/betting/live
- POST /api/betting/place
- GET /api/betting/user/user_id"}/bets
- GET /api/betting/opportunities/opportunity_id"}
- POST /respond
- GET /api/agents
- GET /api/analytics
- POST /api/sports-intelligence
- GET /api/prompts/search
- GET /api/prompts/prompt_id"}
- PUT /api/prompts/prompt_id"}
- POST /api/prompts/build
- POST /api/prompts
- GET /api/prompts/stats
- POST /api/prompts/seed
- GET /api/prompts/langmem/status
- POST /api/prompts/langmem/build
- GET /api/prompts/langmem/examples/tier"}
- GET /api/prompts/langmem/agents
- GET /api/prompts/seed-sources
- GET /api/credits/user_id"}
- POST /api/credits/user_id"}/check
- GET /api/credits/packages
- GET /api/credits/user_id"}/transactions
- GET /api/credits/user_id"}/balance
- POST /api/credits/user_id"}/purchase
- POST /api/credits/user_id"}/add
- POST /api/stripe/webhook
- POST /process-email
- GET /employees
- POST /employees
- GET /employees/employee_id"}
- PUT /employees/employee_id"}
- GET /query-history
- POST /query-history
- GET /query-history/stats
- GET /data-catalog
- GET /data-catalog/dataset_id"}
- POST /data-catalog/validate
- POST /rag-query
- GET /rag-query/status
- GET /documents
- POST /process-document
- GET /documents/document_id"}
- POST /documents/document_id"}/reprocess
- GET /api/pipeline/view
- POST /api/pipeline/stage-change
- POST /api/pipeline/process-email
- POST /api/onboard-enhanced
- POST /api/contract/generate-terms
- POST /api/contract/generate-document
- GET /api/contract/templates
- POST /api/youtube/extract
- POST /api/youtube/predict
- POST /api/youtube/time-series
- POST /api/youtube/analyze-batch
GET /api/analytics/metrics/system
Get System Metrics
Get detailed system metrics
Responses
200: Successful Response
Examples
curl -X GET "https://api.altsportsdata.com/api/analytics/metrics/system" \
-H "Content-Type: application/json"GET /
Root Endpoint
Comprehensive service discovery endpoint with content negotiation
Responses
200: Successful Response
Examples
curl -X GET "https://api.altsportsdata.com/" \
-H "Content-Type: application/json"GET /tools
Tools Endpoint
Comprehensive tools discovery endpoint with content negotiation
Responses
200: Successful Response
Examples
curl -X GET "https://api.altsportsdata.com/tools" \
-H "Content-Type: application/json"GET /api-explorer
Serve Api Explorer
Serve interactive API explorer
Responses
200: Successful Response
Examples
curl -X GET "https://api.altsportsdata.com/api-explorer" \
-H "Content-Type: application/json"GET /health
Health Check
Health check endpoint
Responses
200: Successful Response
Examples
curl -X GET "https://api.altsportsdata.com/health" \
-H "Content-Type: application/json"GET /api/health
Api Health Check
API health check endpoint
Responses
200: Successful Response
Examples
curl -X GET "https://api.altsportsdata.com/api/health" \
-H "Content-Type: application/json"POST /api/onboard
Process Onboarding Email
Main endpoint for processing emails from Google Apps Script
Request Body
{}Responses
200: Successful Response
422: Validation Error
Examples
curl -X POST "https://api.altsportsdata.com/api/onboard" \
-H "Content-Type: application/json" \
-d '{}'POST /api/webhook/gmail
Gmail Webhook
Gmail webhook endpoint for real-time email notifications
Responses
200: Successful Response
Examples
curl -X POST "https://api.altsportsdata.com/api/webhook/gmail" \
-H "Content-Type: application/json"GET /api/stats
Get Stats
Get comprehensive system statistics for frontend
Responses
200: Successful Response
Examples
curl -X GET "https://api.altsportsdata.com/api/stats" \
-H "Content-Type: application/json"POST /api/feedback
Submit Feedback
Submit feedback for improving triage and responses
Request Body
{}Responses
200: Successful Response
422: Validation Error
Examples
curl -X POST "https://api.altsportsdata.com/api/feedback" \
-H "Content-Type: application/json" \
-d '{}'GET /api/league/{league_id}"}
Get League Status
Get onboarding status for a specific league
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
league_id | path | string | Yes | - |
Responses
200: Successful Response
422: Validation Error
Examples
curl -X GET "https://api.altsportsdata.com/api/league/{league_id}"}" \
-H "Content-Type: application/json"GET /api/player-headshots/{player_id}"}
Get Player Headshot
Serve player headshot images by player ID
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
player_id | path | string | Yes | - |
Responses
200: Successful Response
422: Validation Error
Examples
curl -X GET "https://api.altsportsdata.com/api/player-headshots/{player_id}"}" \
-H "Content-Type: application/json"GET /api/betting/opportunities
Get Betting Opportunities
Get betting opportunities with filters and pagination
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
page | query | integer | No | - |
limit | query | integer | No | - |
league | query | string | No | - |
sport | query | string | No | - |
status | query | string | No | - |
search | query | string | No | - |
Responses
200: Successful Response
422: Validation Error
Examples
curl -X GET "https://api.altsportsdata.com/api/betting/opportunities" \
-H "Content-Type: application/json"GET /api/betting/trending
Get Trending Opportunities
Get trending betting opportunities
Responses
200: Successful Response
Examples
curl -X GET "https://api.altsportsdata.com/api/betting/trending" \
-H "Content-Type: application/json"GET /api/betting/live
Get Live Opportunities
Get live betting opportunities
Responses
200: Successful Response
Examples
curl -X GET "https://api.altsportsdata.com/api/betting/live" \
-H "Content-Type: application/json"POST /api/betting/place
Place Bet
Place a bet (mock implementation for now)
Request Body
{}Responses
200: Successful Response
422: Validation Error
Examples
curl -X POST "https://api.altsportsdata.com/api/betting/place" \
-H "Content-Type: application/json" \
-d '{}'GET /api/betting/user/{user_id}"}/bets
Get User Bets
Get user's betting history
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
user_id | path | string | Yes | - |
limit | query | integer | No | - |
offset | query | integer | No | - |
Responses
200: Successful Response
422: Validation Error
Examples
curl -X GET "https://api.altsportsdata.com/api/betting/user/{user_id}"}/bets" \
-H "Content-Type: application/json"GET /api/betting/opportunities/{opportunity_id}"}
Get Betting Opportunity
Get detailed information about a specific betting opportunity
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
opportunity_id | path | string | Yes | - |
Responses
200: Successful Response
422: Validation Error
Examples
curl -X GET "https://api.altsportsdata.com/api/betting/opportunities/{opportunity_id}"}" \
-H "Content-Type: application/json"POST /respond
Process Email Respond
Process email - main endpoint tested by evaluation
Request Body
{}Responses
200: Successful Response
422: Validation Error
Examples
curl -X POST "https://api.altsportsdata.com/respond" \
-H "Content-Type: application/json" \
-d '{}'GET /api/agents
Get Agents
Get available agents information
Responses
200: Successful Response
Examples
curl -X GET "https://api.altsportsdata.com/api/agents" \
-H "Content-Type: application/json"GET /api/analytics
Get Analytics
Get system analytics data
Responses
200: Successful Response
Examples
curl -X GET "https://api.altsportsdata.com/api/analytics" \
-H "Content-Type: application/json"POST /api/sports-intelligence
Sports Intelligence Chat
Sports Intelligence Chat Endpoint
This endpoint provides intelligent orchestration for sports-related queries, routing them to appropriate handlers (direct answers, RAG search, workflow kickoff) with credit-based access control.
Request Body
{}Responses
200: Successful Response
422: Validation Error
Examples
curl -X POST "https://api.altsportsdata.com/api/sports-intelligence" \
-H "Content-Type: application/json" \
-d '{}'GET /api/prompts/search
Search Prompts
Search prompts by query with optional semantic search
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
q | query | string | No | - |
semantic | query | boolean | No | - |
Responses
200: Successful Response
422: Validation Error
Examples
curl -X GET "https://api.altsportsdata.com/api/prompts/search" \
-H "Content-Type: application/json"GET /api/prompts/{prompt_id}"}
Get Prompt
Get specific prompt by ID
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
prompt_id | path | string | Yes | - |
Responses
200: Successful Response
422: Validation Error
Examples
curl -X GET "https://api.altsportsdata.com/api/prompts/{prompt_id}"}" \
-H "Content-Type: application/json"PUT /api/prompts/{prompt_id}"}
Update Prompt
Update existing prompt
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
prompt_id | path | string | Yes | - |
content | query | string | No | - |
name | query | string | No | - |
description | query | string | No | - |
Request Body
{}Responses
200: Successful Response
422: Validation Error
Examples
curl -X PUT "https://api.altsportsdata.com/api/prompts/{prompt_id}"}" \
-H "Content-Type: application/json" \
-d '{}'POST /api/prompts/build
Build Comprehensive Prompt
Build complete prompt with recipe + agent + context + examples + schema
Request Body
{}Responses
200: Successful Response
422: Validation Error
Examples
curl -X POST "https://api.altsportsdata.com/api/prompts/build" \
-H "Content-Type: application/json" \
-d '{}'POST /api/prompts
Create Prompt
Create new prompt
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
name | query | string | Yes | - |
content | query | string | Yes | - |
prompt_type | query | string | No | - |
description | query | string | No | - |
Request Body
{}Responses
200: Successful Response
422: Validation Error
Examples
curl -X POST "https://api.altsportsdata.com/api/prompts" \
-H "Content-Type: application/json" \
-d '{}'GET /api/prompts/stats
Get Prompt Stats
Get prompt collection statistics
Responses
200: Successful Response
Examples
curl -X GET "https://api.altsportsdata.com/api/prompts/stats" \
-H "Content-Type: application/json"POST /api/prompts/seed
Initialize Unified System
Initialize/re-initialize the unified LangMem system from seeds
Responses
200: Successful Response
Examples
curl -X POST "https://api.altsportsdata.com/api/prompts/seed" \
-H "Content-Type: application/json"GET /api/prompts/langmem/status
Get Unified System Status
Get status of unified LangMem system
Responses
200: Successful Response
Examples
curl -X GET "https://api.altsportsdata.com/api/prompts/langmem/status" \
-H "Content-Type: application/json"POST /api/prompts/langmem/build
Build Intelligent Prompt
Build intelligent prompt using unified LangMem with smart fallback
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
query | query | string | Yes | - |
business_tier | query | string | No | - |
scenario | query | string | No | - |
max_examples | query | integer | No | - |
Request Body
{}Responses
200: Successful Response
422: Validation Error
Examples
curl -X POST "https://api.altsportsdata.com/api/prompts/langmem/build" \
-H "Content-Type: application/json" \
-d '{}'GET /api/prompts/langmem/examples/{tier}"}
Get Examples By Tier Smart
Get few-shot examples by business tier with smart fallback
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tier | path | string | Yes | - |
scenario | query | string | No | - |
limit | query | integer | No | - |
Responses
200: Successful Response
422: Validation Error
Examples
curl -X GET "https://api.altsportsdata.com/api/prompts/langmem/examples/{tier}"}" \
-H "Content-Type: application/json"GET /api/prompts/langmem/agents
List Available Agents
List all available agents with their capabilities
Responses
200: Successful Response
Examples
curl -X GET "https://api.altsportsdata.com/api/prompts/langmem/agents" \
-H "Content-Type: application/json"GET /api/prompts/seed-sources
Check Seed Sources
Check what source data is available for seeding
Responses
200: Successful Response
Examples
curl -X GET "https://api.altsportsdata.com/api/prompts/seed-sources" \
-H "Content-Type: application/json"GET /api/credits/{user_id}"}
Get User Credits Endpoint
Get user's current credit balance
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
user_id | path | string | Yes | - |
Responses
200: Successful Response
422: Validation Error
Examples
curl -X GET "https://api.altsportsdata.com/api/credits/{user_id}"}" \
-H "Content-Type: application/json"POST /api/credits/{user_id}"}/check
Check Credits Endpoint
Check if user has sufficient credits for a query type
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
user_id | path | string | Yes | - |
query_type | query | string | No | - |
Responses
200: Successful Response
422: Validation Error
Examples
curl -X POST "https://api.altsportsdata.com/api/credits/{user_id}"}/check" \
-H "Content-Type: application/json"GET /api/credits/packages
Get Credit Packages
Get available credit packages
Responses
200: Successful Response
Examples
curl -X GET "https://api.altsportsdata.com/api/credits/packages" \
-H "Content-Type: application/json"GET /api/credits/{user_id}"}/transactions
Get Credit Transactions
Get credit transaction history for a user
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
user_id | path | string | Yes | - |
limit | query | integer | No | - |
Responses
200: Successful Response
422: Validation Error
Examples
curl -X GET "https://api.altsportsdata.com/api/credits/{user_id}"}/transactions" \
-H "Content-Type: application/json"GET /api/credits/{user_id}"}/balance
Get Credit Balance
Get current credit balance for a user
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
user_id | path | string | Yes | - |
Responses
200: Successful Response
422: Validation Error
Examples
curl -X GET "https://api.altsportsdata.com/api/credits/{user_id}"}/balance" \
-H "Content-Type: application/json"POST /api/credits/{user_id}"}/purchase
Initiate Credit Purchase
Initiate credit purchase (creates Stripe checkout session)
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
user_id | path | string | Yes | - |
Request Body
{}Responses
200: Successful Response
422: Validation Error
Examples
curl -X POST "https://api.altsportsdata.com/api/credits/{user_id}"}/purchase" \
-H "Content-Type: application/json" \
-d '{}'POST /api/credits/{user_id}"}/add
Add Credits Endpoint
Add credits to user account (admin endpoint)
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
user_id | path | string | Yes | - |
amount | query | number | Yes | - |
description | query | string | No | - |
Responses
200: Successful Response
422: Validation Error
Examples
curl -X POST "https://api.altsportsdata.com/api/credits/{user_id}"}/add" \
-H "Content-Type: application/json"POST /api/stripe/webhook
Stripe Webhook
Handle Stripe webhook events
Responses
200: Successful Response
Examples
curl -X POST "https://api.altsportsdata.com/api/stripe/webhook" \
-H "Content-Type: application/json"POST /process-email
Process Email
Process incoming email
Request Body
{}Responses
200: Successful Response
422: Validation Error
Examples
curl -X POST "https://api.altsportsdata.com/process-email" \
-H "Content-Type: application/json" \
-d '{}'GET /employees
Get Employees
Get all employees
Responses
200: Successful Response
Examples
curl -X GET "https://api.altsportsdata.com/employees" \
-H "Content-Type: application/json"POST /employees
Create Employee
Create a new employee
Request Body
{}Responses
200: Successful Response
422: Validation Error
Examples
curl -X POST "https://api.altsportsdata.com/employees" \
-H "Content-Type: application/json" \
-d '{}'GET /employees/{employee_id}"}
Get Employee
Get a specific employee
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
employee_id | path | integer | Yes | - |
Responses
200: Successful Response
422: Validation Error
Examples
curl -X GET "https://api.altsportsdata.com/employees/{employee_id}"}" \
-H "Content-Type: application/json"PUT /employees/{employee_id}"}
Update Employee
Update an employee
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
employee_id | path | integer | Yes | - |
Request Body
{}Responses
200: Successful Response
422: Validation Error
Examples
curl -X PUT "https://api.altsportsdata.com/employees/{employee_id}"}" \
-H "Content-Type: application/json" \
-d '{}'GET /query-history
Get Query History
Get query history
Responses
200: Successful Response
Examples
curl -X GET "https://api.altsportsdata.com/query-history" \
-H "Content-Type: application/json"POST /query-history
Log Query
Log a new query
Request Body
{}Responses
200: Successful Response
422: Validation Error
Examples
curl -X POST "https://api.altsportsdata.com/query-history" \
-H "Content-Type: application/json" \
-d '{}'GET /query-history/stats
Get Query Stats
Get query statistics
Responses
200: Successful Response
Examples
curl -X GET "https://api.altsportsdata.com/query-history/stats" \
-H "Content-Type: application/json"GET /data-catalog
Get Data Catalog
Get data catalog with available datasets
Responses
200: Successful Response
Examples
curl -X GET "https://api.altsportsdata.com/data-catalog" \
-H "Content-Type: application/json"GET /data-catalog/{dataset_id}"}
Get Dataset Info
Get detailed information about a specific dataset
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
dataset_id | path | string | Yes | - |
Responses
200: Successful Response
422: Validation Error
Examples
curl -X GET "https://api.altsportsdata.com/data-catalog/{dataset_id}"}" \
-H "Content-Type: application/json"POST /data-catalog/validate
Validate Dataset
Validate a dataset
Request Body
{}Responses
200: Successful Response
422: Validation Error
Examples
curl -X POST "https://api.altsportsdata.com/data-catalog/validate" \
-H "Content-Type: application/json" \
-d '{}'POST /rag-query
Process Rag Query
Process a RAG query
Request Body
{}Responses
200: Successful Response
422: Validation Error
Examples
curl -X POST "https://api.altsportsdata.com/rag-query" \
-H "Content-Type: application/json" \
-d '{}'GET /rag-query/status
Get Rag Status
Get RAG system status
Responses
200: Successful Response
Examples
curl -X GET "https://api.altsportsdata.com/rag-query/status" \
-H "Content-Type: application/json"GET /documents
Get Documents
Get all processed documents
Responses
200: Successful Response
Examples
curl -X GET "https://api.altsportsdata.com/documents" \
-H "Content-Type: application/json"POST /process-document
Process Document
Process a document
Request Body
{}Responses
200: Successful Response
422: Validation Error
Examples
curl -X POST "https://api.altsportsdata.com/process-document" \
-H "Content-Type: application/json" \
-d '{}'GET /documents/{document_id}"}
Get Document
Get a specific document
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
document_id | path | integer | Yes | - |
Responses
200: Successful Response
422: Validation Error
Examples
curl -X GET "https://api.altsportsdata.com/documents/{document_id}"}" \
-H "Content-Type: application/json"POST /documents/{document_id}"}/reprocess
Reprocess Document
Reprocess a document
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
document_id | path | integer | Yes | - |
Responses
200: Successful Response
422: Validation Error
Examples
curl -X POST "https://api.altsportsdata.com/documents/{document_id}"}/reprocess" \
-H "Content-Type: application/json"GET /api/pipeline/view
Get Pipeline View
Get current pipeline state with sorting and filtering
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
sort_by | query | string | No | - |
sort_order | query | string | No | - |
stage_filter | query | string | No | - |
Responses
200: Successful Response
422: Validation Error
Examples
curl -X GET "https://api.altsportsdata.com/api/pipeline/view" \
-H "Content-Type: application/json"POST /api/pipeline/stage-change
Change Pipeline Stage
Handle manual stage changes (drag and drop)
Request Body
{}Responses
200: Successful Response
422: Validation Error
Examples
curl -X POST "https://api.altsportsdata.com/api/pipeline/stage-change" \
-H "Content-Type: application/json" \
-d '{}'POST /api/pipeline/process-email
Process Email For Pipeline
Process email and update pipeline automatically
Request Body
{}Responses
200: Successful Response
422: Validation Error
Examples
curl -X POST "https://api.altsportsdata.com/api/pipeline/process-email" \
-H "Content-Type: application/json" \
-d '{}'POST /api/onboard-enhanced
Process Onboarding Email Enhanced
Enhanced email processing that also updates the pipeline
Request Body
{}Responses
200: Successful Response
422: Validation Error
Examples
curl -X POST "https://api.altsportsdata.com/api/onboard-enhanced" \
-H "Content-Type: application/json" \
-d '{}'POST /api/contract/generate-terms
Generate Contract Terms Api
Generate contract terms based in league profile
Request Body
{}Responses
200: Successful Response
422: Validation Error
Examples
curl -X POST "https://api.altsportsdata.com/api/contract/generate-terms" \
-H "Content-Type: application/json" \
-d '{}'POST /api/contract/generate-document
Generate Contract Document Api
Generate contract document from terms
Request Body
{}Responses
200: Successful Response
422: Validation Error
Examples
curl -X POST "https://api.altsportsdata.com/api/contract/generate-document" \
-H "Content-Type: application/json" \
-d '{}'GET /api/contract/templates
Get Contract Templates Api
Get available contract templates
Responses
200: Successful Response
Examples
curl -X GET "https://api.altsportsdata.com/api/contract/templates" \
-H "Content-Type: application/json"POST /api/youtube/extract
Extract Youtube Data
Extract data from YouTube video for sports analysis
Request Body
{}Responses
200: Successful Response
422: Validation Error
Examples
curl -X POST "https://api.altsportsdata.com/api/youtube/extract" \
-H "Content-Type: application/json" \
-d '{}'POST /api/youtube/predict
Predict Sports Outcome
Generate sports predictions and statistics from video data
Request Body
{}Responses
200: Successful Response
422: Validation Error
Examples
curl -X POST "https://api.altsportsdata.com/api/youtube/predict" \
-H "Content-Type: application/json" \
-d '{}'POST /api/youtube/time-series
Extract Time Series
Extract time series data from YouTube video with configurable sampling
Request Body
{}Responses
200: Successful Response
422: Validation Error
Examples
curl -X POST "https://api.altsportsdata.com/api/youtube/time-series" \
-H "Content-Type: application/json" \
-d '{}'POST /api/youtube/analyze-batch
Analyze Youtube Batch
Analyze multiple YouTube URLs in batch
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
sport_override | query | string | No | - |
Request Body
{}Responses
200: Successful Response
422: Validation Error
Examples
curl -X POST "https://api.altsportsdata.com/api/youtube/analyze-batch" \
-H "Content-Type: application/json" \
-d '{}'