// docs

API Documentation

Track metrics with plain HTTP. No SDK. No config files. Copy, paste, done.

// public tracking

No-Auth Tracking

Track metrics without authentication. Uses MVP namespace to isolate data. Rate limited.

POST/api/public

Public tracking endpoint for SOLO MVPs. No API key required.

Auth: None
curl -X POST https://api.ezstat.dev/api/public \
  -H "Content-Type: application/json" \
  -d '{"mvp": "myapp", "stat": "page_views", "count": 1}'

Parameters

  • mvpMVP name used as namespace (required)
  • statStat name within the MVP (required)
  • countCounter increment value (use instead of value)
  • valueGauge value (use instead of count)
  • tUnix timestamp (optional)
// legacy compatible

Drop-in StatHat API

Same /ez, /c, /v endpoints. Change one URL and your existing code works.

POST/ez

The easiest way to track metrics.

curl -X POST https://api.ezstat.dev/ez \
  -d "ezkey=YOUR_API_KEY" \
  -d "stat=api_requests" \
  -d "count=1"

Parameters

  • ezkeyYour API key from Settings (required)
  • statStat name (required)
  • countCounter value (optional, default: 1)
  • valueGauge value (use instead of count)
  • tUnix timestamp (optional)
POST/c

Track counter metrics using an API key.

curl -X POST https://api.ezstat.dev/c \
  -d "key=api_requests" \
  -d "ukey=ss_live_xxx" \
  -d "count=1"

Parameters

  • keyStat name (required)
  • ukeyYour API key (required)
  • countCounter value (required)
  • tUnix timestamp (optional)
POST/v

Track gauge/value metrics.

curl -X POST https://api.ezstat.dev/v \
  -d "key=response_time" \
  -d "ukey=ss_live_xxx" \
  -d "value=142"

Parameters

  • keyStat name (required)
  • ukeyYour API key (required)
  • valueNumeric value (required)
  • tUnix timestamp (optional)
// modern rest api

Bearer Token API

New API with Bearer token auth. Generate keys in Settings.

GET/api/v1/stats

List all stats for the authenticated user.

Auth: Bearer
curl -X GET https://api.ezstat.dev/api/v1/stats \
  -H "Authorization: Bearer ss_live_xxx"
POST/api/v1/stats

Create a new stat.

Auth: Bearer
curl -X POST https://api.ezstat.dev/api/v1/stats \
  -H "Authorization: Bearer ss_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{"name": "new_stat", "type": "counter"}'

Parameters

  • nameStat name (required)
  • typecounter or gauge (required)
POST/api/v1/stats/:name/count

Increment a counter stat.

Auth: Bearer
curl -X POST https://api.ezstat.dev/api/v1/stats/api_requests/count \
  -H "Authorization: Bearer ss_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{"count": 1}'
POST/api/v1/stats/:name/value

Record a value for a gauge stat.

Auth: Bearer
curl -X POST https://api.ezstat.dev/api/v1/stats/response_time/value \
  -H "Authorization: Bearer ss_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{"value": 142}'
GET/api/v1/stats/:name

Get stat details with data points.

Auth: Bearer
curl -X GET "https://api.ezstat.dev/api/v1/stats/api_requests?from=2026-03-01&to=2026-03-07" \
  -H "Authorization: Bearer ss_live_xxx"
DELETE/api/v1/stats/:name

Delete a stat and all its data points. Irreversible.

Auth: Bearer
curl -X DELETE https://api.ezstat.dev/api/v1/stats/api_requests \
  -H "Authorization: Bearer ss_live_xxx"
POST/api/v1/stats/:name/share

Generate a share token for public embedding.

Auth: Bearer
curl -X POST https://api.ezstat.dev/api/v1/stats/api_requests/share \
  -H "Authorization: Bearer ss_live_xxx"
DELETE/api/v1/stats/:name/share

Revoke a share token.

Auth: Bearer
curl -X DELETE https://api.ezstat.dev/api/v1/stats/api_requests/share \
  -H "Authorization: Bearer ss_live_xxx"
// data

Dashboard & Export

GET/api/v1/dashboard

Get dashboard data with aggregated stats.

Auth: Bearer
curl -X GET "https://api.ezstat.dev/api/v1/dashboard?range=24h" \
  -H "Authorization: Bearer ss_live_xxx"

Parameters

  • range1h, 6h, 24h, 7d, or 30d (default: 24h)
GET/api/v1/export

Export all user stats as CSV or JSON. Handles large datasets via chunking.

Auth: Bearer
curl -X GET "https://api.ezstat.dev/api/v1/export?format=json" \
  -H "Authorization: Bearer ss_live_xxx"
GET/api/v1/health

Health check endpoint.

Auth: None
curl -X GET https://api.ezstat.dev/api/v1/health
// alerting

Alerts

GET/api/v1/alerts

List all alerts.

Auth: Bearer
curl -X GET https://api.ezstat.dev/api/v1/alerts \
  -H "Authorization: Bearer ss_live_xxx"
POST/api/v1/alerts

Create a new alert.

Auth: Bearer
curl -X POST https://api.ezstat.dev/api/v1/alerts \
  -H "Authorization: Bearer ss_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{"stat_name": "api_requests", "condition": ">", "threshold": 1000}'
DELETE/api/v1/alerts/:id

Delete an alert.

Auth: Bearer
curl -X DELETE https://api.ezstat.dev/api/v1/alerts/alert-uuid \
  -H "Authorization: Bearer ss_live_xxx"
