API Documentation

Track metrics with simple HTTP requests. Drop-in compatible and modern REST API.

Legacy Compatible API

These endpoints use the classic /ez, /c, /v format. Just set the base URL.

POST/ez — EZ API

The easiest way to track metrics. Use your API key from Settings.

Request

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

Parameters

  • ezkey — Your API key from Settings (required)
  • stat — Stat name (required)
  • count — Counter value (optional, default: 1)
  • value — Gauge value (optional, use instead of count)
  • t — Unix timestamp (optional)

Response

{ "status": "ok", "msg": "ok" }

POST/c — Counter API

Track counter metrics using an API key.

Request

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

Parameters

  • key — Stat name (required)
  • ukey — Your API key (required)
  • count — Counter value (required)
  • t — Unix timestamp (optional)

POST/v — Value API

Track gauge/value metrics using an API key.

Request

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

Parameters

  • key — Stat name (required)
  • ukey — Your API key (required)
  • value — Numeric value (required)
  • t — Unix timestamp (optional)

Modern REST API

New API with Bearer token authentication. Requires an API key in the Authorization header.

GET/api/v1/stats — List Stats

Get all stats for the authenticated user.

Request

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

Response

{
  "stats": [
    {
      "id": "uuid",
      "name": "api_requests",
      "type": "counter",
      "last_value": 42,
      "last_updated": "2026-03-07T12:00:00Z"
    }
  ]
}

POST/api/v1/stats/:name/count — Increment Counter

Increment a counter stat by a specified amount.

Request

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

POST/api/v1/stats/:name/value — Record Value

Record a value for a gauge stat.

Request

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

GET/api/v1/stats/:name — Get Stat Details

Get detailed information about a specific stat including recent data points.

Request

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

DELETE/api/v1/stats/:name — Delete Stat

Delete a stat and all its data points.

Request

curl -X DELETE https://ezstat.dev/api/v1/stats/api_requests \
  -H "Authorization: Bearer ss_live_xxxxxxxxxxxxxxxxxxxx"

Quick Integration

EzStat works with any language via plain HTTP. No SDK required.

Python

import requests
requests.post("https://ezstat.dev/ez",
  data={"ezkey": "YOUR_API_KEY",
        "stat": "signups", "count": 1})

Node.js

fetch("https://ezstat.dev/ez", {
  method: "POST",
  body: new URLSearchParams({
    ezkey: "[email protected]",
    stat: "page_views", count: "1"
  })
});

Go

http.PostForm("https://ezstat.dev/ez",
  url.Values{"ezkey": {"YOUR_API_KEY"},
    "stat": {"requests"}, "count": {"1"}})

cURL

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