# 更新聊天机器人

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /api/v1/update-chatbot-data:
    post:
      summary: 更新聊天机器人
      deprecated: false
      description: >-
        聊天机器人数据更新 API 允许您通过提供聊天机器人 ID、新名称和文本内容的源文本来更新聊天机器人的数据。此 API
        可用于用新信息替换聊天机器人的现有数据。


        ## 错误处理


        如果 API 请求期间出现任何错误，相应的 HTTP 状态代码将与响应正文中的错误消息一起返回。确保在您的应用程序中妥善处理这些错误。


        就是这样！您现在应该能够使用聊天机器人更新 API 更新聊天机器人。
      tags: []
      parameters:
        - name: Content-Type
          in: header
          description: ''
          required: true
          example: application/json
          schema:
            type: string
        - name: Authorization
          in: header
          description: ''
          required: true
          example: Bearer <Your-API-Key>
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                chatbotId:
                  type: string
                  description: 聊天机器人的唯一标识符。它有助于识别需要更新数据的特定聊天机器人。
                chatbotName:
                  type: string
                  description: 聊天机器人的新名称。此参数允许您更新聊天机器人的名称。
                urlsToScrape:
                  type: array
                  items:
                    type: string
                sourceText:
                  type: string
                  description: 用于更新聊天机器人的新源文本。该参数应包含替换现有数据的新文本内容。源文本应小于您的计划允许的字符限制。
              required:
                - chatbotId
                - chatbotName
                - sourceText
              x-apifox-orders:
                - chatbotId
                - chatbotName
                - sourceText
                - urlsToScrape
            example:
              chatbotId: example-123
              chatbotName: new name
              urlsToScrape:
                - https://www.example.com
                - https://www.example.com/blog
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  chatbotId:
                    type: string
                required:
                  - chatbotId
                x-apifox-orders:
                  - chatbotId
              example:
                chatbotId: exampleId-123
          headers: {}
          x-apifox-name: 成功
      security: []
      x-apifox-folder: ''
      x-apifox-status: released
      x-run-in-apifox: https://app.apifox.com/web/project/4195807/apis/api-157469564-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: http://dev-cn.your-api-server.com
    description: 开发环境
  - url: http://test-cn.your-api-server.com
    description: 测试环境
  - url: https://www.chatbase.co
    description: 正式环境
security: []

```
