If you are an Omnichannel user (agent, manager), use this endpoint to close the livechat room.
The authToken
of the authenticated user.
The userId
of the authenticated user.
{
"rid": "8ceKgWvo5qT5TrCRN",
"comment": "close via API",
"tags": [
"abc",
"abc"
],
"transcriptEmail": {
"sendToVisitor": true,
"requestData": {
"email": "[email protected]",
"subject": "transcript"
}
}
}
Enter the livechat room ID.
Add a description for closing the room. It is required when the Request comment when closing conversation
setting is enabled.
Use this parameter to forcefully close a livechat room. Before using this parameter, make sure to enable the Force Close Conversation API
setting in Administration > Settings > Omnichannel > API. Exercise caution when using this parameter and reserve it for situations involving misconfigured rooms.
Enter whether you want to generate a conversation transcript PDF.
Enter whether you want to send the livechat transcript to the visitor.
Enter the visitor's email ID to whom you want to send the transcript.
Enter a subject for the email.
OK
{
"success": true
}
Bad Request
{
"success": false,
"error": "must have required property 'rid' [invalid-params]",
"errorType": "invalid-params"
}
{
"success": false,
"error": "error-room-already-closed"
}
Unauthorized
{
"status": "error",
"message": "You must be logged in to do this."
}