Previous messages for the specified chat session
Scope:
client
or
operator
id
required
The id of the chat to get get history from
limit
required
The maximum amount of messages to return
ending_message_id
required
The message id to start going back from
payload
The chat history data
chat_fields
The list of chat fields
answer
The field answer
crm
The crm field name
field_info
The field info (field order, field id, crm field id)
jump_logic
The jump logic for the form layout
question
The chat field question
messages
The list of the chat messages
actionTaken
True if action was taken else false
addedToFaq
True if added to FAQs else false
chatMessage
The chat message
chatSessionDetailId
The chat session detail id
createdBy
The name of who created the message
createdTime
The date and time of the message
fromName
The name of who entered the message
lastPingTime
The last ping time
message
The chat message
messageId
The unique identifer of the chat message
messageStatus
The chat message status
messageSubType
The chat message sub type
messageType
The chat message type
operatorId
The operator id
postedToTheClient
True if message was posted to the client else false
postedToTheServer
True if message was posted to the server else false
sessionStateId
The chat session state id
visitorId
The visitor id
more_messages
True if more messages are available for the chat session else false
page_size
The number of records being returned
status
The system response status. Will be ok or error
curl
example request
1
curl -H "Authorization: Bearer {{Oauth Token}}"
2
https://developer.livehelpnow.net/api/chat/{{1234567}}/history\?limit\=20\&ending_message_id\=1288375640
example response
1
{
2
"payload": {
3
"chat_fields": [{
4
"answer"
: "john.doe@livehelpnow.com",
5
"crm"
: "email",
6
"field_info"
: "fld_1_4723_48",
7
"jump_logic"
: [{"conditions": null, "actions": [{"email":{"email_address":"john.doe@livehelpnow.com"}},{"goto": 2}]}],
8
"question"
: "what is your email?"
9
}],
10
"messages": [{
11
"actionTaken"
: false,
12
"addedToFaq"
: false,
13
"chatMessage"
: "You are being transferred to John Doe...",
14
"chatSessionDetailId"
: 1937456,
15
"createdBy"
: "server",
16
"createdTime"
: "2021-06-30T09:44:02",
17
"fromName"
: "",
18
"lastPingTime"
: "2021-06-30T09:44:02",
19
"message"
: "You are being transferred to John Doe...",
20
"messageId"
: 1288375640,
21
"messageStatus"
: "sent",
22
"messageSubType"
: 10,
23
"messageType"
: 1,
24
"operatorId"
: 0,
25
"postedToTheClient"
: false,
26
"postedToTheServer"
: false,
27
"sessionStateId"
: 1,
28
"visitorId"
: "dinghn4zbnskmlq5rkbaqi5m-1-98265432"
29
}],
30
"more_messages"
: true,
31
"page_size"
: 15
32
},
33
"status": "ok"
34
}