Need to kill a web messaging session from our backend service. The guest API doesn’t seem to have a close method. Tried to close the conversation from the backend, but it just throws a 400 Bad Request. What’s the correct payload?
{
"action": "close",
"reason": "admin_closed"
}
Nothing works. Stuck.
1 Like
Are you using the conversation ID or the participant ID? The endpoint needs the specific participant ID to close that side. However, there is no API endpoint to directly update a participant’s status to close a web messaging session. You cannot use a PATCH request on the conversation object to change its state, as that endpoint only supports GET and DELETE. To end the session from the backend, you must delete the conversation using the DELETE method on the conversation resource, which will terminate the session for all participants.
are you using the platformClient SDK or raw HTTP for this?
- check that your participant ID matches the guest side, not the agent.
- set
status to offline in the body, just like the post above says.
2 Likes