User

@Serializable
data class User(val id: String, val username: String, val role: String, val createdAt: Instant, val updatedAt: Instant? = null, val deletedAt: Instant? = null, val logoUrl: String? = null, val displayName: String? = null, val isAdmin: Boolean = false, val teams: List<Team> = emptyList())

Represents a user in the Umami analytics platform.

This data class maps to the user object returned by various Umami API endpoints including GET /api/users/:userId and GET /api/users.

See also

Constructors

Link copied to clipboard
constructor(id: String, username: String, role: String, createdAt: Instant, updatedAt: Instant? = null, deletedAt: Instant? = null, logoUrl: String? = null, displayName: String? = null, isAdmin: Boolean = false, teams: List<Team> = emptyList())

Properties

Link copied to clipboard
@SerialName(value = "createdAt")
val createdAt: Instant

The timestamp when the user was created (ISO 8601 format).

Link copied to clipboard
@SerialName(value = "deletedAt")
val deletedAt: Instant?

The timestamp when the user was deleted (ISO 8601 format).

Link copied to clipboard
@SerialName(value = "displayName")
val displayName: String?

The display name of the user.

Link copied to clipboard
@SerialName(value = "id")
val id: String

The unique identifier of the user (UUID format).

Link copied to clipboard
@SerialName(value = "isAdmin")
val isAdmin: Boolean

Indicates whether the user has administrative privileges.

Link copied to clipboard
@SerialName(value = "logoUrl")
val logoUrl: String?

The URL of the user's logo.

Link copied to clipboard
@SerialName(value = "role")
val role: String

The role of the user.

Link copied to clipboard
@SerialName(value = "teams")
val teams: List<Team>

The list of teams the user belongs to.

Link copied to clipboard
@SerialName(value = "updatedAt")
val updatedAt: Instant?

The timestamp when the user was last updated (ISO 8601 format).

Link copied to clipboard
@SerialName(value = "username")
val username: String

The username of the user (maximum 255 characters).