- Send an agent message (v2)
Send an agent reply on any channel through a single endpoint. The target channel is set via the channel field (WHATSAPP, WEB, or FACEBOOK) and routing is handled server-side — replacing the per-channel v1 send endpoints. For a text message set text; for media, first upload the file via Upload media for an agent message and send the returned mediaUrl (the content type defaults to MEDIA when a mediaUrl is present). The agent is resolved from your API key / session and the participant is tenant-checked.
Chat participant to send to.
Channel to route the message on.
Optional. Client-generated id echoed back on the response to correlate an optimistic UI message. Omit it if you don't need correlation.
Message text, or the caption for a media send.
Optional. Defaults to TEXT, or MEDIA when a mediaUrl is present.
Hosted media URL from the media upload endpoint. Its presence makes this a media send.
Media kind (from the upload response).
WhatsApp id of a message being quoted/replied to.
- Mock serverhttps://ecommunicate-api-docs.redocly.app/_mock/apis/omnichannel/pl4chat-service/api/v2/messages
- https://api.payless4messaging.comhttps://api.payless4messaging.com/pl4chat-service/api/v2/messages
- https://api.payless4messages.comhttps://api.payless4messages.com/pl4chat-service/api/v2/messages
curl -i -X POST \
https://ecommunicate-api-docs.redocly.app/_mock/apis/omnichannel/pl4chat-service/api/v2/messages \
-H 'Authorization: YOUR_API_KEY_HERE' \
-H 'Content-Type: application/json' \
-d '{
"participantId": "a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890",
"channel": "WHATSAPP",
"tempId": "c9f0b308-1a0d-3f3f-7912-464f06677c6b",
"text": "Thanks for reaching out — how can I help?"
}'The stored message
Temporary client-generated id used to correlate a send request with its response. Present only when the sender supplied one.
true when a human typed the message (agent or customer); false for bot-generated messages.
Address the message was sent from (e.g. the customer's phone number for inbound, the business number for outbound).
Custom tracking id for the message, if one was supplied on send.
WhatsApp id of the message this one replies to/quotes (present when the message is a reply).
{ "id": "c9d01234-e5f6-a7b8-c9d0-1234e5f6a7b8", "tempId": "c9f0b308-1a0d-3f3f-7912-464f06677c6b", "sequenceNumber": 42, "direction": "INCOMING", "contentType": "TEXT", "channel": "WHATSAPP", "text": "Hello, I need help with my account.", "createdTime": "2026-01-15T10:30:00Z", "userOriginated": true, "messageOwner": "customer", "sender": "+27987654321", "receiver": "+27123456789", "ctId": "order-1234-confirm", "sent": true, "delivered": true, "read": false, "played": false, "sentTime": "2026-01-15T10:30:01Z", "deliveredTime": "2026-01-15T10:30:05Z", "readTime": "2026-01-15T10:31:00Z", "playedTime": "2026-01-15T10:31:30Z", "mediaURL": "https://example.com/media/photo.jpg", "fileExtension": "jpg", "mediaType": "IMAGE", "latitude": "-26.2041", "longitude": "28.0473", "address": "123 Main St, Johannesburg", "label": "Head Office", "agent": { … }, "reaction": { … }, "whatsAppMessageId": "3EB09839C39C57F54A9EC5", "facebookMessageId": "m_AbCdEf123456", "quotedExternalMessageId": "3EB0123456789ABCDEF0", "quotedText": "Hi, is this about order #1234?" }