API reference
Version 2. All endpoints require a bearer token.
Authentication
Send the token in the Authorization header: Authorization: Bearer $TOKEN. Tokens are scoped; a request outside the token scope returns 403.
Events
| Method | Path | Description |
|---|---|---|
| POST | /v1/events | Store one event. |
| POST | /v1/events/batch | Store up to 500 events in one request. |
Event fields: metric (string, required), value (number, default 1), timestamp (ISO 8601, default now), dimensions (object, up to three string keys).
Metrics
| Method | Path | Description |
|---|---|---|
| GET | /v1/metrics | List metric names in the workspace. |
| GET | /v1/metrics/{name} | Return buckets for a time range. Parameters: from, to, step, group_by. |
| DELETE | /v1/metrics/{name} | Delete a metric and its history. |
Errors
| Status | Meaning |
|---|---|
| 400 | The request body is not valid JSON or a required field is missing. |
| 401 | The token is missing, expired or revoked. |
| 403 | The token does not have the required scope. |
| 404 | The metric does not exist. |
| 429 | Rate limit exceeded; retry after the number of seconds in Retry-After. |
Rate limits
Each token may send 600 requests per minute. A batch counts as one request. Query endpoints are limited to 120 requests per minute per token.