Events

Operations around Events and Event data.

Endpoints

GET /api/websites/:websiteId/events
GET /api/websites/:websiteId/events/stats
GET /api/websites/:websiteId/event-data
GET /api/websites/:websiteId/event-data/:eventId
GET /api/websites/:websiteId/event-data/events
GET /api/websites/:websiteId/event-data/fields
GET /api/websites/:websiteId/event-data/properties
GET /api/websites/:websiteId/event-data/values
GET /api/websites/:websiteId/event-data/stats

Filters

All Endpoints marked with filters can now be filtered with the parameters below.

ParameterTypeDescription
pathstringName of URL.
referrerstringName of referrer.
titlestringName of page title.
querystringName of query parameter.
browserstringName of browser.
osstringName of operating system.
devicestringName of device (ex. Mobile).
countrystringName of country.
regionstringName of region/state/province.
citystringName of city.
languagestringName of browser language.
hostnamestringName of hostname.
tagstringName of tag.
eventstringName of event.
distinctIdstringName of distinct ID.
utmSourcestringUTM source.
utmMediumstringUTM medium.
utmCampaignstringUTM campaign name.
utmContentstringUTM content.
utmTermstringUTM term.
segmentuuidUUID of segment.
cohortuuidUUID of cohort.

GET /api/websites/:websiteId/events

Gets website event details within a given time range.

Parameters

ParameterTypeDescription
startAtnumberTimestamp (in ms) of starting date.
endAtnumberTimestamp (in ms) of end date.
searchstring(optional) Search text.
pagenumber(optional, default 1) Determines page.
pageSizenumber(optional, default 20) Determines how many results to return.
filtersobjectCan accept filter parameters.

Sample response

{
  "data": [
    {
      "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "websiteId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "sessionId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "createdAt": "2025-10-15T16:26:28Z",
      "hostname": "umami.is",
      "urlPath": "/docs/api",
      "urlQuery": "",
      "referrerPath": "",
      "referrerQuery": "",
      "referrerDomain": "",
      "country": "US",
      "city": "Scott",
      "device": "desktop",
      "os": "Mac OS",
      "browser": "chrome",
      "pageTitle": "API – Docs - Umami",
      "eventType": 1,
      "eventName": "",
      "hasData": 0
    },
    {
      "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "websiteId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "sessionId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "createdAt": "2025-10-15T16:26:23Z",
      "hostname": "umami.is",
      "urlPath": "/docs/sessions",
      "urlQuery": "",
      "referrerPath": "/docs/distinct-ids",
      "referrerQuery": "",
      "referrerDomain": "umami.is",
      "country": "PL",
      "city": "Warsaw",
      "device": "desktop",
      "os": "Mac OS",
      "browser": "chrome",
      "pageTitle": "Sessions – Docs - Umami",
      "eventType": 2,
      "eventName": "login-button-header",
      "hasData": 0
    }
  ],
  "count": 2,
  "page": 1,
  "pageSize": 20
}

GET /api/websites/:websiteId/events/stats

Gets aggregated event statistics within a given time range, with optional period comparison.

Parameters

ParameterTypeDescription
startAtnumberTimestamp (in ms) of starting date.
endAtnumberTimestamp (in ms) of end date.
comparestring(optional) Comparison period (prev | yoy).
filtersobject(optional) Can accept filter parameters.

Sample response

{
    "data": {
        "events": 753,
        "visitors": 607,
        "visits": 687,
        "uniqueEvents": 8,
        "comparison": {
            "events": 1809,
            "visitors": 1374,
            "visits": 1655,
            "uniqueEvents": 10
        }
    }
}

GET /api/websites/:websiteId/event-data

Gets event data for a website within a given time range, grouped by event.

Parameters

ParameterTypeDescription
startAtnumberTimestamp (in ms) of starting date.
endAtnumberTimestamp (in ms) of end date.
pagenumber(optional, default 1) Determines page.
pageSizenumber(optional, default 20) Determines how many results to return.
filtersobjectCan accept filter parameters.

Sample response

