API Reference
Workliq AI REST API. All endpoints require a Bearer token from /api/auth/login.
Authentication
# Login
POST /api/auth/login
{"email":"user@example.com","password":"..."}
# Returns: {"access_token":"...","plan":"free"}
# Register
POST /api/auth/register
{"name":"...","email":"...","password":"min 8 chars"}
# Me
GET /api/auth/me
Authorization: Bearer <token>Dataset Operations
# Upload CSV/Excel/Parquet/JSON
POST /api/analyst/datasets/upload
Content-Type: multipart/form-data
file=@data.csv
# List datasets
GET /api/analyst/datasets
# Dataset health score
GET /api/analyst/datasets/{id}/health
# Insights
GET /api/analyst/datasets/{id}/insights
# Anomalies
GET /api/analyst/datasets/{id}/anomalies
# Forecast
GET /api/analyst/datasets/{id}/forecastNatural Language Query
POST /api/analyst/ask
Authorization: Bearer <token>
{"question":"Show revenue by product","dataset_id":"abc123"}
# Returns: sql, python_equivalent, data, chart_type_hint, from_cacheML Endpoints
# Segmentation
POST /api/analyst/ml
{"dataset_id":"...","analysis_type":"segment","n_clusters":3}
# Regression
POST /api/analyst/ml
{"dataset_id":"...","analysis_type":"regression","target_column":"revenue","feature_columns":["cost","qty"]}Statistical Tests
POST /api/analyst/stats
{"dataset_id":"...","test_type":"ttest","column":"revenue","group_column":"product","group_a":"Laptop","group_b":"Phone"}
# test_type: ttest | normality | anova | correlationHealth Check
GET /health
# {"status":"ok","product":"Workliq AI","version":"1.0.0"}Full OpenAPI spec: https://api.workliq.me/docs