Create User
Create a new user account in Alarik.
| Endpoint | Method | Admin Required |
|---|---|---|
/api/v1/admin/users | POST | Yes |
Creates a new user account.
Request Body
name
string required
Display name of the user.
username
string required
Unique username for authentication. Must be unique across all users.
password
string required
Password for the user account.
isAdmin
boolean required
Whether the user should have admin privileges.
Example
{
"name": "John Doe",
"username": "john",
"password": "securePassword123",
"isAdmin": false
}
Response
Returns the created user (without password):
{
"id": "A1B2C3D4-E5F6-7890-ABCD-EF1234567890",
"name": "John Doe",
"username": "john",
"isAdmin": false
}
Errors
| Status | Reason |
|---|---|
400 | Validation failed (empty name, username, or password) |
409 | Username already exists |