# Create a user

Create an organization user. Takes no password — a one-time temporary password is generated and returned once in the response; the user must set their own password on first login. The client is taken from clientRef, or your auth context when omitted.

Endpoint: POST /payless4messaging-service/WhatsApp/api/v1/users
Version: 3.0.0
Security: apikeyAuth

## Request fields (application/json):

  - `clientRef` (string)
    Target client. Defaults to the caller's own client when omitted.
    Example: "Growthpoint"

  - `email` (string, required)
    Example: "agent@example.com"

  - `firstName` (string)
    Example: "Jane"

  - `lastName` (string)
    Example: "Doe"

  - `mobileNumber` (string)
    Example: "+27123456789"

  - `primaryEmailAddress` (string)
    Example: "jane@example.com"

  - `liveChatRole` (string)
    Enum: "Agent", "Supervisor"

  - `agentChatLimit` (integer)
    Example: 5

  - `allowedSharedInbox` (boolean)
    Example: true

  - `allowedUnassignedInbox` (boolean)

  - `shouldGetNotifications` (boolean)
    Example: true

  - `assignmentMessage` (string)
    Example: "Hi, I'm Jane and I'll be assisting you today."

  - `applicationKey` (string)
    Example: "app-key-123"

  - `applicationClientId` (string)
    Example: "app-client-123"

  - `userId` (string)
    Example: "ext-user-123"

## Response 201 fields (application/json):

  - `id` (string)
    Example: "b2c3d4e5-f6a7-8901-b2c3-d4e5f6a78901"

  - `email` (string)
    Example: "agent@example.com"

  - `clientRef` (string)
    Example: "Growthpoint"

  - `temporaryPassword` (string)
    Example: "tempab12cd34ef56"

  - `message` (string)
    Example: "User created. Share the temporary password securely; the user must set a new password on first login."

## Response 400 fields (application/json):

  - `status` (string)
    Example: "ERROR"

  - `message` (string)
    Example: "Invalid Parameters"

  - `requestId` (string)
    Example: "c3a1f8e2-4b6d-11ee-be56-0242ac120002"

  - `timestamp` (string)
    Example: "2026-01-15T10:30:00Z"

## Response 401 fields (application/json):

  - `status` (string)
    Example: "ERROR"

  - `message` (string)
    Example: "Unauthorized user"

  - `requestId` (string)
    Example: "c3a1f8e2-4b6d-11ee-be56-0242ac120002"

  - `timestamp` (string)
    Example: "2026-01-15T10:30:00Z"


