Starting and Continuing Conversations
1
Send a message
Send a message to start a new conversation. The SDK creates one automatically if no
conversationId is provided.2
Get the conversation ID
The conversation ID is returned in the response metadata:
3
Continue the conversation
Pass the
conversationId to subsequent calls:newConversation
interface ChatbaseClient — Package: com.chatbase.sdk
sendMessage starts a new conversation.
listConversations
Conversation
data class Conversation — Package: com.chatbase.sdk.model
The identified user who owns this conversation, or
null for anonymous (device-scoped) conversations.listMessages
Messages are returned in reverse chronological order — the first page contains the most recent messages. Within each page, messages are ordered oldest to newest.
Message
data class Message — Package: com.chatbase.sdk.model
Pagination
data class Page<T> — Package: com.chatbase.sdk.model
All list methods return a Page<T> with built-in pagination support.
true if hasMore is true and cursor is non-null.
Page with the older items prepended to the existing data, so you always have the full accumulated list. Returns null if there are no more pages.
Paginating Through All Results
Related
Streaming
Send messages and stream responses
User Identity
Scope conversations to users