List ChatKit threads
beta.chatkit.threads.list(ThreadListParams**kwargs ) -> SyncConversationCursorPage[ChatKitThread]
GET
/chatkit/threadsList ChatKit threads with optional pagination and user filters.
List ChatKit threads
from openai import OpenAI
client = OpenAI()
page = client.beta.chatkit.threads.list()
page = page.data[0]
print(page.id)
Response example
{
"data": [
{
"id": "cthr_abc123",
"object": "chatkit.thread",
"title": "Customer escalation",
"created_at": 1712345600,
"status": {
"type": "active"
},
"user": "user_123"
},
{
"id": "cthr_def456",
"object": "chatkit.thread",
"title": "Demo feedback",
"created_at": 1712345600,
"status": {
"type": "active"
},
"user": "user_456"
}
],
"has_more": false,
"object": "list",
"first_id": "cthr_abc123",
"last_id": "cthr_def456"
}
Returns Examples
Response example
{
"data": [
{
"id": "cthr_abc123",
"object": "chatkit.thread",
"title": "Customer escalation",
"created_at": 1712345600,
"status": {
"type": "active"
},
"user": "user_123"
},
{
"id": "cthr_def456",
"object": "chatkit.thread",
"title": "Demo feedback",
"created_at": 1712345600,
"status": {
"type": "active"
},
"user": "user_456"
}
],
"has_more": false,
"object": "list",
"first_id": "cthr_abc123",
"last_id": "cthr_def456"
}