GET/chatkit/threads/{thread_id}/items

List items in a ChatKit thread

Lists items belonging to a ChatKit thread. Use after or before to select items relative to a thread item ID, and use limit and order to control the result set. The response includes pagination identifiers and a has_more flag.

5 parameters
thread_idstringrequired
Identifier of the ChatKit thread whose items you want to list.
limitintegeroptional
Maximum number of thread items to return, from 0 to 100. Defaults to 20 when omitted.
orderstringoptional
Sort order by creation time: `asc` or `desc`. Defaults to `desc` when omitted.
Allowed:ascdesc
afterstringoptional
List items created after this thread item ID. Defaults to the first page when omitted.
beforestringoptional
List items created before this thread item ID. Defaults to the newest results when omitted.

4 status codes
200Returns a list of thread items with first and last item IDs and a `has_more` flag indicating whether additional items are available.
objectstringrequired
The type of object returned, must be `list`.
Allowed:listDefault:list
dataarray<TheThreadItem>required
A list of items
first_idstringrequired
The ID of the first item in the list.
last_idstringrequired
The ID of the last item in the list.
has_morebooleanrequired
Whether there are more items available.
400Returned when the request is invalid or the required ChatKit beta header is missing or invalid.
errorobjectrequired
404Returned when the thread is not found or is not accessible.
errorobjectrequired
429Returned when the request rate limit has been exceeded.
errorobjectrequired

Error handling

A 400 is returned when the request is invalid or the required ChatKit beta header is missing or invalid. A 404 is returned when the thread is not found or accessible. A 429 is returned when the request rate limit is exceeded. The thread_id path parameter must identify an accessible thread; limit must be from 0 to 100, and order must be asc or desc.