This endpoint fetches details of an individual chat based on chat_id within your tenant.

Response Params:

Param NameDescription
status_codeDenotes the status of the response. _Detailed _guide can be found here
descriptionStates the description of the status_code. Gives you information about the success/error
responseContains details of the current resource fetched/updated/created

Chat List OBJECT

ParameterData TypeDescription
team_idintegerUnique identifier of the team that chat resides in
team_namestringName of the team that the chat resides in
chat_idstringUnique identifier of a chat
alias_idstringExternal ID that can be used to reference a chat
created_atdatetime - UTC FormatTimestamp when chat was created
updated_atdatetime -UTC FormatTimestamp when chat was last updated
statusenumCurrent status of the chat. Possible Values:
- queued

- picked

- onhold

- closed
channelenumChannel on which chat has been created:
- sms

- facebook

- twitter

- livechat

- email

- abc

- whatsapp

- api
assetAsset OBJECTAn object containing the details of the channel asset that the chat has been created on
customerCustomer OBJECTAn object containing the details of the end customer
thread_idstringThread ID of the conversation as received from Connect's Livechat SDK

Applicable to the Livechat channel alone
messagesMessage OBJECTAn object containing messages exchanged within the chat
assigneestringLogin ID of the user the chat is currently assigned to
flagstringFlag currently applied on a chat
tagARRAYArray of tags currently applied on a chat
other_detailsOBJECTContains additional information linked to a chat as Key Value Pairs

Asset OBJECT

ParameterData TypeDescription
idintegerUnique identifier of the channel asset based on the channel:

- SMS - Longcode

- Facebook - Page ID

- Twitter - Owner ID

- Email - Business Email ID (From Address)

- API - Service Key

- Livechat - App ID

- Apple Business Chat - Service Key

- WhatsApp Business - Service Key
namestringName of the Asset

📘

Note

Please reach out to your Account Manager/Customer Success Representative/Support Team for asset details of the following channels:

  • Twitter

  • Livechat

  • Apple Business Chat

  • WhatsApp

Customer OBJECT

Param NameData TypeDescription
idintegerUnique identifier of the customer
destination_idstringThe destination ID of the end customer being addressed based on the channel

- SMS - Mobile No

- Facebook - PS ID

- Twitter - Twitter ID

- Email - Email ID

- API - User ID

- Livechat - Livechat ID

- Apple Business Chat - ABC Opaque User ID

- WhatsApp Business - WhatsApp Mobile Number
namestringName of the end-customer

Inbound Message Sample Codes

{
    "type": "inbound",
    "text": "This is a sample inbound message",
    "timestamp": "2019-08-16T22:02:13.842Z"
}
{
    "type": "inbound",
    "text": "This is a sample inbound message",
    "attachment": {
        "type": "image | audio | video | file",
        "url": "<hosted URL of the attachment>"
    },
    "timestamp": "2019-08-16T22:02:13.842Z"
}
{
    "type": "inbound",
    "attachment": {
        "type": "image | audio | video | file",
        "url": "<hosted URL of the attachment>"
    },
    "timestamp": "2019-08-16T22:02:13.842Z"
}
{
    "type": "inbound",
    "abc_sub_type": "text",
    "text": "This is a sample inbound message",
    "timestamp": "2019-08-16T22:02:13.842Z"
}
{
    "type": "inbound",
    "abc_sub_type": "listpicker_response",
    "listpicker_response": [
        "item1",
        "item2"
    ],
    "timestamp": "2019-08-16T22:02:13.842Z"
}
{
    "type": "inbound",
    "abc_sub_type": "timepicker_response",
    "timepicker_response": "2019-08-16T22:02:13.842Z",
    "timestamp": "2019-08-16T22:02:13.842Z"
}
{
    "type": "inbound",
    "livechat_sub_type": "text",
    "text": "This is a sample inbound message",
    "timestamp": "2019-08-16T22:02:13.842Z"
}
{
    "type": "inbound",
    "livechat_sub_type": "quick_replies",
    "quick_reply_response": {
        "request_identifier": "13jh1k2j3h-1kj23hk12j-1kj2h3k1j2-12j3hk12j",
        "options": [
            {
                "title": "Option 2"
            }
        ]
    },
    "timestamp": "2019-08-16T22:02:13.842Z"
}

