Skip to main content

List all Chats

Description

You can use this API to get the complete list of chats and the info available about the chats in your department.

Query Parameters

*limit : The Number of chats you would like to receive (The default limit is 50.)

*fromtime : The Chats after the specified time will be retreived and displayed.

*totime : The Chats before the specified time will be retreived and displayed.

Pre-requisite

A valid OAuth Token is mandatory.

Click to view the list of Sample Response Params

URL

Copiedhttps://salesiq.zoho.com/api/v1/<screenname>/chats

Example

Copiedhttps://salesiq.zoho.com/api/v1/zylker/chats?limit=15&fromtime=1459171743914&totime=1458795665587 

Success Response

Copied{
  "data": [
    {
      "department_id": "4489000000002013",
      "chatinitiated_time": "1459171743914",
      "attender_name": "Patricia",
      "attender_email": "patricia@zylker.com",
      "attender_id": "4489000000002001",
      "country_code": "US",
      "participants": [
        "5000000000007"
      ],
      "embed_id": "4489000000002043",
       "supervisor":[
         "5000000000005"
      ],
      "chat_duration": "120000",
      "end_time": "1459171979283",
      "chat_id": "282",
      "visitor_ip": "192.168.141.236",
      "visitor_email": "tom@zylker.com",
      "visitor_name": "Tom",
      "question": "Running a test chat !",
      "department_name": "sales",
      "embed_name": "zylker",
      "pickup_time": "1459171840646",
      "waited_duration": "25000",
      "chat_title" : "Zylker"
    },
{
      "missed_time":"1458795725587",
      "visitor_phoneno": "1-541-754-3010",
      "customer_info": {
        "Expiry": "Jan 20, 2016",
        "Band": "Premium"
      },
      "crm_info":"Lead",
      "department_id": "4489000000002013",
      "chatinitiated_time": "1458795665587",
      "country_code": "US",
      "embed_id": "4489000000127003",
      "end_time": "1458795665587",
      "chat_id": "277",
      "visitor_ip": "192.168.141.236",
      "visitor_email": "tom@zylker.com",
      "visitor_name": "Tom",
      "description" : "Info about the list of chats in your departments",
      "question": "Running a test chat",
      "department_name": "sales",
      "embed_name": "zylker",
      "waited_duration": "60000"
    }
  ]
}

Error Codes - General Error

CopiedInternal Server error while retrieving the chat list
 code : 2010
 Error Message : "Unable to retrieve Chat list"

Error Response - Example

Copied{
 "error" :
  {
           "message":"Unable to retrieve Chat list",
           "code":2010
    }
}