{
  "data": [
    {
      "websiteId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "eventId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "eventName": "button-click",
      "eventProperties": [
        {
          "dataKey": "id",
          "stringValue": "signup-btn",
          "numberValue": null,
          "dateValue": null,
          "dataType": 1,
          "createdAt": "2025-10-15T16:26:28Z"
        },
        {
          "dataKey": "name",
          "stringValue": "Sign Up",
          "numberValue": null,
          "dateValue": null,
          "dataType": 1,
          "createdAt": "2025-10-15T16:26:28Z"
        }
      ]
    },
    {
      "websiteId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "eventId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "eventName": "revenue-demo",
      "eventProperties": [
        {
          "dataKey": "currency",
          "stringValue": "USD",
          "numberValue": null,
          "dateValue": null,
          "dataType": 1,
          "createdAt": "2025-10-10T12:31:03Z"
        },
        {
          "dataKey": "revenue",
          "stringValue": "40.0000",
          "numberValue": 40,
          "dateValue": null,
          "dataType": 2,
          "createdAt": "2025-10-10T12:31:03Z"
        }
      ]
    }
  ],
  "count": 2,
  "page": 1,
  "pageSize": 20
}

GET /api/websites/:websiteId/event-data/:eventId

Gets event-data for a individual event

Sample response

[
  {
    "websiteId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "sessionId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "eventId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "urlPath": "/",
    "eventName": "revenue-demo",
    "dataKey": "currency",
    "stringValue": "USD",
    "numberValue": null,
    "dateValue": null,
    "dataType": 1,
    "createdAt": "2025-10-10T12:31:03Z"
  },
  {
    "websiteId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "sessionId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "eventId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "urlPath": "/",
    "eventName": "revenue-demo",
    "dataKey": "revenue",
    "stringValue": "40.0000",
    "numberValue": 40,
    "dateValue": null,
    "dataType": 2,
    "createdAt": "2025-10-10T12:31:03Z"
  }
]

GET /api/websites/:websiteId/event-data/events

Gets event data names, properties, and counts

Parameters

ParameterTypeDescription
startAtnumberTimestamp (in ms) of starting date.
endAtnumberTimestamp (in ms) of end date.
eventstring(optional) Event name filter.
filtersobjectCan accept filter parameters.

Sample response

[
  {
    "eventName": "button-click",
    "propertyName": "id",
    "dataType": 1,
    "total": 4
  },
  {
    "eventName": "button-click",
    "propertyName": "name",
    "dataType": 1,
    "total": 4
  },
  {
    "eventName": "track-product",
    "propertyName": "price",
    "dataType": 2,
    "total": 2
  }
]

GET /api/websites/:websiteId/event-data/fields

Gets event data property and value counts within a given time range.

Parameters

ParameterTypeDescription
startAtnumberTimestamp (in ms) of starting date.
endAtnumberTimestamp (in ms) of end date.
filtersobjectCan accept filter parameters.

Sample response

[
  {
    "propertyName": "age",
    "dataType": 2,
    "value": "33",
    "total": 1
  },
  {
    "propertyName": "age",
    "dataType": 2,
    "value": "31",
    "total": 4
  },
  {
    "propertyName": "gender",
    "dataType": 1,
    "value": "female",
    "total": 4
  },
  {
    "propertyName": "gender",
    "dataType": 1,
    "value": "male",
    "total": 1
  }
]

GET /api/websites/:websiteId/event-data/properties

Gets event name and property counts for a website.

Parameters

ParameterTypeDescription
startAtnumberTimestamp (in ms) of starting date.
endAtnumberTimestamp (in ms) of end date.
filtersobjectCan accept filter parameters.

Sample response

[
  {
    "eventName": "revenue-demo",
    "propertyName": "revenue",
    "total": 122
  },
  {
    "eventName": "revenue-demo",
    "propertyName": "currency",
    "total": 122
  }
]

GET /api/websites/:websiteId/event-data/values

Gets event data counts for a given event and property

Parameters

ParameterTypeDescription
startAtnumberTimestamp (in ms) of starting date.
endAtnumberTimestamp (in ms) of end date.
eventstringEvent name.
propertyNamestringProperty name.
filtersobjectCan accept filter parameters.

Sample response

[
  {
    "value": "Male",
    "total": 28
  },
  {
    "value": "Female",
    "total": 26
  }
]

GET /api/websites/:websiteId/event-data/stats

Gets aggregated website events, properties, and records within a given time range.

Parameters

ParameterTypeDescription
startAtnumberTimestamp (in ms) of starting date.
endAtnumberTimestamp (in ms) of end date.
filtersobjectCan accept filter parameters.

Sample response

[
  {
    "events": 16,
    "properties": 13,
    "records": 26
  }
]