Create User

Create a new user account in Alarik.
EndpointMethodAdmin Required
/api/v1/admin/usersPOSTYes

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

StatusReason
400Validation failed (empty name, username, or password)
409Username already exists