Skip to Content
DocsπŸ—οΈ ⏐ APIModels

API Models

reachat is data-shape driven β€” every component reads from a small set of TypeScript interfaces. Below are the public model types you’ll use when wiring up sessions, conversations, attachments, citations, and starter prompts.

Session

NameTypeDefault
idstring

Unique identifier for the session

titlestring

Title of the session

createdAtDate

Date and time when the session was created

updatedAtDate

Date and time when the session was last updated

conversationsConversation[]

Array of conversations within this session

Conversation

NameTypeDefault
idstring

Unique identifier for the conversation

createdAtDate

Date and time when the conversation was created

updatedAtDate

Date and time when the conversation was last updated

questionstring

The user’s question or input that initiated the conversation

responsestring

The AI’s response to the user’s question

sourcesConversationSource[]

Array of sources referenced in the conversation

filesConversationFile[]

Array of file paths or identifiers associated with the conversation

ConversationSource

NameTypeDefault
urlstring

URL of the source, if applicable

titlestring

Title or description of the source

imagestring

Image URL of the source, if applicable.

ConversationFile

NameTypeDefault
namestring

Name of the file

typestring

Type of the file

sizenumber

Size of the file

urlstring

URL of the file

Template

Templates power the starter-prompt UI rendered by <SessionsList templates>. Each template appears as a clickable card when no session is active.

NameTypeDefault
idstring

Unique identifier for the template

titlestring

Title of the template

messagestring

Message to be sent when template is selected

iconReactElement<unknown, string | JSXElementConstructor<any>>

Icon to display next to the template

Suggestion

Suggestions power the <ChatSuggestions> chip list β€” a row of clickable prompts you can render inline in the message panel.

NameTypeDefault
idstring

Unique identifier for the suggestion

contentstring

The display text for the suggestion