Documentation
Base URL: https://api.metricsink.dev/v1
Authentication
Bearer token per project. Tokens can be scoped to ingest-only.
POST /ingest
Body is NDJSON, one event per line. Max 1 MB per request, unlimited requests per stream.
| Field | Type | Notes |
|---|---|---|
ts | int | Unix seconds. Required. |
dev | string | Device id. Required. |
* | number/string | Any flat fields become columns. |
GET /health
Returns {"ok":true}. Unauthenticated.
Backpressure
On 429 the response includes Retry-After. Devices should buffer locally and resume from the last acknowledged cursor.
Errors
| Code | Meaning |
|---|---|
| 400 | Malformed NDJSON |
| 401 | Bad token |
| 413 | Batch too large |
| 429 | Backpressure |