# 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

## Security:

  - `apikeyAuth` (unknown)
    apiKey in header Authorization

## Request fields (application/json):

  - `status` (boolean)
    Example: true

## Response 200:

  - `200` (unknown)
    The updated user with the new availability status (no credentials)

## 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.
    Example: false

  - `disabled` (boolean)
    Example: false

  - `deleted` (boolean)
    Example: false

  - `ticketCount` (integer)
    Example: 0

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

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

  - `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.
    Example: false

  - `tempAccount` (boolean)
    Example: false

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

  - `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)
    Example: false

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

## Response 401:

  - `401` (unknown)
    Authentication failed — the API key sent in the `Authorization` header is missing,
invalid, or has been revoked.
**Verify your API key before changing anything else.** Check the key currently active
on your account either in the eCommunicate web UI (API key settings), or by calling
`POST /payless4messaging-service/WhatsApp/authenticate/retrieveApiKey` with your
account credentials — that endpoint needs no existing key, so it works while every
other call is returning `401`. Compare the result with the value your integration is
sending: pass the key on its own (no `Bearer` prefix), trimmed of whitespace, as a
36-character UUID.
Do not retry a `401` — it will fail identically until the key is corrected. See the
[Authentication guide](/guides/authentication#troubleshooting-a-401).

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

