Skip to main content
POST
/
api
/
auth
/
register
Register user
curl --request POST \
  --url https://your-instance.example.com/api/auth/register \
  --header 'Content-Type: application/json' \
  --data '
{
  "email": "sam.patel@acme.example",
  "password": "CorrectHorseBatteryStaple!",
  "fullName": "Sam Patel",
  "organizationId": "5f7b1c2e8a1d4e0012c3b4a5",
  "accessRole": "AGENT",
  "phoneNumber": "+14165550100",
  "designation": "Customer Success Lead",
  "departmentId": "6a8c2d3f9b1e5a0023d4c5b6"
}
'
{
  "message": "User registered successfully"
}

Body

application/json
email
string<email>
required

New user email; must be unique across the platform.

password
string
required

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.

fullName
string

Display name; split into first/last when provisioning the WorkOS user.

organizationId
string

Mongo _id of the org the user belongs to. Department Leads are forced to their own org and cannot override this.

accessRole
string

Role assigned to the new user — defaults to SALES_REP when omitted. Department Leads may only create SALES_REP users.

phoneNumber
string

User's personal phone number. Rejected when it collides with one of the org's provisioned SMS numbers.

sinchPhoneNumber
string

Sinch-provisioned outbound number assigned to this user, if any.

designation
string

Free-form job title shown in the UI (e.g. "Customer Success Lead").

departmentId
string

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.

message
string
required