Conversations
Retrieve a full thread
Retrieves the complete conversation thread for a specific AI Agent and chat session. This will include all messages exchanged between the AI Agent and users, whether they are external users interacting with the chatbot or live agents handling customer interactions. This API provides all the details of the conversation, including the message content and metadata for each message.
curl --request GET \
--url https://api.sidecarcx.com/v1/accounts/:accountID/applications/:applicationID/ai-agents/:aiAgentID/sessions/:chatSessionID/messages \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'Path Parameters
- :accountID - REQUIRED[String]
The referenced account ID.
- :applicationID - REQUIRED[String]
The referenced application ID.
- :aiAgentID - REQUIRED[String]
The referenced AI Agent ID.
- :chatSessionID - REQUIRED[String]
The referenced chat session ID.
Chat Messages Response - [Map]
A list of chat messages.
Attributes
- chatMessages - REQUIRED[Array]
A list of all chat messages in the thread for the specified session.
List Contents (chatMessages)- type of [Map]
- chatMessages[0].actor - REQUIRED[String]
The actor who sent the message [bot, internal_user, external_user].
- chatMessages[0].actorEmail - OPTIONAL[String]
The email of the actor, if available.
- chatMessages[0].actorUserID - OPTIONAL[String]
The ID of the actor, if available.
- chatMessages[0].chatMessageID - REQUIRED[String]
The unique identifier for the chat message.
- chatMessages[0].createdAt - REQUIRED[String]
The timestamp when the message was created.
- chatMessages[0].message - REQUIRED[String]
The content of the chat message.
- chatMessages[0].updatedAt - REQUIRED[String]
The timestamp when the message was last updated.
- chatMessages[0].voteStatus - OPTIONAL[String]
The vote status of the message, applicable only to bot actors.
- chatMessages[0].actor - REQUIRED[String]
- totalChatMessages - REQUIRED[Integer]
The total number of messages in the conversation thread.
{
"chatMessages": [
{
"actor": "string",
"actorEmail": "string",
"actorUserID": "string",
"chatMessageID": "string",
"createdAt": "string",
"message": "string",
"updatedAt": "string",
"voteStatus": "string"
}
],
"totalChatMessages": 0
}Errors
A common set of Error Responses can be found here.