Websites

Operations around Website management and statistics.

Endpoints

GET /api/websites
POST /api/websites
GET /api/websites/:websiteId
POST /api/websites/:websiteId
DELETE /api/websites/:websiteId
POST /api/websites/:websiteId/reset
GET /api/websites/:websiteId/recorder

GET /api/websites

Returns all user websites.

Parameters

ParameterTypeDescription
includeTeamsbooleanSet to true to include websites where you are the team owner.
searchstring(optional) Search text.
pagenumber(optional, default 1) Determines page.
pageSizenumber(optional) Determines how many results to return.

Sample response

{
  "data": [
    {
      "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "name": "Example",
      "domain": "example.com",
      "shareId": null,
      "resetAt": null,
      "userId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "teamId": null,
      "createdBy": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "createdAt": "0000-00-00T00:00:00.000Z",
      "updatedAt": "0000-00-00T00:00:00.000Z",
      "deletedAt": null,
      "user": {
        "username": "bob@aol.com",
        "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
      }
    }
  ],
  "count": 1,
  "page": 1,
  "pageSize": 10
}

POST /api/websites

Creates a website.

Parameters

ParameterTypeDescription
namestringThe name of the website in Umami.
domainstringThe full domain of the tracked website.
shareIdstring(optional) A unique string to enable a share URL. Set null to unshare.
teamIdstring(optional) The ID of the team the website will be created under.
idstring(optional) Force a UUID assignment to the website.

Request body

{
  "name": "Test",
  "domain": "example.com"
}

Sample response

{
  "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "name": "Test",
  "domain": "example.com",
  "shareId": null,
  "resetAt": null,
  "userId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "teamId": null,
  "createdBy": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "createdAt": "0000-00-00T00:00:00.000Z",
  "updatedAt": "0000-00-00T00:00:00.000Z",
  "deletedAt": null
}

GET /api/websites/:websiteId

Gets a website by ID.

Sample response

{
  "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "name": "Example",
  "domain": "example.com",
  "shareId": null,
  "resetAt": null,
  "userId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "teamId": null,
  "createdBy": "133660ed-e51c-4ed9-84aa-c86654460cae",
  "createdAt": "2025-10-10T22:01:06.201Z",
  "updatedAt": "2025-10-10T22:02:02.220Z",
  "deletedAt": null
}

POST /api/websites/:websiteId

Updates a website.

Parameters

ParameterTypeDescription
namestringThe name of the website in Umami.
domainstringThe full domain of the tracked website.
shareIdstring(optional) A unique string to enable a share URL. Set null to unshare.
replayConfigobject(optional) Session recording and heatmap configuration.

replayConfig fields

FieldTypeDescription
replayEnabledbooleanEnable or disable session replay recording.
heatmapEnabledbooleanEnable or disable heatmap data collection.
sampleRatenumberFraction of sessions to record for replay (0–1).
heatmapSampleRatenumberFraction of sessions to record for heatmaps (0–1).
maskLevelstringPII masking level: strict or moderate.
maxDurationnumberMaximum recording duration in seconds.
blockSelectorstringCSS selector for elements to exclude from recording.

Request body

{
  "name": "Test",
  "domain": "domain.com",
  "replayConfig": {
    "replayEnabled": true,
    "sampleRate": 0.5
  }
}

Sample response

{
  "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "name": "Example",
  "domain": "example.com",
  "shareId": null,
  "resetAt": null,
  "userId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "teamId": null,
  "recorderEnabled": true,
  "replayConfig": {
    "replayEnabled": true,
    "heatmapEnabled": false,
    "sampleRate": 0.5,
    "heatmapSampleRate": 0,
    "maskLevel": "moderate",
    "maxDuration": 3600,
    "blockSelector": ""
  },
  "createdBy": "133660ed-e51c-4ed9-84aa-c86654460cae",
  "createdAt": "2025-10-10T22:01:06.201Z",
  "updatedAt": "2025-10-10T22:02:02.220Z",
  "deletedAt": null
}

DELETE /api/websites/:websiteId

Deletes a website.

Sample response

{
  "ok": true
}

POST /api/websites/:websiteId/reset

Resets a website by removing all data related to the website.

Sample response

{
  "ok": true
}

GET /api/websites/:websiteId/recorder

Returns the recorder configuration for a website. Used by the tracker to initialize session replay and heatmap collection. This endpoint requires no authentication and is publicly accessible.

If the website does not exist or recording is disabled, returns { "enabled": false }.

Sample response

{
  "enabled": true,
  "replayEnabled": true,
  "heatmapEnabled": false,
  "sampleRate": 0.15,
  "heatmapSampleRate": 0.15,
  "maskLevel": "moderate",
  "maxDuration": 300000,
  "blockSelector": ""
}