Documentation
How to send metrics, explore charts, set up alerts, and use StatFlow from the dashboard.
Getting started
StatFlow creates a chart the first time you send a data point. No stat registration step.
- Create a free account and sign in to the dashboard.
- Open Settings → API Keys and create a key with write access.
- Send a metric from your app or the curl example in the next section.
- Open Stats in the sidebar — your new metric appears with a live chart.
Send metrics
Send JSON to the public API with your API key. Each request adds one or more data points.
- Send Authorization: Bearer and an sf_ API key with write scope.
- POST JSON to /v1/ingest. Include stat. Include value unless type is counter.
- Use counter for things you increment (page views, errors). Use value for gauges (queue depth, temperature). Omitted type is value.
- For many points at once, POST /v1/ingest/batch — up to 1,000 items.
Example — send your first point:
curl -X POST https://api.statflow.dev/v1/ingest \
-H "Authorization: Bearer sf_your_api_key" \
-H "Content-Type: application/json" \
-d '{"stat":"page.views","type":"counter","timestamp":"2026-06-24T12:00:00Z","metadata":{"env":"prod"}}'Ingest contract
Send one data point. The stat is created the first time a point is accepted. Repo copy for agents: docs/ingest.md.
Endpoint. POST /v1/ingest on https://api.statflow.dev
Auth header. Authorization: Bearer sf_your_api_key. The key must include the write scope.
JSON body. Content-Type: application/json. Accepted properties are stat, value, type, timestamp, and metadata. Any other property is rejected.
Stats & charts
Every metric you send gets its own chart automatically.
- Open Stats in the sidebar to see all metrics in your account.
- Click a stat to open its detail page — zoom the time range, switch resolution, and view recent values.
- Add annotations on the chart to mark deploys, incidents, or other events.
- Export CSV from the stat page when you need a spreadsheet copy.
- Move stats you no longer need to trash; restore them from the trash view if you change your mind.
Import data
Paste historical points as JSON. Each item needs a stat name plus count or value, and an optional unix timestamp in seconds.
- From Overview, choose Import historical data (or open Import in the sidebar).
- Paste a JSON array of up to 1,000 points, or upload a .json file.
- Submit, then confirm the imported stats under Stats.
- Send new points with POST /v1/ingest so live traffic uses the same stat names.
Dashboards
Combine multiple stats on one screen for a team view or status board.
- Open Dashboards → New dashboard and give it a name.
- Add stats as tiles and arrange the layout.
- On Pro and Business plans, use Generate with AI to build a dashboard from your metrics automatically.
- Tune auto-dashboard and digest preferences under Settings → AI.
Alerts
Get notified when a metric crosses a threshold, stops reporting, or matches a rule you define.
- Open Alerts → Create alert and pick the stat to watch.
- Choose alert type: threshold (value above/below a line), delta (change over time), or dead-man (no data received).
- On Pro and Business, describe an alert in plain language — StatFlow compiles it once, then monitors with classical checks.
- Send notifications to email or configure webhooks under Settings → Integrations.
- Pause or edit alerts from the alerts list; open delivery history to see what fired.
AI features
Pro and Business plans include AI-assisted monitoring. Enable it account-wide first, then turn features on per stat where needed.
- Open Settings → AI and turn on Account AI access (admins only).
- On a stat’s detail page, enable anomaly detection to flag unusual spikes or drops.
- Enable the data-quality watchdog on stats that should report on a schedule — you’ll be alerted when data stops arriving.
- Review detected events under Anomalies in the sidebar.
- Optional: turn on the email digest in Settings → AI, pick daily or weekly, and use Preview in browser to see a sample (preview never sends email).
- Business plans can run root-cause analysis from an anomaly to see correlated metrics.
AI narration uses your monthly AI call quota. Classical detection and alert monitoring do not consume AI calls after initial setup.
API keys
API keys are for sending and querying metrics from your servers and scripts.
- Open Settings → API Keys → Create key.
- Copy the secret immediately — it is shown only once.
- Choose read, write, or both. Write access includes read.
- Revoke keys you no longer use; optional expiration dates limit long-lived credentials.
Authorization: Bearer sf_your_api_keyAPI endpoints
Authenticated routes use Authorization: Bearer sf_your_api_key. Base URL: https://api.statflow.dev. Write scope is required for ingest, import, and delete routes.
Ingest
Send counters and values. Stats are created automatically on first data point.
Rate limits
Plan limits for API throughput, request sizes, and monthly usage.
StatFlow enforces sliding-window request limits and monthly plan quotas server-side. When a limit is exceeded, the API returns HTTP 429 with a Retry-After (seconds until the window resets) header and a JSON body like { "error": "…" }. Honor Retry-After and back off before retrying.
Plan throughput and monthly quotas are also summarized on the pricing page. Security overview: /security.
Public developer API throughput
Separate read and write counters per authenticated account. Writes include ingest, batch, and import. Applies to: POST /v1/ingest, /v1/ingest/batch, /v1/stats/batch, /v1/ingest/import, /v1/ingest/import/csv and GET /v1/stats, /v1/stats/{id}/data, /v1/stats/{id}/metadata, /v1/stats/{id}/export.
| Plan | Write requests / min | Read requests / min |
|---|---|---|
| Hobby | 30 | 60 |
| Pro | 300 | 300 |
| Business | 1,000 | 600 |
| Enterprise | 1,000 | 600 |
Unauthenticated fallback: 100 write/min, 30 read/min. Used when the caller is unauthenticated or the plan cannot be resolved.