- Terminate or reopen a chat conversation
Deprecated. Use Terminate a chat (v2) or Reopen a chat (v2) — they take only the chat id (the actor is resolved from your API key / session) and avoid the full-object merge pitfalls below. Retained for existing integrations.
Terminates or reopens a chat by toggling the conversationClosed field on the ChatParticipant object. Set conversationClosed to true to terminate the chat (triggers the rating widget if configured), or set it to false to reopen a previously closed chat.
Important — send the full object. The safest approach is to fetch the participant with GET /pl4chat-service/ChatParticipant and send the complete object back with conversationClosed toggled. The endpoint merges non-null string and object fields (so most omitted fields are preserved), but two categories behave differently and can silently reset state:
assignedTo— if omitted ornull, the agent assignment is cleared.- Boolean flags —
conversationClosed,missedConversation,afterHoursConversation,sendRatingWidget, andchatBotConversationare always copied from the request. Omitting any of them resets it tofalse.
Note that when terminating with sendRatingWidget=true, the server also moves assignedTo to lastAssignedAgent, sets expectingRating=true, and triggers the rating widget.
Customer's durable business-scoped user id (BSUID, alpha usernames), e.g. ZA.1021033720668862. Stable across phone-number changes; present even when the phone is withheld.
BSUID of the parent WhatsApp Business portfolio, when applicable.
- Mock serverhttps://ecommunicate-api-docs.redocly.app/_mock/apis/omnichannel/pl4chat-service/ChatParticipant/terminateChatParticipantChat
- https://api.payless4messaging.comhttps://api.payless4messaging.com/pl4chat-service/ChatParticipant/terminateChatParticipantChat
- https://api.payless4messages.comhttps://api.payless4messages.com/pl4chat-service/ChatParticipant/terminateChatParticipantChat
curl -i -X PUT \
https://ecommunicate-api-docs.redocly.app/_mock/apis/omnichannel/pl4chat-service/ChatParticipant/terminateChatParticipantChat \
-H 'Authorization: YOUR_API_KEY_HERE' \
-H 'Content-Type: application/json' \
-d '{
"id": "eb326385-70b2-4561-9b3a-123456789abc",
"firstName": "John",
"lastName": "Doe",
"fullName": "John Doe",
"phoneNumber": "27821234567",
"email": "john.doe@example.com",
"subject": "Billing Inquiry",
"team": "Support Team",
"whatsAppClientNumber": "+27123456789",
"conversationClosed": true,
"missedConversation": false,
"afterHoursConversation": false,
"chatBotConversation": true,
"sendRatingWidget": false,
"clientRef": "Growthpoint",
"createdTime": "2026-01-15T08:00:00Z",
"lastMessageTime": "2026-01-15T10:35:00Z",
"customerLastMessageTime": "2026-01-15T10:30:00Z",
"channel": "WHATSAPP",
"conversationStatus": "OPEN",
"sender": "+27821234567",
"assignedTo": {
"id": "21c28d3e-bc5c-4bc9-99be-fe283df71abc"
},
"lastAssignedAgent": {
"id": "21c28d3e-bc5c-4bc9-99be-fe283df71abc"
},
"openedBy": "agent@example.com",
"terminatedBy": "agent@example.com",
"unread": true,
"rated": false,
"expectingRating": false,
"companyName": "Acme Corp",
"accountNumber": "ACC-001234",
"activeFlow": "main_support_flow",
"nodeName": "Welcome Node",
"botName": "Support Bot",
"timezone": "Africa/Johannesburg",
"gstn": "a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890",
"ctn": "b2c3d4e5-f6a7-8901-b2c3-d4e5f6a78901"
}'The updated chat participant object reflecting the new conversation state
Customer's durable business-scoped user id (BSUID, alpha usernames), e.g. ZA.1021033720668862. Stable across phone-number changes; present even when the phone is withheld.
BSUID of the parent WhatsApp Business portfolio, when applicable.
{ "id": "cp-a1b2c3d4", "firstName": "John", "lastName": "Doe", "fullName": "John Doe", "phoneNumber": "27821234567", "userId": "ZA.1021033720668862", "username": "johndoe", "parentUserId": "ZA.1000000000000000", "email": "john.doe@example.com", "subject": "Billing Inquiry", "team": "Support Team", "whatsAppClientNumber": "+27123456789", "conversationClosed": false, "missedConversation": false, "afterHoursConversation": false, "chatBotConversation": true, "sendRatingWidget": false, "clientRef": "Growthpoint", "createdTime": "2026-01-15T08:00:00Z", "lastMessageTime": "2026-01-15T10:35:00Z", "customerLastMessageTime": "2026-01-15T10:30:00Z", "channel": "WHATSAPP", "conversationStatus": "OPEN", "sender": "+27821234567", "assignedTo": { … }, "lastAssignedAgent": { … }, "openedBy": "agent@example.com", "terminatedBy": "agent@example.com", "unread": true, "rated": false, "expectingRating": false, "companyName": "Acme Corp", "accountNumber": "ACC-001234", "activeFlow": "main_support_flow", "nodeName": "Welcome Node", "botName": "Support Bot", "timezone": "Africa/Johannesburg", "gstn": "a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890", "ctn": "b2c3d4e5-f6a7-8901-b2c3-d4e5f6a78901" }