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.

GET/v1/accounts/:accountID/applications/:applicationID/ai-agents/:aiAgentID/sessions
Click to copy
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- type of [Map]
    • actor - REQUIRED[String]

      The actor who sent the message [bot, internal_user, external_user].

    • chatMessageID - REQUIRED[String]

      The unique identifier for the chat message.

    • chatSessionID - REQUIRED[String]

      The identifier for the chat session the message belongs to.

    • chatUserEmail - OPTIONAL[String]

      The email address of the user who originated the chat, if available.

    • chatUserID - REQUIRED[String]

      The unique identifier for the user who initiated the chat.

    • createdAt - REQUIRED[String]

      The date and time when the message was created.

    • message - REQUIRED[String]

      The content of the chat message.

    • messageCount - REQUIRED[Integer]

      The total number of messages in the session.

    • updatedAt - REQUIRED[String]

      The date and time when the message was last updated.

    • voteStatus - OPTIONAL[String]

      The vote status of the message, applicable only to bot actors.

  • totalChatHistoryMessages - REQUIRED[Integer]

    The total number of chat history messages returned in the response.

Chat History Messages Response Shape
Click to copy
{
  "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.