List chat messages
List the user and assistant messages in a chat.
GET
/chats/{chatId}/messages/List the user and assistant messages in a chat.
Messages are returned oldest first unless orderBy=-createdAt is provided. Consultation artifacts are retrieved separately from GET /artifacts/{artifactId}/. The chat must belong to the authenticated organization and user scope.
Authorization
HTTPBearer XDoctronicUserID AuthorizationBearer <token>
In: header
X-Doctronic-User-ID<token>
Doctronic user ID returned as data.id by POST /users/. This value identifies the user in your organization scope; it is not an API token.
In: header
Path Parameters
chatId*string
Query Parameters
page?integer
Page number
Range
1 <= valueDefault
1size?integer
Items per page
Range
1 <= value <= 100Default
20orderBy?|
Order by field with - prefix. Allowed: createdAt
Default
"createdAt"Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/chats/string/messages/"{ "code": "success", "message": "Request successful", "data": { "items": [ { "role": "user", "content": "string", "messageId": "string", "createdAt": "2019-08-24T14:15:22Z" } ], "total": 0, "page": 0, "size": 0, "pages": 0, "hasNext": true, "hasPrev": true }}