Documentation
Everything you need to start tracking metrics with StatFlow. Compatible with the StatHat API — change one URL and your existing code just works.
Getting Started
New to StatFlow? Follow these 5 steps to go from zero to tracking metrics in minutes.
- 1
- 2
Send your first metric
Grab your API key from Dashboard → Settings → API Keys and send a data point with a single curl command.
terminalcurl -X POST https://api.statflow.dev/v1/stat \ -H "Authorization: Bearer sk_live_YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{"stat": "my_first_metric", "count": 1}' - 3
View your dashboard
Your stat appears instantly in the Stats dashboard with auto-generated charts. No configuration needed — data flows in and charts render automatically.
- 4
Set an alert
Go to Dashboard → Alerts to get notified when a metric crosses a threshold — email and webhook supported.
- 5
Create a dashboard
Combine multiple stats into a custom Dashboard to see everything at a glance. Share it with your team or embed it anywhere.
Quick Start
1. Get your API key
Sign up and grab an API key from your dashboard settings.
2. Send your first metric
curl -X POST https://api.statflow.dev/v1/stat \
-H "Authorization: Bearer sk_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{"stat": "my_first_metric", "count": 1}'3. See it in your dashboard
That's it. Your stat appears instantly with auto-generated charts. No configuration needed.
StatHat shuts down April 4, 2026. Export your data before then or it's gone forever.
StatFlow can pull all your stats and historical data automatically — follow the steps below.
Import Your StatHat Data
Bring your existing stats, data points, and history into StatFlow with a one-click import. The entire process takes about ~1 minute per 100 stats.
Get your StatHat access token
Log in to StatHat and go to stathat.com/access to find your access token. This is different from your EZ key — it grants read access to export your data.
Navigate to Dashboard → Import
In your StatFlow account, go to Dashboard → Import.
Paste your access token and click Import
Paste the StatHat access token from step 1 into the input field and hit Import. StatFlow connects to the StatHat API and starts pulling your data.
All your stats and history appear automatically
StatFlow pulls all your stats and historical data points automatically. Once complete, your dashboard will have all your metrics with full history, ready to go.
Authentication
API Endpoints
Base URL: https://api.statflow.dev
Pixel Tracking
Use invisible 1×1 pixel images to track events where JavaScript can't run — email opens, static HTML pages, RSS readers, and more.
Use Cases
- Email open tracking — embed the pixel in HTML emails to count opens
- Static page views — track visits on pages where you can't add JavaScript
- RSS reader tracking — count how many people view your feed items
- AMP pages — works anywhere an
<img>tag is allowed
StatHat Compatibility
Migration from StatHat
Switching from StatHat takes about 2 minutes per service. For each language below: get your API key, change one line, and verify.
1. Get your API key
Sign up at StatFlow and copy your sk_live_ key from Dashboard → Settings → API Keys.
2. Change one line
Replace the StatHat URL/key with your StatFlow URL/key (see language guides below).
3. Verify
Send a test metric and check your dashboard. That's it.
Test your migration
After updating your code, verify everything works with a quick curl test:
If you get {"msg": "ok"}, your migration is complete. Check your dashboard to see the new metric.
StatHat API Compatibility
StatFlow supports the full StatHat API surface. Your existing client libraries, scripts, and integrations work with zero code changes — just swap the base URL.
EZ API
Classic API
Tilde (~) Multi-Stat Syntax
JSON Batch Mode
Feature Compatibility
Client Libraries
Ready to start tracking?
Free tier includes 10 stats and 10K data points/month.