Add message context to conversation
All API requests should contain authorization headers.
Request
POST chat/conversations/{id}/previousMessages
This endpoint allows adding historical messages to an existing conversation.
These messages were not originally created within the service (e.g., imported from email, CRM, or other support platforms). It helps provide full context for the conversation history.
Request body
[
{
"message": "Hi, I sent this via email before signing in",
"author": {
"name": "John",
"email": "[email protected]"
}
},
{
"message": "Thanks for reaching out. Let me help you with that.",
"author": {
"name": "John",
"email": "[email protected]"
},
"creationTime": "2023-10-19T10:00:58.84+00:00"
}
]
The body of the request should contain the following model serialized to JSON.
The maximum future time set in the creationTime
property cannot exceed 30 seconds from the moment the server receives the message. For example, if the time specified in property creationTime
for a created message is 15:00:35
, and the server receives it at 15:00:00
, an error will be generated.
creationTime
nullable string
Message creation time. Optional, if null
current time will be set
isByTeam
nullable boolean
Indicate if the message author is a team member
If it's null
, the system uses a default value.
If it's false
, the message is flagged as from a client
If it's true
, the message is flagged as from a team member
message
string
Message content
Response
{
"data": [
{
"author": {
"email": "[email protected]",
"id": "fc2481f6-28a4-4ca7-849a-344fd6ab1b20",
"image": null,
"isBot": false,
"name": "John",
"status": "client"
},
"creationTime": "2023-08-22T14:50:07.21+00:00",
"id": 667155,
"lastModifiedTime": "2023-09-01T15:03:59.81+00:00",
"message": "Example of chat message"
}
],
"errorCode": -1,
"errorText": null
}
Data
field has type of array of Conversation message objects.
Last updated
Was this helpful?