Edit User
Update an existing user's details in Alarik.
| Endpoint | Method | Admin Required |
|---|---|---|
/api/v1/admin/users | PUT | Yes |
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
| Status | Reason |
|---|---|
400 | Validation failed (invalid UUID, empty name or username) |
409 | Username already exists (taken by another user) |