List ChatKit thread items
GET/chatkit/threads/{thread_id}/items
List items that belong to a ChatKit thread.
Path Parameters
thread_id: string
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
Returns
List ChatKit thread items
curl "https://api.openai.com/v1/chatkit/threads/cthr_abc123/items?limit=3" \
-H "OpenAI-Beta: chatkit_beta=v1" \
-H "Authorization: Bearer $OPENAI_API_KEY"
{
"data": [
{
"id": "cthi_user_001",
"object": "chatkit.thread_item",
"type": "user_message",
"content": [
{
"type": "input_text",
"text": "I need help debugging an onboarding issue."
}
],
"attachments": []
},
{
"id": "cthi_assistant_002",
"object": "chatkit.thread_item",
"type": "assistant_message",
"content": [
{
"type": "output_text",
"text": "Let's start by confirming the workflow version you deployed."
}
]
}
],
"has_more": false,
"object": "list"
}
Returns Examples
{
"data": [
{
"id": "cthi_user_001",
"object": "chatkit.thread_item",
"type": "user_message",
"content": [
{
"type": "input_text",
"text": "I need help debugging an onboarding issue."
}
],
"attachments": []
},
{
"id": "cthi_assistant_002",
"object": "chatkit.thread_item",
"type": "assistant_message",
"content": [
{
"type": "output_text",
"text": "Let's start by confirming the workflow version you deployed."
}
]
}
],
"has_more": false,
"object": "list"
}