Register user
Create a new user account. When WorkOS is enabled the user is also provisioned in WorkOS; otherwise the password is validated locally and hashed before persistence.
Body
New user email; must be unique across the platform.
Plain-text password; validated against WorkOS policy when enabled, otherwise against the local 8+ char / mixed-case / number / special-char rule. Hashed with bcrypt before persistence.
Display name; split into first/last when provisioning the WorkOS user.
Mongo _id of the org the user belongs to. Department Leads are forced to their own org and cannot override this.
Role assigned to the new user — defaults to SALES_REP when omitted. Department Leads may only create SALES_REP users.
User's personal phone number. Rejected when it collides with one of the org's provisioned SMS numbers.
Sinch-provisioned outbound number assigned to this user, if any.
Free-form job title shown in the UI (e.g. "Customer Success Lead").
Mongo _id of the department the user joins; auto-populated for Department Leads and used to add the user to the department's userIds/managerIds array.
Response
User registered
Minimal envelope returned after a user is registered.