Leads Summary
GET
/leads/summary/{lead_id}Fetches a summary of all leads, including counts by status or other aggregations.
Request
None
Responses
Success(200)
Not found(404)
Unauthorized(401)
HTTP Code: 200
Content Type : JSONapplication/json
Data Schema
data
object
required
id
string
required
name
string
required
title
null
required
company
null
required
phonenumber
string
required
email
string
required
status
string
required
date
string
required
chat_id
string
required
assigned
string
required
is_public
string
required
chat
null
required
chat_date
null
required
lead_type
string
required
assigned_to
null
required
color
string
required
analytics
object
required
notes_count
integer
required
attachment_count
integer
required
message
string
required
Example
{
"data": {
"id": "1",
"name": "john",
"title": null,
"company": null,
"phonenumber": "01234XXXXXX",
"email": "[email protected]",
"status": "New",
"date": "2024-08-05 14:07:36",
"chat_id": "uyisa77",
"assigned": "0",
"is_public": "0",
"chat": null,
"chat_date": null,
"lead_type": "Sales",
"assigned_to": null,
"color": "#84CC16",
"analytics": {
"source": "3",
"analytics": "{\"city\":\"New York\",\"country\":\"US\",\"country_code\":\"PK\",\"latitude\":null,\"longitude\":null,\"region\":\"Sindh\",\"timezone\":\"UTC/GMT\"}",
"browser": "Google Chrome",
"source_url": "http://localhost/liveforce/",
"ip": "117.20.31.166",
"chat_start_time": "2023-09-13T11:06:31.060009Z",
"chat_end_time": "2024-08-05T09:07:36.406233Z",
"chat": "[{\"id\":\"S09XQ866FV_1\",\"created_at\":\"2023-09-13T11:06:31.060009Z\",\"visibility\":\"all\",\"type\":\"message\",\"properties\":{\"lc2\":{\"welcome_message\":true}},\"text\":\"Hello. How may I help you?\",\"author_id\":\"[email protected]\"},{\"id\":\"S09XQ866FV_2\",\"created_at\":\"2023-09-13T11:06:31.060011Z\",\"visibility\":\"all\",\"type\":\"message\",\"properties\":{\"source\":{\"client_id\":\"c5e4f61e1a6c3b1521b541bc5c5a2ac5\"}},\"text\":\"Hey\",\"author_id\":\"665ac64a-d751-4b4d-a1ed-4cbf46057f98\",\"custom_id\":\"owgq84cmaig\"},{\"id\":\"S09XQ866FV_3\",\"created_at\":\"2023-09-13T11:07:55.747000Z\",\"visibility\":\"all\",\"type\":\"message\",\"properties\":{\"source\":{\"client_id\":\"bb9e5b2f1ab480e4a715977b7b1b4279\"}},\"text\":\"Hi there! :wave: How can I help you today? \",\"author_id\":\"[email protected]\",\"custom_id\":\"1694603274419.96817553399\"},{\"id\":\"S09XQ866FV_4\",\"created_at\":\"2023-09-13T11:22:15.002002Z\",\"visibility\":\"agents\",\"type\":\"system_message\",\"text\":\"Chat is idle due to 10 minutes of inactivity\",\"system_message_type\":\"routing.idle\",\"text_vars\":{\"duration\":\"10\"}},{\"id\":\"S09XQ866FV_5\",\"created_at\":\"2023-09-13T11:27:20.006000Z\",\"visibility\":\"all\",\"type\":\"system_message\",\"text\":\"Chat archived due to 15 minutes of inactivity\",\"system_message_type\":\"routing.archived_inactive\",\"text_vars\":{\"duration\":\"15\"}}]"
},
"notes_count": 0,
"attachment_count": 0
},
"message": "success"
}
Last modified: 2 months ago