Users

Operations around User management.

These endpoints are only available for self-hosted instances for admin users and not Umami Cloud.

Endpoints

POST /api/users
GET /api/users/:userId
POST /api/users/:userId
DELETE /api/users/:userId
GET /api/users/:userId/websites
GET /api/users/:userId/teams

POST /api/users

Creates a user.

Parameters

ParameterTypeDescription
usernamestringThe user's username.
passwordstringThe user's password.
rolestringChoose from (admin | user | view-only).
idstring(optional) Force a UUID assignment to the user.

Request body

{
  "username": "member",
  "password": "umami",
  "role": "user"
}

Sample response

{
  "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "username": "member",
  "role": "user"
}

GET /api/users/:userId

Gets a user by ID.

Sample response

{
  "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "username": "member",
  "role": "user",
  "createdAt": "2025-10-10T23:09:16.524Z"
}

POST /api/users/:userId

Updates a user.

Parameters

ParameterTypeDescription
usernamestring(optional) The user's username.
passwordstring(optional) The user's password.
rolestring(optional) Select from admin, user, view-only.

Request body

{
  "username": "admin",
  "password": "umami",
  "role": "admin"
}

Sample response

{
  "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "username": "admin",
  "role": "admin",
  "createdAt": "0000-00-00T00:00:00.000Z"
}

DELETE /api/users/:userId

Deletes a user.

Sample response

{
  "ok": true
}

GET /api/users/:userId/websites

Gets all websites that belong to a user.

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": "My Website",
      "domain": "mywebsite.com",
      "shareId": null,
      "resetAt": null,
      "userId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "teamId": null,
      "createdBy": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "createdAt": "2025-09-16T19:59:32.957Z",
      "updatedAt": "2025-09-16T19:59:32.957Z",
      "deletedAt": null,
      "user": {
        "username": "admin",
        "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
      }
    }
  ],
  "count": 1,
  "page": 1,
  "pageSize": 20
}

GET /api/users/:userId/teams

Gets all teams that belong to a user.

Parameters

ParameterTypeDescription
pagenumber(optional, default 1) Determines page.
pageSizenumber(optional) Determines how many results to return.

Sample response

{
  "data": [
    {
      "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "name": "Umami Software, Inc",
      "accessCode": "team_qunhu7q6NVZDu6Cg",
      "logoUrl": null,
      "createdAt": "2025-09-24T22:08:35.259Z",
      "updatedAt": "2025-09-24T22:08:35.259Z",
      "deletedAt": null,
      "members": [
        {
          "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
          "teamId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
          "userId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
          "role": "team-owner",
          "createdAt": "2025-09-24T22:08:35.302Z",
          "updatedAt": "2025-09-24T22:08:35.302Z",
          "user": {
            "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
            "username": "admin"
          }
        }
      ],
      "_count": {
        "websites": 0,
        "members": 1
      }
    }
  ],
  "count": 1,
  "page": 1,
  "pageSize": 20
}