Name | Type | Description | ||||
---|---|---|---|---|---|---|
_id |
| Internal object identifier | ||||
room |
| Chat unique identifier | ||||
id |
| Message unique identifier | ||||
messageType |
| Type of the message. Can assume one of the following values: “TEXT” “IMAGE” “DOCUMENT” “LINK” “videoRequestedByAgent” “videoRequestedByCustomer” “videoAccepted” “videoRejected” “videoStarted” “videoEnded” “screenSharingStarted” “screenSharingEnded” “endChat” “leave” | ||||
ts |
| Timestamp of when message was sent | ||||
isAgent |
| Indicates if the person who sent the message is an agent | ||||
id [user object] |
| user unique identifier | ||||
firstIP |
| Agent/customer IP | ||||
text |
| Only in “TEXT” message, contains the message sent | ||||
img |
| Contains base64 image message | ||||
caption |
| Message caption | ||||
documentType |
| Document format | ||||
fileName |
| Contains name of the document/image message | ||||
url |
| Contains the url of the link message | ||||
deliverySuccess |
| Indicates if the message has been succesfully delivered | ||||
deliveryErrorReason |
| In case of delivery failed, describes the error occurred |
Name | Type | Description | ||||
---|---|---|---|---|---|---|
room |
| Chat unique identifier | ||||
data |
| Object containing message info. See message data object for more details. |
...
Name | Type | Description | ||||
---|---|---|---|---|---|---|
id |
| message unique identifier | ||||
messageType |
| Type of the message. Can assume one of the following values: “TEXT” “IMAGE” “DOCUMENT” “LINK” “videoRequestedByAgent” “videoRequestedByCustomer” “videoAccepted” “videoRejected” “videoStarted” “videoEnded” “screenSharingStarted” “screenSharingEnded” “endChat” “leave” | ||||
ts |
| Timestamp of when message was sent | ||||
deliverySuccess |
| Indicates whether if the message was sent successfullyhas been succesfully delivered | ||||
deliveryErrorReason |
| Error occurred if the message was not sent correctlyIn case of delivery failed, describes the error occurred | ||||
replyTo |
| Message ID you are replying to | ||||
content |
| Message content. See message content object for more details. |
...
Name | Type | Description | ||||
---|---|---|---|---|---|---|
text |
| Only in “TEXT” message, contains the message sent | ||||
user |
| Semplified user object containing only user id and isAgent properties of the user who sent the message. | ||||
url |
| Contains the url of the link message |
...
Examples
Text message:
Code Block | ||
---|---|---|
| ||
{ "data" : { "id" : "08856c6f-47e2-4a47-83bd-54f727993fc1", "messageType" : "TEXT", "content" : { "text" : "hello", "user" : { "id" : "USER_DEFAULT_9a0a411c-f9c7-4af7-9754-024bf157a3ef", "isAgent" : false } }, "ts" : 1617786843832.0, "deliverySuccess" : true, "deliveryErrorReason" : "" }, "_id" : ObjectId("606d7810d6e88353f887329d"), "room" : "CHAT_DEFAULT_d06723cf-518e-4767-99b6-6d21d5998081" } |
...