# Change availability

Toggle the authenticated agent's online/offline status; returns a credential-free UserResponse.

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

## Request fields (application/json):

  - `status` (boolean)
    Example: true

## Response 200 fields (application/json):

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

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

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

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

  - `role` (string)
    Platform authority — for example admin or client.
    Example: "client"

  - `liveChatRole` (string)
    Role within the live-chat team.
    Enum: "Agent", "Supervisor"

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

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

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

  - `clientId` (string)
    ID of the client this user belongs to.
    Example: "c1d2e3f4-a5b6-7890-c1d2-e3f4a5b67890"

  - `countryTimezone` (string)
    IANA timezone for the user, inherited from their client.
    Example: "Africa/Johannesburg"

  - `popiaComplianceEnabled` (boolean)
    Whether POPIA compliance is enabled for the user's client.

  - `disabled` (boolean)

  - `deleted` (boolean)

  - `ticketCount` (integer)

  - `resetPasswordEmailSent` (boolean)
    Whether a password-reset email has been sent to the user.

  - `emailVerified` (boolean)
    Whether the user has verified their email address.

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

  - `agentChatLimit` (integer)
    Example: 5

  - `availabilityStatus` (boolean)
    Whether the user is currently available for live-chat assignment.
    Example: true

  - `initialPassword` (boolean)
    true while the user still has a system-generated temporary password and must set their own on next login.

  - `tempAccount` (boolean)

  - `tempPasswordValid` (boolean)
    Whether the user's temporary password is still valid (not yet expired or replaced).

  - `validToken` (boolean)
    Whether the user currently holds a valid session token.
    Example: true

  - `avatar` (string)
    Example: "https://example.com/avatars/alice.png"

  - `shouldGetNotifications` (boolean)
    Example: true

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

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

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

  - `allowedSharedInbox` (boolean)
    Example: true

  - `allowedUnassignedInbox` (boolean)

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

## 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"


