Skip to main content
GET
/
v1
/
aibot
/
bots
/
{AgentId}
/
records
Get Agent Chat History
curl --request GET \
  --url http://{your-domain}/v1/aibot/bots/{AgentId}/records \
  --header 'Authorization: Bearer <token>'
{
  "recordList": [
    {
      "AgentId": "Agent-xxx",
      "recordId": "record-xxx",
      "role": "user",
      "content": "This is a conversation message",
      "conversation": "user",
      "type": "text",
      "image": "http://xxx.image",
      "triggerSrc": "TCB",
      "replyTo": "record-xxx",
      "createTime": "2024-07-25T12:03:59.000Z"
    }
  ],
  "total": 10
}

Authorizations

Authorization
string
header
required

Token corresponding to the environment ID, obtained through login authentication

Path Parameters

AgentId
string
required

Agent ID

Query Parameters

sort
string
required

Sort by creation time, asc: ascending, desc: descending

pageSize
number

Pagination parameter, default is 10

pageNumber
number

Pagination parameter, default is 1

Response

Successfully retrieved chat history

recordList
object[]
required

Historical conversation list

total
number
required

Total number of conversations

Example:

10