Edit User

Update an existing user's details in Alarik.
EndpointMethodAdmin Required
/api/v1/admin/usersPUTYes

Updates an existing user's profile information.

This endpoint does not update the user's password. Password changes should be handled separately.

Request Body

id
string (UUID) required
The unique identifier of the user to update.
name
string required
New display name for the user.
username
string required
New username. Must be unique across all users.
isAdmin
boolean required
Whether the user should have admin privileges.

Example

{
    "id": "A1B2C3D4-E5F6-7890-ABCD-EF1234567890",
    "name": "John Smith",
    "username": "johnsmith",
    "isAdmin": true
}

Response

Returns the updated user:

{
    "id": "A1B2C3D4-E5F6-7890-ABCD-EF1234567890",
    "name": "John Smith",
    "username": "johnsmith",
    "isAdmin": true
}

Errors

StatusReason
400Validation failed (invalid UUID, empty name or username)
409Username already exists (taken by another user)