List messages
Returns a list of messages for a given thread.
Path parameters
The ID of the thread the messages belong to.
Query parameters
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.
Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.
A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.
A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.
Filter messages by the run ID that generated them.
Response
OK
Example response
{
"object": "list",
"first_id": "msg_abc123",
"last_id": "msg_abc123"
}Changes
Changed in 4 of the 163 revisions of this API.93
- ○
added the optional property
/to the response with the statusresponse-optional-property-added
- ○
- ○
added the non-success response with the status
response-non-success-status-added
- ○
- ▲
response property
data/items/assistant_idlist-of-types was widened by adding typesnullto media typeapplication/jsonof response200response-property-list-of-types-widened
- ▲
response property
data/items/attachmentslist-of-types was widened by adding typesnullto media typeapplication/jsonof response200response-property-list-of-types-widened
- ▲
response property
data/items/completed_atlist-of-types was widened by adding typesnullto media typeapplication/jsonof response200response-property-list-of-types-widened
- ▲
response property
data/items/incomplete_atlist-of-types was widened by adding typesnullto media typeapplication/jsonof response200response-property-list-of-types-widened
- ▲
response property
data/items/metadatalist-of-types was widened by adding typesnullto media typeapplication/jsonof response200response-property-list-of-types-widened
- ▲
response property
data/items/run_idlist-of-types was widened by adding typesnullto media typeapplication/jsonof response200response-property-list-of-types-widened
- ▲
the
//response's property type changed fromobjectto no type for statusresponse-property-type-changed
- ▲
removed the required property
///from the response with the statusresponse-required-property-removed
- ○
added
subschema #1subschema #2to the//response propertyanyOflist for the response statusresponse-property-any-of-added
This revision also has 40 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ▲
- ▲
added to the
///response propertyoneOflist for the response statusresponse-property-one-of-added
This revision also has 2 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ▲