Create Report
Create a new saved report for a website. Reports allow you to save and reuse specific analytics configurations.
Endpoint
Bearer token for authentication
Request Body
Report type. Must be one of:
attribution - Attribution analysis
breakdown - Multi-dimensional breakdown
funnel - Conversion funnel analysis
goal - Goal tracking
journey - User journey paths
retention - User retention cohorts
revenue - Revenue tracking
utm - UTM campaign analysis
Report name (max 200 characters)
Report description (max 500 characters)
Report-specific parameters (varies by report type)
Report Parameters by Type
{
"startDate": "2024-03-01T00:00:00.000Z",
"endDate": "2024-03-31T23:59:59.999Z",
"type": "event",
"value": "signup",
"operator": "count", // optional: count, sum, average
"property": "amount" // optional: required for sum/average
}
{
"startDate": "2024-03-01T00:00:00.000Z",
"endDate": "2024-03-31T23:59:59.999Z",
"window": 30, // days
"steps": [
{"type": "path", "value": "/landing"},
{"type": "event", "value": "signup"},
{"type": "event", "value": "purchase"}
] // min 2, max 8 steps
}
{
"startDate": "2024-03-01T00:00:00.000Z",
"endDate": "2024-03-31T23:59:59.999Z",
"steps": 5, // 2-7
"startStep": "/landing", // optional
"endStep": "/checkout" // optional
}
{
"startDate": "2024-03-01T00:00:00.000Z",
"endDate": "2024-03-31T23:59:59.999Z",
"timezone": "America/New_York" // optional
}
{
"startDate": "2024-03-01T00:00:00.000Z",
"endDate": "2024-03-31T23:59:59.999Z",
"currency": "USD",
"timezone": "America/New_York" // optional
}
{
"startDate": "2024-03-01T00:00:00.000Z",
"endDate": "2024-03-31T23:59:59.999Z",
"model": "first-click", // or "last-click"
"type": "event", // or "path"
"step": "purchase",
"currency": "USD" // optional
}
{
"startDate": "2024-03-01T00:00:00.000Z",
"endDate": "2024-03-31T23:59:59.999Z",
"fields": ["browser", "device", "country"] // max 3
}
{
"startDate": "2024-03-01T00:00:00.000Z",
"endDate": "2024-03-31T23:59:59.999Z"
}
Response
User who created the report
ISO 8601 timestamp of creation
Example Request
curl -X POST https://your-umami-instance.com/api/reports \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"websiteId": "550e8400-e29b-41d4-a716-446655440000",
"type": "funnel",
"name": "Checkout Funnel",
"description": "Track users through checkout",
"parameters": {
"startDate": "2024-03-01T00:00:00.000Z",
"endDate": "2024-03-31T23:59:59.999Z",
"window": 30,
"steps": [
{"type": "path", "value": "/cart"},
{"type": "path", "value": "/checkout"},
{"type": "event", "value": "purchase"}
]
}
}'
Example Response
{
"id": "dd0e8400-e29b-41d4-a716-446655440008",
"websiteId": "550e8400-e29b-41d4-a716-446655440000",
"userId": "660e8400-e29b-41d4-a716-446655440001",
"type": "funnel",
"name": "Checkout Funnel",
"description": "Track users through checkout",
"parameters": {
"startDate": "2024-03-01T00:00:00.000Z",
"endDate": "2024-03-31T23:59:59.999Z",
"window": 30,
"steps": [
{"type": "path", "value": "/cart"},
{"type": "path", "value": "/checkout"},
{"type": "event", "value": "purchase"}
]
},
"createdAt": "2024-03-15T14:30:00.000Z"
}
Error Responses
Unauthorized - You don’t have permission to create reports for this website
You must have update permissions for the website to create reports.