# List chats (v2)

Paginated chat list for the authenticated agent, selected by `scope`. The agent and client are resolved from your API key / session. Returns a lean `ChatParticipantResponse` page and replaces the deprecated [Get chat participants](https://ecommunicate-api-docs.redocly.app/apis/omnichannel/live-chat/getchatparticipants).

Endpoint: GET /pl4chat-service/api/v2/chats
Version: 3.0.0
Security: apikeyAuth

## Security:

  - `apikeyAuth` (unknown)
    apiKey in header Authorization

## Query parameters:

  - `scope` (string, required)
    Which list to return: `my` (assigned to you), `team` (your team's), `unassigned`, `closed`, `my-missed`, `missed-agent`, `missed-after-hours`, `open` (all open client chats), or `all` (open and closed).
`unassigned` is scoped by role: supervisors see every queued chat for the client; an agent with the unassigned-inbox permission sees chats queued for a team they belong to (plus chats with no team); an agent without that permission gets `403`. Each item in this scope carries `team`/`teamId` and a `lastMessagePreview`.

  - `page` (integer)
    Page number (zero-based).

  - `size` (integer)
    Number of items per page.

  - `search` (string)
    Optional case-insensitive substring filter on phone number and full name.

## Response 200:

  - `200` (unknown)
    Paginated list of chats for the requested scope

## Response 200 fields (application/json):

  - `content` (array)

  - `content.id` (string)
    Example: aef65b5a-23a4-462a-a275-9aa2f3e0e56e

  - `content.fullName` (string)
    Example: John Doe

  - `content.firstName` (string)
    Example: John

  - `content.lastName` (string)
    Example: Doe

  - `content.phoneNumber` (string)
    Example: 27821234567

  - `content.userId` (string)
    Customer's durable business-scoped user id (**BSUID**, alpha usernames). Stable across phone-number changes; present even when the phone is withheld.
    Example: ZA.1021033720668862

  - `content.username` (string)
    Customer's optional WhatsApp username (display only).
    Example: johndoe

  - `content.email` (string)
    Example: john.doe@example.com

  - `content.channel` (string)
    Enum: "WHATSAPP", "WEB", "FACEBOOK"

  - `content.conversationStatus` (string)
    Example: ACTIVE

  - `content.conversationClosed` (boolean)
    Example: false

  - `content.unread` (boolean)
    Example: true

  - `content.missedConversation` (boolean)
    Example: false

  - `content.chatBotConversation` (boolean)
    Example: false

  - `content.whatsAppClientNumber` (string)
    Example: +27123456789

  - `content.team` (string)
    Example: Support

  - `content.teamId` (string)
    Example: 288436ad-4522-4f27-95e9-c406a917894d

  - `content.lastMessageTime` (string)
    Example: 2026-01-15T10:31:00Z

  - `content.createdTime` (string)
    Example: 2026-01-15T10:00:00Z

  - `content.customerLastMessageTime` (string)
    Example: 2026-01-15T10:30:00Z

  - `content.assignedTo` (object)
    Lean reference to the agent who sent or owns a message.

  - `content.assignedTo.id` (string)
    Example: b2c3d4e5-f6a7-8901-b2c3-d4e5f6a78901

  - `content.assignedTo.firstName` (string)
    Example: Alice

  - `content.assignedTo.lastName` (string)
    Example: Smith

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

  - `content.assignedTo.avatar` (string)
    URL of the agent's avatar image.
    Example: https://example.com/avatars/alice.png

  - `content.lastMessagePreview` (string)
    One-line preview of the most recent message, ready to render. Text is collapsed to a single line and cut at 120 characters; media and structured messages come back as a placeholder: `(document)`, `(image)`, `(audio)`, `(video)`, `(location)`, `(contact)`, or `(message)`. Only present on the list endpoint, and omitted for chats with no messages.
    Example: Hi, I need help with my order

  - `content.lastMessageDirection` (string)
    Direction of the previewed message. `OUTGOING` means an agent or the bot sent it.
    Enum: "INCOMING", "OUTGOING"

  - `content.lastMessageMediaType` (string)
    Media type of the previewed message, when it carried media.
    Enum: "DOCUMENT", "IMAGE", "VIDEO", "BUTTON", "FILE", "AUDIO", "VOICE", "URL", "STICKER"

  - `content.lastMessageSender` (string)
    Who sent an `OUTGOING` previewed message: the agent's first name, or `Bot` when the chatbot sent it. Absent for `INCOMING` messages.
    Example: Hayley

  - `totalElements` (integer)
    Example: 85

  - `totalPages` (integer)
    Example: 9

  - `size` (integer)
    Example: 10

  - `number` (integer)
    Example: 0

  - `first` (boolean)
    Example: true

  - `last` (boolean)
    Example: false

  - `empty` (boolean)
    Example: false

## Response 400:

  - `400` (unknown)
    Bad Request

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

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

## Response 403:

  - `403` (unknown)
    Forbidden

## Response 403 fields (application/json):

  - `status` (string)
    Example: ERROR

  - `message` (string)
    Example: Forbidden

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

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