Outbound Message Sample Codes

{
    "type": "outbound",
    "text": "This is a sample inbound message",
    "timestamp": "2019-08-16T22:02:13.842Z"
}
{
    "type": "outbound",
    "text": "This is a sample outbound message",
    "attachment": {
        "type": "image | audio | video | file",
        "url": "<hosted URL of the attachment>"
    },
    "timestamp": "2019-08-16T22:02:13.842Z"
}
{
    "type": "outbound",
    "attachment": {
        "type": "image | audio | video | file",
        "url": "<hosted URL of the attachment>"
    },
    "timestamp": "2019-08-16T22:02:13.842Z"
}
{
    "type": "outbound",
    "template_name": "template name",
    "timestamp": "2019-08-16T22:02:13.842Z"
}
{
    "type": "outbound",
    "whatsapp_sub_type": "text",
    "text": "This is a sample outbound message",
    "timestamp": "2019-08-16T22:02:13.842Z"
}
{
    "type": "outbound",
    "whatsapp_sub_type": "hsm",
    "template_name": "<Sample HSM Template Name>",
    "timestamp": "2019-08-16T22:02:13.842Z"
}
{
    "type": "outbound",
    "livechat_sub_type": "text",
    "text": "This is a sample outbound message",
    "timestamp": "2019-08-16T22:02:13.842Z"
}
{
    "type": "outbound",
    "livechat_sub_type": "quick_replies",
    "quick_replies": {
        "request_identifier": "12kj3h1k2j-23jkh43j-2kj3h4j-2k3j4h3jk",
        "options": [
            {
                "title": "Option 1",
                "payload": "option-1"
            }
        ]
    },
    "timestamp": "2019-08-16T22:02:13.842Z"
}
Param NameData TypeDescription
typeenumDirection of the message

- inbound

- announcement

- outbound
abc_sub_typeenumSpecifies the message type of inbound ABC message being appended

- text

- listpicker

- timepicker
livechat_sub_typeenumSpecifies the message type of inbound and outbound livechat messages being appended

- text

- quick_reply_response
whatsapp_sub_typeenumSpecifies the message type of outbound WhatsApp message being appended

- text

- hsm
list_picker_responseARRAYArray of items titles chosen by the customer on ABC
time_picker_responsedatetime - UTC formatUTC timestamp of the start time of the event slot chosen by customer on ABC
template_namestringSpecifies the template name/id of outbound templates sent on a chat.

This is applicable to outbound messages on ABC and WhatsApp channels only
textstringText content of the message
attachmentAttachment OBJECTAn object containing details of the attachments sent/received by the user
quick_repliesQuick Replies OBJECTAn object containing details of the quick replies sent to the end-customer

Applicable to Livechat channel alone
quick_reply_responseQuick Reply Response OBJECTAn object containing details of the quick replies received from the end-customer

Applicable to Livechat channel alone
timestampdatetime - UTC formatTimestamp when the message was sent or received by the user

📘

Note

Please refer to the individual code examples for each of the message type and directions for additional information and clarifications

Attachment OBJECT

Param NameData TypeDescription
typeenumType of attachment. Allowed values:

- image

- audio

- video

- file
urlstringHosted URL of the attachment

Quick Replies OBJECT

Param NameData TypeDescription
request_identifierstring - Preferrably a GUIDUnique identifier of a request made to Livechat widget
optionsARRAYArray of quick reply object containing the following params:

- title

- payload

Quick Reply Response OBJECT

Param NameData TypeDescription
request_identifierstring - Preferrably a GUIDUnique identifier of a request made to Livechat widget
optionsARRAYArray of quick reply object containing the following params:

- title

Response Codes

status_codeHTTP StatusDescription
4304200The chat details retrieved successfully
2002400Invalid header param - could not find mandatory header parameters
2003400Invalid Access Token
2004401Access Token expired
2031404Provided Chat ID does not exist
2007500Internal Server Error
2010404Could not find details of team based on the teamid passed in the header
2099405Method not allowed
4108500Unable to get the chat details
Language