List ChatKit threads
GET/chatkit/threads
List ChatKit threads with optional pagination and user filters.
Query Parameters
after: optional string
List items created after this thread item ID. Defaults to null for the first page.
before: optional string
List items created before this thread item ID. Defaults to null for the newest results.
limit: optional number
Maximum number of thread items to return. Defaults to 20.
minimum0
maximum100
user: optional string
Filter threads that belong to this user identifier. Defaults to null to return all users.
minLength1
maxLength512
Returns
first_id: string
The ID of the first item in the list.
has_more: boolean
Whether there are more items available.
last_id: string
The ID of the last item in the list.
object: "list"
The type of object returned, must be list.
List ChatKit threads
curl "https://api.openai.com/v1/chatkit/threads?limit=2&order=desc" \
-H "OpenAI-Beta: chatkit_beta=v1" \
-H "Authorization: Bearer $OPENAI_API_KEY"
{
"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"
}