Skip to main content

Get Event Data

Retrieve a list of custom events and their occurrence statistics for a website.

Endpoint

GET /api/websites/{websiteId}/event-data/events

Headers

Authorization
string
required
Bearer token for authentication

Path Parameters

websiteId
string
required
Website UUID

Query Parameters

startAt
number
required
Start timestamp in milliseconds
endAt
number
required
End timestamp in milliseconds
event
string
Filter by specific event name
path
string
Filter by URL path
referrer
string
Filter by referrer
title
string
Filter by page title
query
string
Filter by query string
os
string
Filter by operating system
browser
string
Filter by browser
device
string
Filter by device type
country
string
Filter by country code
region
string
Filter by region
city
string
Filter by city
tag
string
Filter by event tag
hostname
string
Filter by hostname
language
string
Filter by language

Response

data
array
Array of event data objects

Example Request

curl "https://your-umami-instance.com/api/websites/550e8400-e29b-41d4-a716-446655440000/event-data/events?startAt=1709251200000&endAt=1711929599999" \
  -H "Authorization: Bearer YOUR_TOKEN"

Example Response

{
  "data": [
    {
      "eventName": "purchase",
      "count": 127,
      "properties": {
        "currency": {
          "USD": 95,
          "EUR": 32
        },
        "product": {
          "Laptop": 45,
          "Phone": 52,
          "Tablet": 30
        }
      }
    },
    {
      "eventName": "signup",
      "count": 234,
      "properties": {
        "method": {
          "google": 145,
          "email": 89
        },
        "plan": {
          "free": 189,
          "premium": 45
        }
      }
    },
    {
      "eventName": "newsletter-subscribe",
      "count": 89,
      "properties": {}
    }
  ]
}

Filtering by Event Name

To get data for a specific event:
curl "https://your-umami-instance.com/api/websites/550e8400-e29b-41d4-a716-446655440000/event-data/events?startAt=1709251200000&endAt=1711929599999&event=purchase" \
  -H "Authorization: Bearer YOUR_TOKEN"

Use Cases

This endpoint is useful for:
  • Analyzing custom event frequency
  • Understanding event property distributions
  • Building custom event dashboards
  • Tracking conversion metrics
  • Analyzing user behavior patterns

Error Responses

401
error
Unauthorized - You don’t have permission to view this website’s event data
Event data includes aggregated statistics for custom events tracked via the Send Event endpoint with a name parameter.

Build docs developers (and LLMs) love