Get Events
Retrieve a list of tracked events for a specific website within a date range.
Endpoint
GET /api/websites/{websiteId}/events
Bearer token for authentication
Path Parameters
Query Parameters
Start timestamp in milliseconds
End timestamp in milliseconds
Filter by operating system
Page number for pagination
Number of results per page
Response
Array of event objects
Custom event name (if applicable)
Custom event data (if applicable)
Example Request
curl "https://your-umami-instance.com/api/websites/550e8400-e29b-41d4-a716-446655440000/events?startAt=1709251200000&endAt=1711929599999" \
-H "Authorization: Bearer YOUR_TOKEN"
Example Response
{
"data": [
{
"eventId": "hh0e8400-e29b-41d4-a716-446655440012",
"websiteId": "550e8400-e29b-41d4-a716-446655440000",
"sessionId": "ff0e8400-e29b-41d4-a716-446655440010",
"createdAt": "2024-03-15T14:30:25.000Z",
"urlPath": "/products",
"urlQuery": "category=electronics",
"referrerPath": "/",
"referrerQuery": "",
"referrerDomain": "example.com",
"pageTitle": "Products",
"eventName": null,
"eventData": null,
"hostname": "example.com",
"browser": "Chrome",
"os": "Windows",
"device": "desktop",
"screen": "1920x1080",
"language": "en-US",
"country": "US",
"region": "California",
"city": "San Francisco"
},
{
"eventId": "ii0e8400-e29b-41d4-a716-446655440013",
"websiteId": "550e8400-e29b-41d4-a716-446655440000",
"sessionId": "ff0e8400-e29b-41d4-a716-446655440010",
"createdAt": "2024-03-15T14:32:10.000Z",
"urlPath": "/checkout",
"urlQuery": "",
"referrerPath": "/products",
"referrerQuery": "category=electronics",
"referrerDomain": "example.com",
"pageTitle": "Checkout",
"eventName": "purchase",
"eventData": {
"amount": 99.99,
"currency": "USD",
"product": "Laptop"
},
"hostname": "example.com",
"browser": "Chrome",
"os": "Windows",
"device": "desktop",
"screen": "1920x1080",
"language": "en-US",
"country": "US",
"region": "California",
"city": "San Francisco"
}
],
"count": 2,
"page": 1,
"pageSize": 20
}
Filtering Events
You can combine multiple filters to narrow down results:
curl "https://your-umami-instance.com/api/websites/550e8400-e29b-41d4-a716-446655440000/events?startAt=1709251200000&endAt=1711929599999&event=purchase&country=US" \
-H "Authorization: Bearer YOUR_TOKEN"
Error Responses
Unauthorized - You don’t have permission to view this website’s events
Use the filter parameters to segment your event data by various dimensions like location, device, or custom event names.