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}/forecast

Natural 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_cache

ML 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 | correlation

Health Check

GET /health
# {"status":"ok","product":"Workliq AI","version":"1.0.0"}

Full OpenAPI spec: https://api.workliq.me/docs

We use essential cookies for login and security. Optional cookies improve product analytics (Sentry session replays, page-view counts). You can decline — the product still works. Privacy details.