Create User
POST/api/users/createuser
Tier: Internal — subject to change without notice.
Creates a person and a user together in one call.
Runs inside a unit of work that creates the person first and then the user. The two steps are not wrapped in a real database transaction, so if user creation fails after the person has already been saved, the unit of work explicitly deletes the just-created person as a compensating step rather than leaving it orphaned. Logs a UserCreated authentication event on success.
Request
Responses
- 200
- 400
- 401
- 403
The created user, merged with its person detail. See User.UserDetailDto.
Missing Password — MissingRequiredField; blank or duplicate Username/no Email — InvalidOperation; or the same person-side validation failures as PersonController.CreatePerson.
Caller is not authenticated.
Caller does not have Create permission on the User module.