Is there a supported endpoint to kill a Web Messaging session from the backend? We’ve got a script that needs to force-close a chat if the customer hits a specific IVR node, but the standard Studio actions only let us transfer or drop the conversation, not terminate the underlying websocket session cleanly.
I’ve been digging through the REST docs and found DELETE /api/v2/conversations/messaging/{conversationId}, but that just ends the conversation record on NICE’s side. The guest’s browser still thinks the session is open. They keep seeing the ‘Typing…’ bubble and the agent icon stays active until the idle timeout kicks in after 5 minutes. That’s too long for our use case.
Tried calling POST /api/v2/conversations/messaging/{conversationId}/messages with a custom endChat action in the payload, hoping it would bubble up to the guest SDK. No luck. The message gets logged, but the UI doesn’t react.
{
"text": "Session ending.",
"action": "endChat"
}
Also checked the Guest API docs. Nothing obvious there except for the init and send methods. We don’t control the guest’s frontend code directly, so we can’t just inject a session.close() call there.
Does the REST Proxy have a hidden trick for this? Or is there a specific header or body param I’m missing in the delete call? The 200 OK response on the delete is misleading if the client doesn’t actually disconnect.
Any ideas on how to force that websocket closure from the script side?