v2

latestOpenAPI 3.1.0CC-BY-SA 2.02026-07-2617789528.6 KB
User management

Add user

Add a new user

post/usermanagement

Request body

usernamestring required

A new username

passwordstring required

This password will be hashed for you if the isPreHashed is set on false

permissionsstring[] required

Roles or authorizations

isPreHashedfalse | true required

If you want to provide hashed password set this property to true otherwise we will hash the plain password and store the hash

namestring
emailstring
otherInfoobject

Example request

{
  "username": "johndoe",
  "password": "passwdWillBeStoredHashed",
  "permissions": [
    "admin"
  ],
  "name": "John Doe",
  "email": "john.doe@example.com",
  "otherInfo": {
    "phone": "+1234"
  }
}

Response

Updated

result'success' | 'error' required

Result of the request

action'addUser' required

The id of the action

Example response

{
  "data": {
    "addedUser": {
      "username": "johndoe",
      "password": "secret_password",
      "permissions": [
        "inventory"
      ],
      "name": "John Doe",
      "email": "john.doe@example.com",
      "otherInfo": {
        "phone": "+1234"
      }
    }
  }
}