Conversations
List threads
Retrieves a list of conversational threads for a specific AI Agent. Each entry in the list contains only the last sent message for each thread. To access the full conversation, a separate request must be made. By default, this API will return chat history from the last 30 days unless a specific date range is provided.
curl --request GET \
--url https://api.sidecarcx.com/v1/accounts/:accountID/applications/:applicationID/ai-agents/:aiAgentID/sessions \
--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.
Chat History Messages Response - [Map]
A list of chat history messages for an AI Agent.
Attributes
- chatHistoryMessages - REQUIRED[Array]
A list of chat history messages.
List Contents (chatHistoryMessages)- type of [Map]
- chatHistoryMessages[0].actor - REQUIRED[String]
The actor who sent the message [bot, internal_user, external_user].
- chatHistoryMessages[0].chatMessageID - REQUIRED[String]
The unique identifier for the chat message.
- chatHistoryMessages[0].chatSessionID - REQUIRED[String]
The identifier for the chat session the message belongs to.
- chatHistoryMessages[0].chatUserEmail - OPTIONAL[String]
The email address of the user who originated the chat, if available.
- chatHistoryMessages[0].chatUserID - REQUIRED[String]
The unique identifier for the user who initiated the chat.
- chatHistoryMessages[0].createdAt - REQUIRED[String]
The date and time when the message was created.
- chatHistoryMessages[0].message - REQUIRED[String]
The content of the chat message.
- chatHistoryMessages[0].messageCount - REQUIRED[Integer]
The total number of messages in the session.
- chatHistoryMessages[0].updatedAt - REQUIRED[String]
The date and time when the message was last updated.
- chatHistoryMessages[0].voteStatus - OPTIONAL[String]
The vote status of the message, applicable only to bot actors.
- chatHistoryMessages[0].actor - REQUIRED[String]
- totalChatHistoryMessages - REQUIRED[Integer]
The total number of chat history messages returned in the response.
{
"chatHistoryMessages": [
{
"actor": "string",
"chatMessageID": "string",
"chatSessionID": "string",
"chatUserEmail": "string",
"chatUserID": "string",
"createdAt": "string",
"message": "string",
"messageCount": 0,
"updatedAt": "string",
"voteStatus": "string"
}
],
"totalChatHistoryMessages": 0
}
Errors
A common set of Error Responses can be found here.