Skip to content

Data API

Conversations

The conversations data API gives you direct access to the bulk content and metadata of your user’s conversations. You can use this data in your own BI system for analyis.

The conversation data is stored in a S3 bucket. You can get direct access to the bucket using a access key and secret key. Contact your Unless account manager if you’d like to get access.

Each conversation will be stored at a key with the following schema “_/account-id/conversations/website-id/session-id/conversation-id.json”. Therefore, if you would like to bulk download all of the conversations associated with a given website, you’d download all of the session directories from “account-id/conversations/website-id”. Each conversation object is regularly updated as users interact with the AI system.

Each file contains the following fields:

Field Type Notes
chatHistory ChatHistory The ChatHistory is a serializable array of Log objects (see below)
conversationName string | null A string representing a human-readable name for the conversation
createdAt number (optional) A timestamp representing when the conversation was created (May be absent on old data)
history Log[] Array of log objects (see ChatHistory)
metadata Record<string, unknown> Free-form session metadata
personalizationId string Tracking ID from the component
sessionId string A unique identifier corresponding to a group of conversations had by one user without closing their browser window
startingMessageSent boolean (optional) When true, the starting message has already been sent to the user in this conversation
websiteId string (optional) The unique identifier of the workspace that the conversation is associated with
Field Type Notes
type string A string describing the type of log, e.g. ‘message’, ‘error’, ‘input’
sender ‘bot’ | ‘user’ | ‘support’ The entity which sent the corresponding log item
timestamp number The time at which the log item was created
uuid string A unique identifier for the log item
hidden boolean When true, this log item won’t be rendered for the user in the chat window
historical? boolean | null When true, this log was from a previous conversation but added to create the illusion of continuity.
local? boolean | null Frontend-only, not sent to backend
segmentId? string | null This is the unique identifier corresponding to the topic that the user is in at the time the log item is created.
messageFormat? ‘md’ | ‘html’ | string | null This determines how the log item’s content should be rendered
parentId? string | null Groups logs into Q&A pairs
isLiveChat? boolean | null When true, this log item was created while the user was in live chat mode (i.e. speaking to a customer support agent rather than chatbot)