// embed

Embeddable Charts

Public embeddable endpoints. Requires share token.

GET/api/v1/embed/:statId

Get embeddable data for a stat.

Auth: None (token param)
curl -X GET "https://api.ezstat.dev/api/v1/embed/stat-uuid?token=share_token&range=24h"

Parameters

  • statIdStat UUID (must be valid UUID format)
  • tokenShare token (required)
  • range1h, 6h, 24h, 7d, 30d
// ai features

AI-Powered Analytics

Requires Pro plan or above.

Anomaly Detection

POST/api/v1/anomalies/detect

Run anomaly detection.

Auth: BearerPro+
curl -X POST https://api.ezstat.dev/api/v1/anomalies/detect \
  -H "Authorization: Bearer ss_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{"sensitivity": "medium"}'

Parameters

  • sensitivitylow, medium, or high (required)
GET/api/v1/anomalies

List all detected anomalies.

Auth: BearerPro+
curl -X GET https://api.ezstat.dev/api/v1/anomalies \
  -H "Authorization: Bearer ss_live_xxx"

Correlations

POST/api/v1/correlations/compute

Compute Pearson correlations.

Auth: BearerPro+
curl -X POST https://api.ezstat.dev/api/v1/correlations/compute \
  -H "Authorization: Bearer ss_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{"range": "7d"}'

Natural Language Queries

POST/api/v1/query

Ask questions about your stats.

Auth: BearerPro+
curl -X POST https://api.ezstat.dev/api/v1/query \
  -H "Authorization: Bearer ss_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{"query": "Which stats had anomalies yesterday?"}'

Threshold Suggestions

GET/api/v1/thresholds/suggest

Get AI-suggested alert thresholds.

Auth: BearerPro+
curl -X GET https://api.ezstat.dev/api/v1/thresholds/suggest \
  -H "Authorization: Bearer ss_live_xxx"

Daily Digest

POST/api/v1/digest/subscribe

Subscribe to daily digests.

Auth: BearerPro+
curl -X POST https://api.ezstat.dev/api/v1/digest/subscribe \
  -H "Authorization: Bearer ss_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{"frequency": "daily", "timezone": "America/New_York"}'
DELETE/api/v1/digest/subscribe

Unsubscribe from digests.

Auth: BearerPro+
curl -X DELETE https://api.ezstat.dev/api/v1/digest/subscribe \
  -H "Authorization: Bearer ss_live_xxx"
// integrations

Integrations

Requires Team plan or above.

GET/api/v1/integrations

List all integrations.

Auth: BearerTeam+
curl -X GET https://api.ezstat.dev/api/v1/integrations \
  -H "Authorization: Bearer ss_live_xxx"
POST/api/v1/integrations

Create a new integration.

Auth: BearerTeam+
curl -X POST https://api.ezstat.dev/api/v1/integrations \
  -H "Authorization: Bearer ss_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{"type": "slack", "webhook_url": "https://hooks.slack.com/..."}'
DELETE/api/v1/integrations/:id

Delete an integration.

Auth: BearerTeam+
curl -X DELETE https://api.ezstat.dev/api/v1/integrations/int-uuid \
  -H "Authorization: Bearer ss_live_xxx"
// authentication

API Keys

GET/api/v1/auth/api-keys

List all API keys.

Auth: Bearer
curl -X GET https://api.ezstat.dev/api/v1/auth/api-keys \
  -H "Authorization: Bearer ss_live_xxx"
POST/api/v1/auth/api-keys

Create a new API key.

Auth: Bearer
curl -X POST https://api.ezstat.dev/api/v1/auth/api-keys \
  -H "Authorization: Bearer ss_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{"name": "My API Key"}'
DELETE/api/v1/auth/api-keys/:id

Revoke an API key.

Auth: Bearer
curl -X DELETE https://api.ezstat.dev/api/v1/auth/api-keys/key-uuid \
  -H "Authorization: Bearer ss_live_xxx"
// billing

Billing

POST/api/stripe/checkout

Create Stripe checkout session.

Auth: Session
curl -X POST https://api.ezstat.dev/api/stripe/checkout \
  -H "Content-Type: application/json" \
  -d '{"priceId": "pro"}'
POST/api/billing/portal

Open billing portal.

Auth: Session
curl -X POST https://api.ezstat.dev/api/billing/portal
// integration

Quick Start

Works with any language via plain HTTP.

Python
import requests
requests.post("https://api.ezstat.dev/ez",
  data={"ezkey": "YOUR_API_KEY",
        "stat": "signups", "count": 1})
Node.js
fetch("https://api.ezstat.dev/ez", {
  method: "POST",
  body: new URLSearchParams({
    ezkey: "YOUR_API_KEY",
    stat: "page_views", count: "1"
  })
});
Go
http.PostForm("https://api.ezstat.dev/ez",
  url.Values{"ezkey": {"YOUR_API_KEY"},
    "stat": {"requests"}, "count": {"1"}})
cURL
curl -X POST https://api.ezstat.dev/ez \
  -d "ezkey=YOUR_API_KEY" \
  -d "stat=deploys" -d "count=1"
// migration

Switching from StatHat

1.Sign up at ezstat.dev and grab your API key.
2.Replace URL: sed -i 's/stathat.com/api.ezstat.dev/g' your-code/
3.Replace your StatHat key with your EzStat API key.
4.Deploy. Stats auto-create on first POST.