Chats

List chat events

GET

Path parameters

idstringRequired
Identifier for a Chat. Formatted as a UUID.

Query parameters

page_sizeintegerOptional

Specifies the maximum number of results to include per page, enabling pagination.

The value must be greater than or equal to 1. For example, if page_size is set to 10, each page will include up to 10 items. Defaults to 10.

page_numberintegerOptional

Specifies the page number to retrieve, enabling pagination.

This parameter uses zero-based indexing. For example, setting page_number to 0 retrieves the first page of results (items 0-9 if page_size is 10), setting page_number to 1 retrieves the second page (items 10-19), and so on. Defaults to 0, which retrieves the first page.

ascending_orderbooleanOptional
Specifies the sorting order of the results based on their creation date. Set to true for ascending order (chronological, with the oldest records first) and false for descending order (reverse-chronological, with the newest records first). Defaults to true.

Response

This endpoint returns an object
id
string
Identifier for a Chat. Formatted as a UUID.
chat_group_id
string

Identifier for the Chat Group. Any chat resumed from this Chat will have the same chat_group_id. Formatted as a UUID.

status
enum

Indicates the current state of the chat. There are six possible statuses:

  • ACTIVE: The chat is currently active and ongoing.

  • USER_ENDED: The chat was manually ended by the user.

  • USER_TIMEOUT: The chat ended due to a user-defined timeout.

  • MAX_DURATION_TIMEOUT: The chat ended because it reached the maximum allowed duration.

  • INACTIVITY_TIMEOUT: The chat ended due to an inactivity timeout.

  • ERROR: The chat ended unexpectedly due to an error.

start_timestamp
integer
Time at which the Chat started. Measured in seconds since the Unix epoch.
pagination_direction
enum

Indicates the order in which the paginated results are presented, based on their creation date.

It shows ASC for ascending order (chronological, with the oldest records first) or DESC for descending order (reverse-chronological, with the newest records first). This value corresponds to the ascending_order query parameter used in the request.

Allowed values: ASCDESC
events_page
list of objects

List of Chat Events for the specified page_number and page_size.

page_number
integer

The page number of the returned list.

This value corresponds to the page_number parameter specified in the request. Pagination uses zero-based indexing.

page_size
integer

The maximum number of items returned per page.

This value corresponds to the page_size parameter specified in the request.

total_pages
integer
The total number of pages in the collection.
end_timestamp
integerOptional
Time at which the Chat ended. Measured in seconds since the Unix epoch.
metadata
stringOptional
Stringified JSON with additional metadata about the chat.
config
objectOptional
The Config associated with this Chat.