# Get all agents

Retrieve all users with the agent role for a client.

Endpoint: GET /pl4chat-service/team/agents/{clientRef}
Version: 3.0.0
Security: apikeyAuth

## Security:

  - `apikeyAuth` (unknown)
    apiKey in header Authorization

## Path parameters:

  - `clientRef` (string, required)
    Your unique client reference identifier.

## Response 200:

  - `200` (unknown)
    List of all users with the agent role for the specified client

## Response 200 fields (application/json):

  - `id` (string)
    Example: e1f2a3b4-c5d6-7890-e1f2-a3b4c5d67890

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

  - `password` (string)
    Example: ********

  - `tempPassword` (string | null)
    Example: ********

  - `role` (string)
    Enum: "CLIENT"

  - `liveChatRole` (string)
    Enum: "SUPERVISOR", "AGENT"

  - `primaryEmailAddress` (string | null)
    Example: agent@example.com

  - `mobileNumber` (string | null)
    Example: +27821234567

  - `sentLowerCreditLimitMail` (boolean)
    Example: false

  - `sentZeroCreditMail` (boolean)
    Example: false

  - `apiKey` (string)
    Example: 64a1b2c3d4e5f67890abcdef

  - `disabled` (boolean)
    Example: false

  - `deleted` (boolean)
    Example: false

  - `emailVerificationKey` (string | null)
    Example: null

  - `passwordResetKey` (string | null)
    Example: null

  - `inactivityNodeId` (string | null)
    Example: node-inactivity-001

  - `publicHolidayInactivityNodeId` (string | null)
    Example: node-holiday-001

  - `officeClosedInactivityNodeId` (string | null)
    Example: node-closed-001

  - `autoResponseNodeId` (string | null)
    Example: node-auto-001

  - `client` (object)

  - `client.id` (string)
    Example: dbdb8809-6fd0-4cd2-8574-502f0f61a69d

  - `client.clientRef` (string)
    Example: Growthpoint

  - `client.accountType` (string)
    Example: Postpaid

  - `client.countryCode` (string)
    Example: ZA

  - `client.countryTimezone` (string)
    Example: Africa/Johannesburg

  - `client.pricingModel` (string)
    Example: PMP

  - `client.clientPlatformCharge` (number | null)
    Example: 0.1

  - `client.clientNotificationCharge` (number)
    Example: 0.35

  - `client.clientSession24HourCharge` (number)
    Example: 0.35

  - `client.clientConversationCharge` (number)
    Example: 0.35

  - `client.userInitiatedConversationCharge` (number | null)
    Example: 0.2

  - `client.businessInitiatedConversationCharge` (number)
    Example: 1.25

  - `client.clientWhatsAppBalance` (number)
    Example: 1000

  - `client.clientSMSBalance` (number)
    Example: 10

  - `client.primaryEmailAddress` (string | null)
    Example: admin@example.com

  - `client.secondaryEmailAddress` (string | null)
    Example: backup@example.com

  - `client.clientEmailAddress` (string | null)
    Example: client@example.com

  - `client.upperNotificationLimit` (number | null)
    Example: 100

  - `client.lowerNotificationLimit` (number | null)
    Example: 10

  - `client.upperNotificationLimitMailSent` (boolean)
    Example: false

  - `client.lowerNotificationLimitMailSent` (boolean)
    Example: false

  - `client.zeroBalanceNotificationMailSent` (boolean)
    Example: false

  - `client.lastUpperNotificationMailSentTime` (string | null)
    Example: 2026-01-15T10:30:00+02:00

  - `client.lastLowerNotificationMailSentTime` (string | null)
    Example: 2026-01-20T14:00:00+02:00

  - `client.lastZeroBalanceNotificationMailSentTime` (string | null)
    Example: null

  - `client.smsMode` (string)
    Example: fallback

  - `client.smsFallback` (boolean)
    Example: true

  - `client.smsUserId` (string)
    Example: support@ecommunicate.co.za

  - `client.smsPassword` (string)
    Example: ********

  - `client.smsClientRef` (string)
    Example: ecomtest1

  - `client.reseller` (boolean)
    Example: false

  - `client.parentClient` (object | null)
    Example: null

  - `client.license` (object | null)
    Example: null

  - `client.useParentNumber` (boolean)
    Example: false

  - `client.useParentCredit` (boolean)
    Example: false

  - `client.userInitiatedConversationBalance` (number)
    Example: 100

  - `client.businessInitiatedConversationBalance` (number)
    Example: 973

  - `client.popiaComplianceEnabled` (boolean)
    Example: true

  - `client.eligible1000Free` (boolean)
    Example: true

  - `client.splitConversation` (boolean)
    Example: true

  - `client.monthlyFundAllocation` (boolean)
    Example: true

  - `client.monthlyBusinessInitiatedBalanceAllocation` (number)
    Example: 1000

  - `client.monthlyUserInitiatedBalanceAllocation` (number)
    Example: 100

  - `client.useApi` (boolean)
    Example: true

  - `client.headerKeyPairsJson` (string)
    JSON array of key-value header pairs.
    Example: [{"key": "Authorization", "value": "your-api-key"}]

  - `clientRef` (string | null)
    Example: null

  - `ticketCount` (integer | null)
    Example: 5

  - `lastSeen` (string | null)
    Example: null

  - `resetPasswordEmailSent` (boolean)
    Example: false

  - `emailVerified` (boolean)
    Example: false

  - `firstName` (string)
    Example: Jane

  - `lastName` (string)
    Example: Doe

  - `agentChatLimit` (integer)
    Max concurrent chats.
    Example: 5

  - `availabilityStatus` (boolean)
    Example: true

  - `initialPassword` (boolean)
    Example: false

  - `tempAccount` (boolean)
    Example: false

  - `loginToken` (string)
    Example: 1d368c30-c9f8-4523-b8c2-3824ba72ff5c

  - `validToken` (boolean)
    Example: false

  - `avatar` (string)
    Example: https://example.com/avatars/jane.jpg

  - `shouldGetNotifications` (boolean)
    Example: true

  - `applicationKey` (string)
    Example: a3b4c5d6-e7f8-9012-a3b4-c5d6e7f89012

  - `userId` (string)
    Example: 21c28d3e-bc5c-4bc9-99be-fe283df71653

  - `applicationClientId` (string)
    Example: 1d368c30-c9f8-4523-b8c2-3824ba72ff5c

  - `allowedSharedInbox` (boolean)
    Example: true

  - `allowedUnassignedInbox` (boolean)
    Example: true

  - `assignmentMessage` (string)
    Custom message sent to the customer when a chat is assigned to this agent. If null, defaults to 'Assigned to `<agent name>`'.
    Example: Hi, I'm Jane 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

