# Get messages for a chat participant (v2)

Retrieve the messages for a chat participant as a lean, curated payload (`MessageResponse`) — only the fields a live-chat UI needs, plus the quoted-reply context (`quotedExternalMessageId`, `quotedText`). The agent is resolved from your API key / session and the participant is tenant-checked. Replaces the deprecated [Get messages by chat participant](https://ecommunicate-api-docs.redocly.app/apis/omnichannel/live-chat/getmessagesbychatparticipant).

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

## Security:

  - `apikeyAuth` (unknown)
    apiKey in header Authorization

## Query parameters:

  - `participantId` (string, required)
    Chat participant ID.

## Response 200:

  - `200` (unknown)
    Ordered list of messages for the chat participant

## Response 200 fields (application/json):

  - `id` (string)
    Example: c9d01234-e5f6-a7b8-c9d0-1234e5f6a7b8

  - `tempId` (string)
    Temporary client-generated id used to correlate a send request with its response. Present only when the sender supplied one.
    Example: c9f0b308-1a0d-3f3f-7912-464f06677c6b

  - `sequenceNumber` (integer)
    Monotonic ordering hint within the conversation.
    Example: 42

  - `direction` (string)
    Enum: "OUTGOING", "INCOMING"

  - `contentType` (string)
    Enum: "BUTTON", "CAROUSEL", "DROPDOWN", "IMAGE", "TEXT", "DATE", "FILE", "MEDIA", "LOCATION", "RATING"

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

  - `text` (string)
    Example: Hello, I need help with my account.

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

  - `userOriginated` (boolean)
    true when a human typed the message (agent or customer); false for bot-generated messages.
    Example: true

  - `messageOwner` (string)
    Enum: "agent", "customer", "system"

  - `sender` (string)
    Address the message was sent from (e.g. the customer's phone number for inbound, the business number for outbound).
    Example: +27987654321

  - `receiver` (string)
    Address the message was delivered to.
    Example: +27123456789

  - `ctId` (string)
    Custom tracking id for the message, if one was supplied on send.
    Example: order-1234-confirm

  - `sent` (boolean)
    Example: true

  - `delivered` (boolean)
    Example: true

  - `read` (boolean)
    Example: false

  - `played` (boolean)
    True when a voice note was played (listened to) by the recipient.
    Example: false

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

  - `deliveredTime` (string)
    Example: 2026-01-15T10:30:05Z

  - `readTime` (string)
    Example: 2026-01-15T10:31:00Z

  - `playedTime` (string)
    Timestamp the voice note was played.
    Example: 2026-01-15T10:31:30Z

  - `mediaURL` (string)
    Example: https://example.com/media/photo.jpg

  - `fileExtension` (string)
    File extension of the attached media, when present.
    Example: jpg

  - `mediaType` (string)
    Enum: "DOCUMENT", "IMAGE", "VIDEO", "NULL", "BUTTON", "FILE", "AUDIO", "VOICE"

  - `latitude` (string)
    Example: -26.2041

  - `longitude` (string)
    Example: 28.0473

  - `address` (string)
    Example: 123 Main St, Johannesburg

  - `label` (string)
    Example: Head Office

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

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

  - `agent.firstName` (string)
    Example: Alice

  - `agent.lastName` (string)
    Example: Smith

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

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

  - `reaction` (object)

  - `reaction.reactorName` (string)
    Example: John Doe

  - `reaction.reactorNumber` (string)
    Example: +27821234567

  - `reaction.reactionEmoji` (string)
    Example: 👍

  - `whatsAppMessageId` (string)
    Provider (WhatsApp) message id.
    Example: 3EB09839C39C57F54A9EC5

  - `facebookMessageId` (string)
    Provider (Facebook) message id.
    Example: m_AbCdEf123456

  - `quotedExternalMessageId` (string)
    WhatsApp id of the message this one replies to/quotes (present when the message is a reply).
    Example: 3EB0123456789ABCDEF0

  - `quotedText` (string)
    Snapshot of the quoted message's text, captured at reply time.
    Example: Hi, is this about order #1234?

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

## Response 404:

  - `404` (unknown)
    Not Found

## Response 404 fields (application/json):

  - `status` (string)
    Example: ERROR

  - `message` (string)
    Example: Resource not found

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

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

