Chats

Export Chats to CSV

get/chat/export

Query parameters

idstring

This is the unique identifier for the chat to filter by.

assistantIdstring

This is the unique identifier for the assistant that will be used for the chat.

assistantIdAnystring
Example:assistant-1,assistant-2,assistant-3

Filter by multiple assistant IDs. Provide as comma-separated values.

squadIdstring

This is the unique identifier for the squad that will be used for the chat.

sessionIdstring

This is the unique identifier for the session that will be used for the chat.

previousChatIdstring

This is the unique identifier for the previous chat to filter by.

columns'id' | 'assistantId' | 'squadId' | 'sessionId' | 'previousChatId' | 'cost' | 'messages' | 'output' | 'createdAt' | 'updatedAt'

Columns to include in the CSV export

emailstring

This is the email address to send the export to. Required if userId is not available in the request context.

format'csv' | 'json'

This is the format of the export.

@default csv

pagenumber

This is the page number to return. Defaults to 1.

sortOrder'ASC' | 'DESC'

This is the sort order for pagination. Defaults to 'DESC'.

limitnumber

This is the maximum number of items to return. Defaults to 100.

createdAtGtstring date-time

This will return items where the createdAt is greater than the specified value.

createdAtLtstring date-time

This will return items where the createdAt is less than the specified value.

createdAtGestring date-time

This will return items where the createdAt is greater than or equal to the specified value.

createdAtLestring date-time

This will return items where the createdAt is less than or equal to the specified value.

updatedAtGtstring date-time

This will return items where the updatedAt is greater than the specified value.

updatedAtLtstring date-time

This will return items where the updatedAt is less than the specified value.

updatedAtGestring date-time

This will return items where the updatedAt is greater than or equal to the specified value.

updatedAtLestring date-time

This will return items where the updatedAt is less than or equal to the specified value.

Changes