chats.chatItems
GET
/v1/chats/{chatId}/items
const url = 'https://example.com/v1/chats/example/items';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/v1/chats/example/items \ --header 'Authorization: Bearer <token>'Lists the Items of the Chat, newest first. Send next as before to read older Items.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”chatId
required
string
Query Parameters
Section titled “Query Parameters”before
string
limit
string
Responses
Section titled “Responses”Success
Media typeapplication/json
object
Example generated
{ "items": [ { "id": "example", "content": "example", "origin": { "chat": "example", "turn": "example", "step": 1, "notice": { "kind": "example", "ref": "example" } }, "seq": 1 } ], "next": 1}ChatModelInvalid | OrganizationRequired
AuthenticationRequired
Media typeapplication/json
object
_tag
required
string
Example
{ "_tag": "AuthenticationRequired"}@nmnmcc/ability/Authorizer/Forbidden | MembershipRequired | ForbiddenOrigin
ChatNotFound
Media typeapplication/json
object
_tag
required
string
chat
required
string
Example
{ "_tag": "ChatNotFound"}ChatConflict | @nmnmcc/ability/Authorizer/Pending
RateLimited
Media typeapplication/json
object
_tag
required
string
retryAfterSeconds
required
integer
Example
{ "_tag": "RateLimited"}ChatStorageUnavailable | AuthenticationUnavailable | RequestFailed