Skip to main content

endConversation

The 'endConversation' route initiates a new conversation with the AI chatbot. It's designed to create a unique session for user interactions, allowing for a structured and trackable chat experience.

POST https://api.flexibel.ai/v0/endConversation

Request

To end an existing conversation using curl:

curl https://api.flexibel.ai/v0/endConversation \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"conversationId": "CONVERSATION_ID"
}'

Response

The response confirms the successful termination of the conversation:

{
"message": "Conversation successfully ended.",
"conversationId": "CONVERSATION_ID"
}

Request Body

The table below outlines the parameters available for the startChat route:

ParameterTypeRequiredDescription
conversationIdstringyesThe ID of the conversation to be terminated.

The 'endConversation' route is essential for managing the lifecycle of chatbot interactions, allowing for proper closure and archiving of chat sessions. For initiating and retrieving conversations, refer to the 'createConversation' and 'retrieveChat' routes respectively.