Original Message:
Sent: 04-30-2026 03:07
From: Laurent Rustuel
Subject: Web Messaging Guest API - End-user Disconnect
You are correct, this is the event used by the out of the box messenger
------------------------------
Laurent Rustuel
Lead Software Engineer
------------------------------
Original Message:
Sent: 04-30-2026 01:50
From: Orestis Dimitropoulos
Subject: Web Messaging Guest API - End-user Disconnect
I believe this can be interesting. As far as i understand, the custom widget should send something like this in order to terminate the conversation? Can someone verify that? If that is so, we do not need to invoke Platform API.
{
"action": "onMessage",
"message": {
"type": "Event",
"events": [
{
"eventType": "Presence",
"presence": {
"type": "Clear"
}
}
]
},
"tracingId": "11111111-1111-1111-1111-111111111111",
"token": "0000000-0000-0000-0000-0000000000"
}
------------------------------
Orestis Dimitropoulos
Original Message:
Sent: 04-29-2026 07:47
From: Phaneendra Avatapalli
Subject: Web Messaging Guest API - End-user Disconnect
Hi Orestis,
From my understanding, closing a custom widget (or WebSocket) doesn't terminate the conversation, as web messaging is designed to be persistent.
When the user clicks your "End Chat" button, you'd need to trigger a clear/disconnect action behind the scenes to properly end the conversation.
You might find these helpful:
These don't cover custom widget implementation directly, but they do explain the behaviour you'll need to replicate.
Hope someone from community has done this or might have a different approach to this.
------------------------------
Phaneendra
Technical Solutions Consultant
Original Message:
Sent: 04-29-2026 07:30
From: Orestis Dimitropoulos
Subject: Web Messaging Guest API - End-user Disconnect
Hello Phaneendra,
Thank you for the prompt response.
That can be a problem. Ideally, we would like to do that without using the Platform API. We were hoping that Web Message Guest API offers such a capability. Reviewing the relevant documentation and considering your update as well, it seems that this is not something we can accomplish.
------------------------------
Orestis Dimitropoulos
Original Message:
Sent: 04-29-2026 06:59
From: Phaneendra Avatapalli
Subject: Web Messaging Guest API - End-user Disconnect
Hi Orestis,
From my understanding, closing a custom widget (or WebSocket) doesn't terminate the conversation, as web messaging is designed to be persistent.
When the user clicks your "End Chat" button, you'd need to trigger a clear/disconnect action behind the scenes to properly end the conversation.
If needed, this could also be handled via the Platform API (e.g., PATCH /api/v2/conversations/messages/{conversationId} to set the state to disconnected), but typically this logic should sit behind that button in your custom widget.
Hope this helps and someone might add more to this.
------------------------------
Phaneendra
Technical Solutions Consultant