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/teamsPOST /api/users
Creates a user.
Parameters
| Parameter | Type | Description |
|---|---|---|
username | string | The user's username. |
password | string | The user's password. |
role | string | Choose from (admin | user | view-only). |
id | string | (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
| Parameter | Type | Description |
|---|---|---|
username | string | (optional) The user's username. |
password | string | (optional) The user's password. |
role | string | (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
| Parameter | Type | Description |
|---|---|---|
includeTeams | boolean | Set to true to include websites where you are the team owner. |
search | string | (optional) Search text. |
page | number | (optional, default 1) Determines page. |
pageSize | number | (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
| Parameter | Type | Description |
|---|---|---|
page | number | (optional, default 1) Determines page. |
pageSize | number | (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
}