GET/conversations/{conversation_id}/items

List items in a conversation

Lists the items in a conversation. Use after to continue from an item ID, limit to control the number of results, and order to choose the direction of the results.

5 parameters
conversation_idstringrequired
The identifier of the conversation whose items to list.
limitintegeroptional
Number of items to return, from 1 to 100. Defaults to 20 when omitted.
Default:20
orderstringoptional
Sort direction for the items: `asc` or `desc`. Defaults to `desc` when omitted.
Allowed:ascdesc
afterstringoptional
Item ID to use as the pagination cursor; lists items after this item.
includearray<string>optional
Additional response data to include: `file_search_call.results`, `web_search_call.results`, `web_search_call.action.sources`, `message.input_image.image_url`, `computer_call_output.output.image_url`, `code_interpreter_call.outputs`, `reasoning.encrypted_content`, or `message.output_text.logprobs`.

4 status codes
200Returns a list of conversation items with `has_more`, `first_id`, and `last_id` fields indicating pagination state.
objectstringrequired
The type of object returned, must be `list`.
Allowed:list
dataarray<ConversationItem>required
A list of conversation items.
has_morebooleanrequired
Whether there are more items available.
first_idstringrequired
The ID of the first item in the list.
last_idstringrequired
The ID of the last item in the list.
400Returned when stored encrypted item content could not be validated.
errorobjectrequired
404Returned when the conversation or the item specified by `after` was not found.
errorobjectrequired
429Returned when the request exceeds a rate limit.
errorobjectrequired

Error handling

A 400 is returned when stored encrypted item content cannot be validated. A 404 is returned when the conversation or the item identified by after was not found. A 429 is returned when the request exceeds a rate limit. The conversation_id path parameter must identify a conversation, limit must be between 1 and 100, and order must be asc or desc.