Skip to content

API Reference

The numbrs API is a simple HTTP REST API for pushing metric data. It’s intentionally minimal — one endpoint, one job.

https://numbrs.lol/api

If you’re self-hosting, replace this with your Vercel deployment URL.

All API requests require an API key passed as a Bearer token:

Authorization: Bearer YOUR_API_KEY

Find your API key under Settings → API Keys in the numbrs app.


Push one or more metric data points.

Request body:

{
"metric": "server.cpu_pct",
"value": 23.4,
"timestamp": "2025-03-25T20:00:00Z",
"tags": {
"host": "mac-mini"
}
}

Fields:

FieldTypeRequiredDescription
metricstringyesMetric name. Dot-separated recommended, e.g. server.cpu_pct
valuenumberyesThe numeric value to record
timestampISO 8601 stringnoWhen the measurement was taken. Defaults to current server time.
tagsobjectnoKey-value string pairs. Used for filtering in dashboards.

Example:

Terminal window
curl -X POST https://numbrs.lol/api/ingest \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{"metric": "server.cpu_pct", "value": 23.4, "tags": {"host": "mac-mini"}}'

Send up to 100 metrics in a single request using an array:

[
{"metric": "server.cpu_pct", "value": 23.4, "tags": {"host": "mac-mini"}},
{"metric": "server.mem_used_gb", "value": 6.1, "tags": {"host": "mac-mini"}},
{"metric": "server.disk_free_gb","value": 89.2, "tags": {"host": "mac-mini"}}
]

Example:

Terminal window
curl -X POST https://numbrs.lol/api/ingest \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '[
{"metric": "server.cpu_pct", "value": 23.4},
{"metric": "server.mem_used_gb", "value": 6.1}
]'

Success (200 OK):

{"ok": true}

Error (400 Bad Request):

{
"error": "Invalid request body",
"details": "value must be a number"
}
CodeMeaning
200Data accepted and stored
400Bad request — malformed JSON or invalid field types
401Missing or invalid API key
422Validation error — required fields missing or wrong type
429Rate limited — too many requests, back off and retry
500Server error — retry after a short delay

The ingest endpoint accepts up to 60 requests per minute per API key. Use batch requests when pushing multiple metrics to stay well within limits.

If you exceed the rate limit, you’ll receive a 429 response with a Retry-After header indicating when you can retry.


There are no enforced naming rules, but a consistent source.category.name pattern makes dashboards much easier to work with:

server.cpu_pct
server.disk.used_gb
github.myrepo.deploy_count
bitcoin.price_usd
home.temp_c

Lowercase with underscores for word separation. Dots for hierarchy.