Create local user
POST
/auth/users
const url = 'https://sylve.lan:8181/api/auth/users';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"admin":true,"auxGroupIds":[1],"confirmGuestActions":true,"disablePassword":true,"doasEnabled":true,"email":"example","fullName":"example","homeDirPerms":1,"homeDirectory":"example","locked":true,"newPrimaryGroup":true,"password":"example","primaryGroupId":1,"shell":"example","sshPublicKey":"example","uid":1,"username":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://sylve.lan:8181/api/auth/users \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "admin": true, "auxGroupIds": [ 1 ], "confirmGuestActions": true, "disablePassword": true, "doasEnabled": true, "email": "example", "fullName": "example", "homeDirPerms": 1, "homeDirectory": "example", "locked": true, "newPrimaryGroup": true, "password": "example", "primaryGroupId": 1, "shell": "example", "sshPublicKey": "example", "uid": 1, "username": "example" }'Create a new local Sylve user; passwords are limited to 72 UTF-8 bytes
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”Local user
Media typeapplication/json
object
admin
required
boolean
auxGroupIds
Array<integer>
confirmGuestActions
boolean
disablePassword
boolean
doasEnabled
boolean
email
string
fullName
string
homeDirPerms
integer
homeDirectory
string
locked
boolean
newPrimaryGroup
boolean
password
string
primaryGroupId
integer
shell
string
sshPublicKey
string
uid
integer
username
required
string
Examplegenerated
{ "admin": true, "auxGroupIds": [ 1 ], "confirmGuestActions": true, "disablePassword": true, "doasEnabled": true, "email": "example", "fullName": "example", "homeDirPerms": 1, "homeDirectory": "example", "locked": true, "newPrimaryGroup": true, "password": "example", "primaryGroupId": 1, "shell": "example", "sshPublicKey": "example", "uid": 1, "username": "example"}Responses
Section titled “Responses”User Created
Media typeapplication/json
object
data
object
id
integer
username
string
error
string
message
string
status
string
Examplegenerated
{ "data": { "id": 1, "username": "example" }, "error": "example", "message": "example", "status": "example"}Bad Request
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Unauthorized
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Forbidden
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Conflict
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Request Entity Too Large
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Internal Server Error
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}