List ChatKit threads
client.beta.chatkit.threads.list(ThreadListParams { after, before, limit, 2 more } query?, RequestOptionsoptions?): ConversationCursorPage<ChatKitThread { id, created_at, object, 3 more } >
GET/chatkit/threads
List ChatKit threads
import OpenAI from 'openai';
const client = new OpenAI();
// Automatically fetches more pages as needed.
for await (const chatkitThread of client.beta.chatkit.threads.list()) {
console.log(chatkitThread.id);
}
{
"data": [
{
"id": "cthr_abc123",
"object": "chatkit.thread",
"title": "Customer escalation"
},
{
"id": "cthr_def456",
"object": "chatkit.thread",
"title": "Demo feedback"
}
],
"has_more": false,
"object": "list"
}
Returns Examples
{
"data": [
{
"id": "cthr_abc123",
"object": "chatkit.thread",
"title": "Customer escalation"
},
{
"id": "cthr_def456",
"object": "chatkit.thread",
"title": "Demo feedback"
}
],
"has_more": false,
"object": "list"
}