Skip to content
AiventicDeveloper Docs
Esc
↑↓navigate↵open⌘Jpreview

Get a chat

Read back a chat this key created, a page of messages at a time.

Messages oldest first, at most limit of them. While nextCursor is not null, pass it as cursor for the next page; a page can hold fewer than limit messages before the last.

Scope: chat

GET/v1/chat/{chatId}
Authorization
AuthorizationBearer token (aiv_sk_) · headerrequired

An Aiventic API key, sent as Authorization: Bearer aiv_sk_....

Path parameters
chatIdstring<uuid>required
Query parameters
limitinteger | string

Messages per page, 1 to 100. Default 50.

matches ^-?(?:0|[1-9]\d*)$
cursorstring

The previous page's nextCursor. Omit for the first page.

Responses
200

OK

chatIdstringrequired
createdAtstring<date-time>required
brandstring | nullrequired
modelstring | nullrequired
messagesPublicChatMessage[]required
Show properties
Array of PublicChatMessage
idstringrequired
rolePublicMessageRolerequired
Allowed:userassistant
textstringrequired
createdAtstring<date-time>required
citationsPublicCitation[]required
Show properties
Array of PublicCitation
typePublicCitationTyperequired
Allowed:manualpartsjobhandbook
titlestringrequired
urlstring | nullrequired
pageinteger | string | nullrequired
matches ^-?(?:0|[1-9]\d*)$
itemsPublicItem[]required
Show properties
Array of PublicItem
idstring<uuid>required
kindPublicItemKindrequired
Allowed:choicequickReplypartCard
statusPublicItemStatusrequired
Allowed:pendingresolvedexpired
choicePublicChoice | nullrequired
Show properties
One of:
null
null
PublicChoice
promptstringrequired
axesPublicChoiceAxis[]required
Show properties
Array of PublicChoiceAxis
axisstringrequired
labelstring | nullrequired
optionsPublicChoiceOption[]required
Show properties
Array of PublicChoiceOption
idstringrequired
textstringrequired
descriptionstring | nullrequired
quickReplyPublicQuickReply | nullrequired
Show properties
One of:
null
null
PublicQuickReply
promptstringrequired
suggestionsPublicQuickReplySuggestion[]required
Show properties
Array of PublicQuickReplySuggestion
textstringrequired
descriptionstring | nullrequired
partCardPublicPartCard | nullrequired
Show properties
One of:
null
null
PublicPartCard
partNumberstringrequired
namestringrequired
descriptionstring | nullrequired
imageUrlstring | nullrequired
pricenumber | string | nullrequired
matches ^-?(?:0|[1-9]\d*)(?:\.\d+)?$
currencystring | nullrequired
stockStatusPublicStockStatus | nullrequired
Show properties
One of:
null
null
PublicStockStatus
any
viewUrlstring | nullrequired
specsPublicPartSpec[]required
Show properties
Array of PublicPartSpec
namestringrequired
valuestringrequired
isPlaceholderbooleanrequired
supplierPartNumberstring | nullrequired
supplierstring | nullrequired
resolutionPublicItemResolution | nullrequired
Show properties
One of:
null
null
PublicItemResolution
choicePublicChoiceResolution | nullrequired
Show properties
One of:
null
null
PublicChoiceResolution
picksobjectrequired
escapedAxesstring[]required
quickReplyPublicQuickReplyResolution | nullrequired
Show properties
One of:
null
null
PublicQuickReplyResolution
indexinteger | stringrequired
matches ^-?(?:0|[1-9]\d*)$
nextCursorstring | nullrequired

Pass it as cursor for the next page of messages. Null on the last page.

400

Bad Request

typestring | null
titlestring | null
statusinteger | string | null
matches ^-?(?:0|[1-9]\d*)$
detailstring | null
instancestring | null
401

Unauthorized

typestring | null
titlestring | null
statusinteger | string | null
matches ^-?(?:0|[1-9]\d*)$
detailstring | null
instancestring | null
403

Forbidden

typestring | null
titlestring | null
statusinteger | string | null
matches ^-?(?:0|[1-9]\d*)$
detailstring | null
instancestring | null
404

Not Found

typestring | null
titlestring | null
statusinteger | string | null
matches ^-?(?:0|[1-9]\d*)$
detailstring | null
instancestring | null
429

Too Many Requests

typestring | null
titlestring | null
statusinteger | string | null
matches ^-?(?:0|[1-9]\d*)$
detailstring | null
instancestring | null
500

Internal Server Error

typestring | null
titlestring | null
statusinteger | string | null
matches ^-?(?:0|[1-9]\d*)$
detailstring | null
instancestring | null
Try it
Server
Authorization
Parameters
Request
curl -X GET 'https://api.aiventic.ai/v1/chat/497f6eca-6276-4993-bfeb-53cbbbba6f08' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json'
Response
{
  "chatId": "string",
  "createdAt": "2019-08-24T14:15:22Z",
  "brand": null,
  "model": null,
  "messages": [
    {
      "id": "string",
      "role": "user",
      "text": "string",
      "createdAt": "2019-08-24T14:15:22Z",
      "citations": [
        {
          "type": "manual",
          "title": "string",
          "url": null,
          "page": null
        }
      ],
      "items": [
        {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "kind": "choice",
          "status": "pending",
          "choice": {},
          "quickReply": {},
          "partCard": {},
          "resolution": {}
        }
      ]
    }
  ],
  "nextCursor": null
}