Genesys Cloud Web Messaging: Programmatically closing guest session via API

Hey folks,

We’re trying to automate the cleanup of stale web messaging sessions from our backend service. The idea is to detect inactive guests and force-close their sessions so they can’t just sit there indefinitely.

I’ve been digging through the Web Messaging SDK docs and the general REST API reference, but I can’t find an endpoint that actually terminates an active guest session or conversation on the server side. I see POST /api/v2/conversations/messaging/{id}/messages for sending messages, and obviously the SDK methods for the frontend, but nothing that looks like a “close session” command.

I tried hitting DELETE /api/v2/conversations/messaging/{id} thinking it might wrap up the conversation, but that just returns a 404 or 405 depending on how I format it. The conversation object still shows as active afterwards.

DELETE /api/v2/conversations/messaging/5f9a...8b2c
Authorization: Bearer <token>
Content-Type: application/json

Is there a specific API call I’m missing? Or is the only way to do this by injecting a bot message that triggers a close event on the client side? We’d really prefer a hard close from the backend if possible.

Thanks.