POST /user
Create User
POST
/user
Create a new platform user with a temporary password.
Validates that the username is not already taken, generates a random
8-character hex temporary password, hashes it, and inserts the User
document with reset_password=True. The plain-text temporary password
is returned in detail.temp_psw — it is not stored. The user must
change it on first login.
Emits: (direct transaction — no event class)
Required scope: org:user:create
Authorizations
OAuth2PasswordBearer
password Flow
Token URL
"/api/auth"Scopes:
"admin"User can access and edit users and system settings"library"User can access and edit products"production"User can access and edit production plans"operator"User can access the operator panel and make production declarations
Request Body
application/json
JSON "name": "Alice", "surname": "Smith", "username": "alice.smith", "site_key": "0", "department_key": "dept_qa", "hourly_cost": 32.5, "email": "alice.smith@progresslab.it", "scope": "production lib:r lib:w", "preferences": { "theme": "dark", "locale": "en-US", "display_font": "orbitron", "home_page": "productionRoot", "job_selection_layout": "card", "work_session_tabs_order": [ "string" ], "printer": "ZEBRA-ZT230-01" }
{
}
Responses
Successful Response
application/json
JSON "status": 200, "message": "string", "detail": "string"
{
}