Per-name event counts

GET/v1/events/stats

Secret key — sk_… or sk_test_… · Base URL https://api.volanea.com

Count and first/last-seen timestamp for every event name, most frequent first.

Windowing is opt-in. With no range parameters this covers the project's whole history, which is what it did before ranges existed — narrowing the default would have changed the meaning of a number callers are already charting. Pass days for a rolling window or from/to for an explicit one; the two forms are mutually exclusive and sending both is a 422 rather than a silent choice between them.

When a range is given the response carries a window object echoing it back, and firstSeen/lastSeen become the extremes inside that window rather than the event's all-time first sighting. A request with no range omits window entirely.

Query parameters

  • daysinteger

    Rolling window, in days (1–365) counting back from now. Mutually exclusive with `from`/`to`. Omit for all time.

  • fromdate-time

    Start of an explicit window (ISO 8601). May be sent without `to` for an open-ended range.

  • todate-time

    End of an explicit window (ISO 8601), inclusive — `to` on a date includes that whole day rather than stopping at its start.

Response

Per-name stats.

  • dataobject[]
    • namestring
    • countinteger
    • firstSeeninteger

      Unix ms.

    • lastSeeninteger

      Unix ms.

Errors

Every failure returns the standard envelope — branch on `code`, never on the wording of `error`.

  • 401Missing or invalid API key.
  • 422Request validation failed (code `validation_error`, 422).

Request

curl https://api.volanea.com/v1/events/stats?days=value&from=value \
  -H "Authorization: Bearer sk_..."

Response

200 · application/json

{
  "success": true,
  "data": {
    "data": [
      {
        "name": "Welcome",
        "count": 1,
        "firstSeen": 1,
        "lastSeen": 1
      }
    ]
  }
}

92 endpoints · OpenAPI document