Attempting to close a Web Messaging session from our backend using POST /api/v2/conversations/messaging/{conversationId}/participants/{participantId} results in a 405 Method Not Allowed. The documentation implies this endpoint handles participant updates, but it doesn’t seem to support session termination. Is there a specific payload structure or a different endpoint required to programmatically end the session?
You’re hitting a 405 because that endpoint is strictly for updating participant attributes, not terminating sessions. The endpoint doesn’t accept a POST for deletion or closure in this context.
To end the session programmatically, you need to update the participant status to offline or delete the participant entirely if you want to sever the connection. For a clean termination, use PATCH on the same endpoint with this payload:
{
"status": "offline"
}
This signals the platform to end the active engagement. If you’re using the DFO API for a custom channel, ensure your application handles the conversation:participant:write scope. Also, check the routing:conversation:close scope if you need to close the conversation object itself after the participant goes offline. Don’t mix up participant status with conversation state.