Skip to main content

Update Report

Update the configuration of an existing report.

Endpoint

POST /api/reports/{reportId}

Headers

Authorization
string
required
Bearer token for authentication

Path Parameters

reportId
string
required
Report UUID

Request Body

websiteId
string
required
Website UUID
type
string
required
Report type (cannot be changed to a different type)
name
string
required
Updated report name (max 200 characters)
description
string
Updated report description (max 500 characters)
parameters
object
required
Updated report-specific parameters
All fields must be provided, even if only updating some values. The report type-specific parameter requirements must be met.

Response

id
string
Report UUID
websiteId
string
Website UUID
userId
string
User who last updated the report
type
string
Report type
name
string
Updated report name
description
string
Updated report description
parameters
object
Updated report parameters
updatedAt
string
ISO 8601 timestamp of update

Example Request

curl -X POST https://your-umami-instance.com/api/reports/dd0e8400-e29b-41d4-a716-446655440008 \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "websiteId": "550e8400-e29b-41d4-a716-446655440000",
    "type": "funnel",
    "name": "Updated Checkout Funnel",
    "description": "Enhanced checkout tracking",
    "parameters": {
      "startDate": "2024-04-01T00:00:00.000Z",
      "endDate": "2024-04-30T23:59:59.999Z",
      "window": 30,
      "steps": [
        {"type": "path", "value": "/products"},
        {"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": "Updated Checkout Funnel",
  "description": "Enhanced checkout tracking",
  "parameters": {
    "startDate": "2024-04-01T00:00:00.000Z",
    "endDate": "2024-04-30T23:59:59.999Z",
    "window": 30,
    "steps": [
      {"type": "path", "value": "/products"},
      {"type": "path", "value": "/cart"},
      {"type": "path", "value": "/checkout"},
      {"type": "event", "value": "purchase"}
    ]
  },
  "updatedAt": "2024-03-15T16:45:00.000Z"
}

Error Responses

401
error
Unauthorized - You don’t have permission to update this report
404
error
Not Found - Report does not exist
You must have update permissions for the website that owns this report.

Build docs developers (and LLMs) love