Close Livechat Room

Post
/api/v1/livechat/room.closeByUser

If you are an Omnichannel user (agent, manager), use this endpoint to close the livechat room.

Header parameters
X-Auth-Token
stringRequired

The authToken of the authenticated user.

ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
X-User-Id
stringRequired

The userId of the authenticated user.

ExamplerbAXPnMktTFbNpwtJ
Body parameters
Example
{
  "rid": "8ceKgWvo5qT5TrCRN",
  "comment": "close via API",
  "tags": [
    "abc",
    "abc"
  ],
  "transcriptEmail": {
    "sendToVisitor": true,
    "requestData": {
      "email": "[email protected]",
      "subject": "transcript"
    }
  }
}
Expand All
object
rid
string Required

Enter the livechat room ID.

Example8ceKgWvo5qT5TrCRN
comment
string

Add a description for closing the room. It is required when the Request comment when closing conversation setting is enabled.

forceClose
boolean

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.

tags
Array of string

Add tags.

string
generateTranscriptPdf
boolean

Enter whether you want to generate a conversation transcript PDF.

transcriptEmail
object
sendToVisitor
boolean

Enter whether you want to send the livechat transcript to the visitor.

requestData
object
email
string

Enter the visitor's email ID to whom you want to send the transcript.

subject
string

Enter a subject for the email.

Responses
200

OK

Success
{
  "success": true
}
object
success
boolean
400

Bad Request

Invalid parameter
{
  "success": false,
  "error": "must have required property 'rid' [invalid-params]",
  "errorType": "invalid-params"
}
Room already closed
{
  "success": false,
  "error": "error-room-already-closed"
}
object
success
boolean
error
string
errorType
string
401

Unauthorized

Authorization Error
{
  "status": "error",
  "message": "You must be logged in to do this."
}
object
status
string
message
string