Create an account
POST/users
Required role: admin. Only an account or token with the admin role can call this operation.
Example request
curl --request POST \
--header "Authorization: Bearer $HOSERVA_TOKEN" \
--header "Content-Type: application/json" \
--data @body.json \
"https://$HOSERVA_HOST:8008/api/v1/users"
Defaults to the share-only role when omitted: a new account has no UI login until an admin promotes it. No password is set by this call — setUserPassword provisions the UI credential and the Samba account together, in a separate action. Never creates an admin account (users_one_admin_idx allows exactly one, created only by createFirstAdmin).
Request
Responses
- 201
- default
The new account.
An error response.