listChats()
listChats(
options?:ListChatsOptions):Promise<ListChatsResponse>
Defined in: packages/core/src/index.ts:2767
List all chats for the current user
Parameters
| Parameter | Type |
|---|---|
options? | ListChatsOptions |
Returns
Promise<ListChatsResponse>
Array of managed chat objects
Throws
401 - Not authenticated
Example
import { listChats } from "@cpod/sdk";
const chats = await listChats();
chats.forEach(chat => {
console.log(`${chat.title} - ${chat.message_count} messages`);
});