List conversations
Query parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
chatbotId | string | — | Filter to a specific chatbot |
page | number | 1 | Page number |
limit | number | 20 | Items per page (max 100) |
Response
Response fields
| Field | Type | Description |
|---|---|---|
conversations | array | Paginated list of conversation objects |
conversations[].id | string | OpenBat internal ID |
conversations[].chatbot_id | string | ID of the chatbot this conversation belongs to |
conversations[].external_conversation_id | string | The conversation ID you passed via the SDK |
conversations[].external_user_id | string | The user ID you passed via the SDK |
conversations[].message_count | number | Total messages in the conversation |
conversations[].first_message_at | string | ISO 8601 timestamp of the first message |
conversations[].last_message_at | string | ISO 8601 timestamp of the most recent message |
conversations[].created_at | string | ISO 8601 timestamp when the conversation was created |
conversations[].chatbots.name | string | Name of the chatbot |
total | number | Total number of matching conversations |
page | number | Current page number |
limit | number | Items per page |
Get a conversation
Retrieve a single conversation with its full message history and sentiment analysis.Response
Message fields
| Field | Type | Description |
|---|---|---|
id | string | OpenBat internal message ID |
role | string | user, assistant, or system |
content | string | Message text |
external_message_id | string | The message ID you passed via the SDK |
created_at | string | ISO 8601 timestamp |
user_sentiments | array | Sentiment analysis results (present on user messages only) |
Sentiment object fields
| Field | Type | Description |
|---|---|---|
score | number | Sentiment score ranging from -1 (very negative) to 1 (very positive) |
text_chunk | string | The portion of the message this score applies to |
reasoning | string | Explanation of why this score was assigned |
Analytics overview
Get aggregate metrics across all your chatbots, or scope to a specific one.Query parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
chatbotId | string | — | Scope metrics to a specific chatbot |
Response
Response fields
| Field | Type | Description |
|---|---|---|
totalConversations | number | Total number of conversations |
totalMessages | number | Total number of messages across all conversations |
avgSentiment | number | Average sentiment score (-1 to 1) |
sentimentDistribution | object | Counts grouped by sentiment label |
messagesToday | number | Number of messages received today |
sentimentDistribution object contains five keys: Very Positive, Positive, Neutral, Negative, and Very Negative. Each value is an integer count.
Sentiment trends
Get sentiment data over time for charting and trend analysis.Query parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
chatbotId | string | — | Required. Filter to a specific chatbot. |
days | number | 30 | Lookback period in days (max 365) |
Response
Response fields
| Field | Type | Description |
|---|---|---|
sentimentOverTime | array | One entry per day within the lookback period |
sentimentOverTime[].date | string | Date in YYYY-MM-DD format |
sentimentOverTime[].avgScore | number | Average sentiment score for that day (-1 to 1) |
sentimentOverTime[].count | number | Number of sentiment-analyzed messages that day |
distribution | object | Counts grouped by sentiment label for the period |
total | number | Total number of analyzed messages in the period |