SiteGPT
    SiteGPT
    • 入门
    • 获取所有聊天机器人
      GET
    • 创建聊天机器人
      POST
    • 获取聊天机器人
      GET
    • 删除聊天机器人
      DELETE
    • 更新聊天机器人外观
      PATCH
    • 修改聊天机器人自定义内容
      POST
    • 获取所有后续提示
      GET
    • 添加跟进提示
      POST
    • 获取后续提示
      GET
    • 删除后续提示
      DELETE
    • 更新跟进提示
      PATCH
    • 更新聊天机器人图标
      POST
    • 删除聊天机器人图标
      DELETE
    • 获取链接
      GET
    • 添加聊天机器人链接
      POST
    • 发信息
      POST
    • 更新消息
      PATCH
    • 添加聊天机器人提示
      POST
    • 删除聊天机器人提示
      DELETE
    • 更新聊天机器人提示
      PATCH
    • 获取所有快速提示
      GET
    • 添加快速提示
      POST
    • 获取快速提示
      GET
    • 删除快速提示
      DELETE
    • 更新快速提示
      PATCH
    • 更新聊天机器人设置 - 高级
      PATCH
    • 更新聊天机器人设置 - 聊天模式
      PATCH
    • 更新聊天机器人设置 - 常规
      PATCH
    • 更新聊天机器人设置 - 本地化
      PATCH
    • 更新聊天机器人设置 - 用户数据
      PATCH
    • 获取所有线程
      GET
    • 获取线程
      GET
    • 更新主题
      PATCH
    • 升级对话
      POST
    • 获取白标品牌
      GET
    • 获取白标品牌
      GET
    • 添加白标用户
      POST
    • 更新白标用户
      PATCH

      获取所有线程

      开发环境
      开发环境
      GET
      /api/v0/chatbots/{chatbotId}/threads
      获取聊天机器人的所有线程
      请求示例请求示例
      Shell
      JavaScript
      Java
      Swift
      curl --location --request GET 'http://dev-cn.your-api-server.com/api/v0/chatbots//threads' \
      --header 'Authorization: Bearer <token>'
      响应示例响应示例
      200 - 成功示例
      {
        "success": true,
        "message": "Fetched the chatbot threads successfully",
        "data": {
          "threads": [
            {
              "threadId": "06b3b43c-5651-49a2-b618-d7f24667c1b6",
              "startedAt": "2023-05-18T11:39:57.349750Z",
              "updatedAt": "2023-05-18T11:39:57.349750Z",
              "endedAt": "2023-05-18T11:39:57.349750Z",
              "chatUser": null,
              "escalated": false,
              "important": false,
              "resolved": false,
              "totalMessagesRead": 47,
              "lastMessage": {
                "answer": {
                  "text": "This is agent!!",
                  "timestamp": "2023-07-10T14:41:46.808649Z"
                },
                "sources": [],
                "reaction": "NEUTRAL",
                "threadId": "06b3b43c-5651-49a2-b618-d7f24667c1b6",
                "messageType": "AGENT_MESSAGE",
                "prompts": [
                  {
                    "id": "f3792c3c-5814-4dec-b530-55e1611951a9",
                    "title": "Prompt 1",
                    "description": "This is the prompt1 description"
                  },
                  {
                    "id": "64d7fb10-847a-4dd7-8b5b-821fca199606",
                    "title": "Prompt 2",
                    "description": "This is the prompt2 description"
                  }
                ],
                "messageId": "369876016179446353",
                "question": null,
                "chatbotId": "365062873485935184"
              },
              "totalMessages": 47,
              "totalPositiveMessages": 0,
              "totalNegativeMessages": 0,
              "totalGpt4MessagesCount": 0
            },
            {
              "threadId": "88d6c628-c108-4ca7-9578-0424461c0832",
              "startedAt": "2023-05-19T14:33:08.252701Z",
              "updatedAt": "2023-05-19T14:33:08.252701Z",
              "endedAt": "2023-05-19T14:33:08.252701Z",
              "chatUser": null,
              "escalated": false,
              "important": false,
              "resolved": false,
              "totalMessagesRead": 0,
              "lastMessage": {
                "question": {
                  "text": "This is bot",
                  "timestamp": "2023-05-19T14:33:08.771854Z"
                },
                "sources": [],
                "reaction": "NEUTRAL",
                "threadId": "88d6c628-c108-4ca7-9578-0424461c0832",
                "messageType": "USER_MESSAGE",
                "iconUrl": "https://avatars.githubusercontent.com/u/17903466?s=48&v=4",
                "messageId": "365164430725481040",
                "answer": null,
                "chatbotId": "365062873485935184",
                "prompts": []
              },
              "totalMessages": 1,
              "totalPositiveMessages": 0,
              "totalNegativeMessages": 0,
              "totalGpt4MessagesCount": 0
            },
            {
              "threadId": "1ca901e8-dab9-4e8f-ac24-80b557e89742",
              "startedAt": "2023-05-18T11:47:48.313693Z",
              "updatedAt": "2023-05-18T11:47:48.313693Z",
              "endedAt": "2023-05-18T11:47:48.313693Z",
              "chatUser": null,
              "escalated": false,
              "important": false,
              "resolved": false,
              "totalMessagesRead": 0,
              "lastMessage": {
                "question": {
                  "text": "Hello, what is this?",
                  "timestamp": "2023-05-18T11:47:57.194303Z"
                },
                "answer": {
                  "text": "This is a website where you can find information on various topics. Please browse our pages to learn more.",
                  "timestamp": "2023-05-18T11:47:57.194303Z"
                },
                "gptModel": "gpt-3.5-turbo",
                "sources": [],
                "reaction": "NEUTRAL",
                "threadId": "1ca901e8-dab9-4e8f-ac24-80b557e89742",
                "messageType": "NORMAL_MESSAGE",
                "messageId": "365063440720462416",
                "chatbotId": "365062873485935184",
                "prompts": []
              },
              "totalMessages": 1,
              "totalPositiveMessages": 0,
              "totalNegativeMessages": 0,
              "totalGpt4MessagesCount": 0
            }
          ]
        }
      }

      请求参数

      Path 参数
      chatbotId
      string 
      必需
      聊天机器人的 ID
      Header 参数
      Authorization
      string 
      必需
      示例值:
      Bearer <token>

      返回响应

      🟢200成功
      application/json
      Body
      success
      boolean 
      必需
      message
      string 
      必需
      data
      object 
      必需
      threads
      array [object {14}] 
      必需
      🟠400请求有误
      🟠401没有权限
      🟠403禁止访问
      🔴500服务器错误
      修改于 2024-03-28 08:28:42
      上一页
      更新聊天机器人设置 - 用户数据
      下一页
      获取线程
      Built with