{
  "openapi": "3.1.0",
  "info": {
    "title": "3Chat Open Platform API",
    "description": "Server-side APIs for integrating external systems with 3Chat.",
    "version": "1.0.0"
  },
  "tags": [
    {
      "name": "Authentication API",
      "x-displayName": "Authentication"
    },
    {
      "name": "Agent/API",
      "x-displayName": "Agent"
    },
    {
      "name": "Channel/API",
      "x-displayName": "Channel"
    },
    {
      "name": "Dialog/API",
      "x-displayName": "Dialog"
    },
    {
      "name": "Visitor/API",
      "x-displayName": "Visitor"
    },
    {
      "name": "Conversation/API",
      "x-displayName": "Conversation"
    },
    {
      "name": "Message/API",
      "x-displayName": "Message"
    },
    {
      "name": "Knowledge Base/API",
      "x-displayName": "Knowledge Base"
    },
    {
      "name": "Chat Group/API",
      "x-displayName": "Chat Group"
    },
    {
      "name": "Skill/API",
      "x-displayName": "Skill"
    },
    {
      "name": "User & Tenant Domain/Staff/API",
      "x-displayName": "User & Tenant Domain"
    }
  ],
  "paths": {
    "/api/open/v3/token": {
      "post": {
        "summary": "Create Token",
        "deprecated": false,
        "description": "Create an access token.",
        "tags": [
          "Authentication API"
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntityResponseOpenApiTokenDTO"
                },
                "example": {
                  "code": 0,
                  "message": "",
                  "data": {
                    "entity": {
                      "accessToken": "",
                      "accessTokenExpireIn": 0,
                      "refreshToken": "",
                      "refreshTokenExpireIn": 0
                    }
                  }
                }
              }
            }
          }
        },
        "security": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestParameterTokenRequest",
                "description": ""
              }
            }
          }
        }
      },
      "put": {
        "summary": "Refresh Token",
        "deprecated": false,
        "description": "Obtain a new access token after the current access_token expires.",
        "tags": [
          "Authentication API"
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntityResponseOpenApiTokenDTO"
                },
                "example": {
                  "code": 0,
                  "message": "",
                  "data": {
                    "entity": {
                      "accessToken": "",
                      "accessTokenExpireIn": 0,
                      "refreshToken": "",
                      "refreshTokenExpireIn": 0
                    }
                  }
                }
              }
            }
          }
        },
        "security": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestParameterTokenRefresh",
                "description": ""
              }
            }
          }
        }
      }
    },
    "/api/open/authority/certify": {
      "post": {
        "summary": "Check Access Permission",
        "deprecated": false,
        "description": "Validate whether a specified user's `session` or `token` is authorized to access a target API.\n\n---\n\n### Request example\n\n```bash\ncurl 'https://app.3chat.ai/api/open/authority/certify' \\\n  -X PUT \\\n  -H 'content-type: application/json' \\\n  --data-raw '{\n    \"body\": {\n      \"method\": \"POST\",\n      \"uri\": \"/api/manufacture/workOrder/list\",\n      \"session\": \"NWM0YWQxODgtNmM5Yy00MDg3LWIyOTktNTNmMmFlZDQ0ZTZj\",\n      \"token\": \"7383A52EDC64E8FDFC35A444086924D6\"\n    }\n  }'\n```\n\n---\n\n### Request body\n\n| Field | Type | Required | Description |\n| --- | --- | --- | --- |\n| `method` | string | Yes | HTTP method of the target API. Allowed values: `GET`, `POST`, `PUT`, `DELETE`. |\n| `uri` | string | Yes | Path of the target API without the domain, for example `/manufacture/workOrder/list`. |\n| `session` | string | No | User Session ID. Provide either `session` or `token`, or both. |\n| `token` | string | No | User Token. Provide either `token` or `session`, or both. |\n\n---\n\n### Where to obtain the values\n\nFor browser requests, these values are stored in cookies. Open Developer Tools → Network → any request → Request Headers → Cookie, and locate:\n\n- `SESSION=...` → use as `session`\n- `TOKEN=...` → use as `token`\n- `method` → use the HTTP method of the API you want to authorize\n- `uri` → use the target API path without the domain\n\n> **Note:** This endpoint itself still uses the standard OpenAPI authentication mechanism.\n",
        "tags": [
          "Authentication API"
        ],
        "responses": {
          "200": {
            "description": "",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntityResponseCertifyResponseDTO"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CertifyParams",
                "description": ""
              }
            }
          }
        }
      }
    },
    "/api/open/v4/butler/chat/completions": {
      "post": {
        "summary": "Send Message to Agent",
        "deprecated": false,
        "description": "## Overview\nSend a user message (`query`) to a 3Chat Agent and receive the Agent's response. The API supports both synchronous responses and asynchronous callbacks, and can include attachments and an explicit channel type. It is intended for integrations that use messaging channels not natively supported by 3Chat.\n\n## Key parameters\n\n### `dialogId` — Dialog ID\nOptional.\n1. When provided, the system looks up the specified dialog.\n   - If the dialog exists and `userId` is also provided, the system verifies that the dialog belongs to the same contact identified by `userId`. A mismatch returns an error.\n   - If the dialog does not exist, the request returns an error.\n\n### `userId` — Contact ID\nOptional.\n1. When provided, the system looks up the corresponding contact.\n   - If `dialogId` is also provided, the system verifies that the dialog belongs to the same contact identified by `userId`. A mismatch returns an error.\n   - If the contact exists and `dialogId` is omitted, the system reuses the dialog associated with that contact.\n   - If the contact does not exist and `dialogId` is omitted, the system creates a new contact and a new dialog.\n2. When omitted:\n   - If `dialogId` is provided, the system uses the contact associated with that dialog.\n   - If `dialogId` is also omitted, the system creates a new **anonymous** contact and a new dialog.\n\n### `async` — Processing mode\n1. **Synchronous mode (default):** Set `async=false` or omit `async`. The request remains open until Agent processing is complete and then returns the result. This mode is suitable for direct client rendering and lower-concurrency integrations.\n2. **Asynchronous mode:** Set `async=true`. The API returns immediately, and after Agent processing completes:\n   - If `sendWebhook` was provided, 3Chat sends the Agent response to that webhook.\n   - If `sendWebhook` was omitted, 3Chat sends the response back through the default mechanism for the current dialog's `channelType`.\n\n### `sendWebhook` — Asynchronous callback URL\n1. Applies **only when `async=true`**.\n2. Callback format:\n```json\n{\n  \"id\": \"message ID\",\n  \"content\": \"Agent response content\",\n  \"createdAt\": \"message timestamp\",\n  \"agentLogs\": \"Agent activity logs\",\n  \"attachments\": {\n    \"key\": \"\",\n    \"name\": \"attachment name\",\n    \"url\": \"attachment URL\",\n    \"contentType\": \"attachment content type\"\n  }\n}\n```\nThe callback is sent with `POST`. See the API response schema for details about `agentLogs`.\n\n3. Recommended webhook practices:\n   - Return HTTP 200 after successful receipt to prevent retries.\n   - Make processing idempotent, for example by deduplicating on `id`.\n   - Respond within a short timeout window, such as 3–5 seconds.\n   - Log the original request payload for troubleshooting, especially `agentLogs`.\n\n### `channelType` — Channel attribution\nUse this object when you need to explicitly identify the channel and proxy source for the dialog. If omitted, the default value is `OPENAPI`. The selected channel information is shown anywhere 3Chat displays the message channel.\n\n#### `proxy` — Channel proxy\nDetermines the allowed values of `type`:\n- `CHATLY`\n- `MANYCHAT`\n\n#### `type` — Channel type\nWhen `proxy=CHATLY`, supported values are:\n- `WECHAT`: WeChat\n- `QYWECHAT`: WeCom\n- `WECHAT_PUBLIC`: WeChat Official Account / Service Account\n- `WECHAT_CUSTOMER_SERVICE`: WeChat Customer Service\n- `FEISHU`: Feishu\n- `MICRO_APP`: Mini Program\n- `DINGDING`: DingTalk\n- `RED_BOOK`: Xiaohongshu (RED)\n\nWhen `proxy=MANYCHAT`, supported values are:\n- `TIKTOK`\n- `WHATSAPP`\n- `MESSENGER`\n- `INSTAGRAM`\n- `SMS`\n- `TELEGRAM`\n\n### `files` — Attachments\n1. `files` is an array of attachment objects.\n2. Use a standard MIME type for `type`, such as `image/png` or `application/pdf`.\n3. `url` must point to a file that the 3Chat server can access under the applicable authentication policy.\n4. `size` is the file size; use the unit expected by the implementation, typically bytes.\n\n### `options` — Optional settings\n\n#### `options.user`\nContact profile data in this object is applied **only when a new contact is created**. It does not update an existing contact.\n",
        "tags": [
          "Agent/API"
        ],
        "responses": {
          "200": {
            "description": "",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntityResponseChatDTO"
                },
                "example": {
                  "code": 200,
                  "message": "success",
                  "data": {
                    "dialogId": "dlg_20260205103045_abc123",
                    "agentLogs": [
                      {
                        "type": "knowledge_hit",
                        "name": "RefundPolicyAgent",
                        "message": "Matched knowledge-base content related to the refund process.",
                        "status": "success",
                        "kb": [
                          {
                            "content": "Customers may request a refund within 7 days after payment. Refunds are returned to the original payment method and typically take 3–5 business days to process.",
                            "chunk_id": "chunk_refund_001",
                            "document_id": "doc_refund_policy_v1",
                            "document_name": "Refund Policy",
                            "enabled": true,
                            "lang": "zh-CN",
                            "score": 0.87,
                            "source": "knowledge_base",
                            "created_at": 1707100800
                          }
                        ],
                        "entity": {
                          "name": "refund_type",
                          "values": [
                            "Order Refund"
                          ]
                        },
                        "timestamp": 1707100845123
                      }
                    ],
                    "messages": [
                      {
                        "type": "assistant",
                        "contentType": "text",
                        "text": "You can request a refund within 7 days after payment. The refund will be returned to the original payment method and is typically processed within 3–5 business days. If you would like help initiating the refund, provide your order number.",
                        "url": "",
                        "meta": {
                          "width": 0,
                          "height": 0,
                          "size_kb": 0,
                          "duration": 0,
                          "format": "",
                          "coverUrl": ""
                        }
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "",
                "title": "RequestParameterChatParams",
                "type": "object",
                "properties": {
                  "query": {
                    "type": "string",
                    "description": "Input content"
                  },
                  "dialogId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "ID of an existing dialog in 3Chat."
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "userId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "Contact/visitor accountId"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "channelType": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "description": "Channel type"
                          },
                          "proxy": {
                            "type": "string",
                            "description": "Channel proxy type: `CHATLY` = Chatly; `MANYCHAT` = Manychat."
                          }
                        },
                        "description": "Channel type. See the documentation above. Defaults to `OPENAPI`.",
                        "required": [
                          "type",
                          "proxy"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "async": {
                    "anyOf": [
                      {
                        "type": "boolean",
                        "description": "Whether to process the request asynchronously. Defaults to `false`."
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "sendWebhook": {
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "Webhook URL used to deliver the message for asynchronous requests."
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "files": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/AttachmentData",
                      "description": "Attachment metadata."
                    },
                    "description": "Attachments"
                  },
                  "options": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "user": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "avatarUrl": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "description": "Contact avatar"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "name": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "description": "Contact name"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "email": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "description": "Contact email address"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "phoneNumber": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "description": "Contact phone number"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "description": "Basic contact profile information. Applied only when a new contact is created."
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "description": "Optional settings"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "query"
                ]
              }
            }
          }
        }
      }
    },
    "/api/open/v4/butler/agent/enable": {
      "post": {
        "summary": "Deploy Agent",
        "deprecated": false,
        "description": "Enable or disable an Agent.",
        "tags": [
          "Agent/API"
        ],
        "responses": {
          "200": {
            "description": "",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentEnableParams",
                "description": ""
              }
            }
          }
        }
      }
    },
    "/api/open/v3/butler/meta/post/detail": {
      "post": {
        "summary": "[Facebook] Get Post Details",
        "deprecated": false,
        "description": "Get details for the specified post.",
        "tags": [
          "Channel/API"
        ],
        "responses": {
          "200": {
            "description": "",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntityResponse_Object_"
                },
                "example": {
                  "code": 0,
                  "message": "",
                  "data": {
                    "entity": {}
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestParameter_PostDetailParams_",
                "description": ""
              }
            }
          }
        }
      }
    },
    "/api/open/v3/butler/meta/private-message/send": {
      "post": {
        "summary": "[Facebook] Send Direct Message",
        "deprecated": false,
        "description": "Send a direct message to the specified user.",
        "tags": [
          "Channel/API"
        ],
        "responses": {
          "200": {
            "description": "",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntityResponse_Object_"
                },
                "example": {
                  "code": 0,
                  "message": "",
                  "data": {
                    "entity": {}
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestParameter_PrivateMessageSendParams_",
                "description": ""
              }
            }
          }
        }
      }
    },
    "/api/open/v3/butler/meta/comment/reply": {
      "post": {
        "summary": "[Facebook] Reply to Comment",
        "deprecated": false,
        "description": "Reply to a comment on a post.",
        "tags": [
          "Channel/API"
        ],
        "responses": {
          "200": {
            "description": "",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntityResponse_Object_"
                },
                "example": {
                  "code": 0,
                  "message": "",
                  "data": {
                    "entity": {}
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestParameter_CommentReplyParams_",
                "description": ""
              }
            }
          }
        }
      }
    },
    "/api/open/v3/butler/channel/message/send": {
      "post": {
        "summary": "Send Message",
        "deprecated": false,
        "description": "Send a message to a channel dialog.\n\nParameter notes:\n`attachment.type` must use a standard MIME type: https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/MIME_types",
        "tags": [
          "Channel/API"
        ],
        "responses": {
          "200": {
            "description": "",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntityResponseChannelMessageSendDTO"
                },
                "example": {
                  "code": 200,
                  "message": "",
                  "data": {
                    "entity": {
                      "messageId": ""
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestParameterChannelMessageSendParams",
                "description": ""
              }
            }
          }
        }
      }
    },
    "/api/open/v3/butlerchannel/query": {
      "post": {
        "summary": "List Channels",
        "deprecated": false,
        "description": "",
        "operationId": "QUERYbutlerchannelList",
        "tags": [
          "Channel/API"
        ],
        "responses": {
          "200": {
            "description": "",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": ""
                    },
                    "message": {
                      "type": "string",
                      "description": ""
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "list": {
                          "type": "array",
                          "description": "",
                          "items": {
                            "$ref": "#/components/schemas/butlerchannel"
                          }
                        },
                        "start": {
                          "type": "integer",
                          "description": ""
                        },
                        "length": {
                          "type": "integer",
                          "description": ""
                        },
                        "recordsTotal": {
                          "type": "integer",
                          "description": ""
                        }
                      },
                      "description": ""
                    }
                  }
                },
                "example": {
                  "code": 200,
                  "data": {
                    "list": [
                      {
                        "updatedTime": 1765547341035,
                        "dataId": "r6yivyww6fi4dv2qwvs1vyrk",
                        "accountType": 101,
                        "workSpaceId": "24268a6c-b0a4-414d-b03b-74ed200d31b6",
                        "createdTime": 1765545643537,
                        "id": "r6yivyww6fi4dv2qwvs1vyrk",
                        "type": "email"
                      },
                      {
                        "updatedTime": 1765546003468,
                        "dataId": "qpoubq5qew2eyexxr7l68e9b",
                        "accountType": 2,
                        "workSpaceId": "24268a6c-b0a4-414d-b03b-74ed200d31b6",
                        "createdTime": 1764137194146,
                        "id": "qpoubq5qew2eyexxr7l68e9b",
                        "type": "chatly"
                      }
                    ],
                    "start": 0,
                    "length": 100,
                    "recordsTotal": 2
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "body"
                ],
                "type": "object",
                "properties": {
                  "body": {
                    "required": [
                      "paging"
                    ],
                    "type": "object",
                    "properties": {
                      "conditions": {
                        "$ref": "#/components/schemas/butlerchannel_filter"
                      },
                      "sorts": {
                        "type": "array",
                        "description": "",
                        "items": {
                          "$ref": "#/components/schemas/butlerchannel_sort"
                        }
                      },
                      "extendFieldParams": {
                        "type": "array",
                        "description": "Custom-field query parameters",
                        "items": {
                          "required": [
                            "conditionType",
                            "key"
                          ],
                          "type": "object",
                          "properties": {
                            "conditionType": {
                              "type": "string",
                              "description": "{NONE=NONE, FUZZY=FUZZY, KEYWORD=KEYWORD, FILTER=FILTER, TIME_RANGE=TIME_RANGE, OBJECT_FILTER=OBJECT_FILTER}",
                              "enum": [
                                "NONE",
                                "FUZZY",
                                "KEYWORD",
                                "FILTER",
                                "TIME_RANGE",
                                "OBJECT_FILTER"
                              ]
                            },
                            "filter": {
                              "type": "array",
                              "description": "conditionType=FILTER",
                              "items": {
                                "type": "string"
                              }
                            },
                            "value": {
                              "type": "string",
                              "description": "conditionType=FUZZY/KEYWORD"
                            },
                            "timeRange": {
                              "type": "object",
                              "properties": {
                                "start": {
                                  "minimum": 0.01,
                                  "type": "string",
                                  "description": "Start time, 13-digit Unix timestamp in milliseconds."
                                },
                                "end": {
                                  "minimum": 0.01,
                                  "type": "string",
                                  "description": "End time, 13-digit Unix timestamp in milliseconds."
                                }
                              },
                              "description": "conditionType=TIME_RANGE"
                            },
                            "key": {
                              "type": "string",
                              "description": "Custom-field key"
                            }
                          },
                          "description": "Custom query condition."
                        }
                      },
                      "paging": {
                        "required": [
                          "length",
                          "start"
                        ],
                        "type": "object",
                        "properties": {
                          "start": {
                            "minimum": 0,
                            "type": "integer",
                            "description": "Pagination offset"
                          },
                          "length": {
                            "maximum": 500,
                            "minimum": 1,
                            "type": "integer",
                            "description": "Page size"
                          }
                        },
                        "description": ""
                      }
                    },
                    "description": "Request body"
                  }
                },
                "description": ""
              }
            }
          }
        }
      }
    },
    "/api/open/v3/butlersession/query": {
      "post": {
        "summary": "List Dialogs",
        "deprecated": false,
        "description": "",
        "operationId": "QUERYbutlersessionList",
        "tags": [
          "Dialog/API"
        ],
        "responses": {
          "200": {
            "description": "",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": ""
                    },
                    "message": {
                      "type": "string",
                      "description": ""
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "list": {
                          "type": "array",
                          "description": "",
                          "items": {
                            "$ref": "#/components/schemas/butlersession"
                          }
                        },
                        "start": {
                          "type": "integer",
                          "description": ""
                        },
                        "length": {
                          "type": "integer",
                          "description": ""
                        },
                        "recordsTotal": {
                          "type": "integer",
                          "description": ""
                        }
                      },
                      "description": ""
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "body"
                ],
                "type": "object",
                "properties": {
                  "body": {
                    "required": [
                      "paging"
                    ],
                    "type": "object",
                    "properties": {
                      "conditions": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "object",
                            "properties": {
                              "conditionType": {
                                "type": "string",
                                "description": "KEYWORD: exact match"
                              },
                              "value": {
                                "type": "string",
                                "description": "Dialog ID"
                              }
                            },
                            "description": "Dialog ID",
                            "required": [
                              "conditionType",
                              "value"
                            ]
                          },
                          "updatedTime": {
                            "description": "Last-updated timestamp in milliseconds (time-range filter).",
                            "type": "object",
                            "required": [
                              "conditionType"
                            ],
                            "properties": {
                              "conditionType": {
                                "type": "string",
                                "description": "TIME_RANGE: time-range filtering",
                                "enum": [
                                  "TIME_RANGE"
                                ]
                              },
                              "timeRange": {
                                "type": "object",
                                "properties": {
                                  "start": {
                                    "type": "integer",
                                    "format": "int64",
                                    "description": "Start time, Unix timestamp in milliseconds."
                                  },
                                  "end": {
                                    "type": "integer",
                                    "format": "int64",
                                    "description": "End time, Unix timestamp in milliseconds."
                                  }
                                },
                                "description": ""
                              }
                            }
                          },
                          "createdTime": {
                            "description": "Creation timestamp in milliseconds (time-range filter).",
                            "type": "object",
                            "required": [
                              "conditionType"
                            ],
                            "properties": {
                              "conditionType": {
                                "type": "string",
                                "description": "TIME_RANGE: time-range filtering",
                                "enum": [
                                  "TIME_RANGE"
                                ]
                              },
                              "timeRange": {
                                "type": "object",
                                "properties": {
                                  "start": {
                                    "type": "integer",
                                    "format": "int64",
                                    "description": "Start time, Unix timestamp in milliseconds."
                                  },
                                  "end": {
                                    "type": "integer",
                                    "format": "int64",
                                    "description": "End time, Unix timestamp in milliseconds."
                                  }
                                },
                                "description": ""
                              }
                            }
                          },
                          "visitorId": {
                            "description": "Filter by contact ID",
                            "type": "object",
                            "required": [
                              "conditionType"
                            ],
                            "properties": {
                              "conditionType": {
                                "type": "string",
                                "description": "FILTER: multi-value filtering",
                                "enum": [
                                  "FUZZY",
                                  "KEYWORD",
                                  "FILTER"
                                ]
                              },
                              "filter": {
                                "type": "array",
                                "description": "Array of contact IDs",
                                "items": {
                                  "type": "string",
                                  "description": "Contact ID"
                                }
                              }
                            }
                          },
                          "channelId": {
                            "type": "object",
                            "properties": {
                              "conditionType": {
                                "type": "string",
                                "description": "FILTER"
                              },
                              "filter": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "description": "Channel ID"
                                },
                                "description": "Array of channel IDs"
                              }
                            },
                            "required": [
                              "conditionType",
                              "filter"
                            ],
                            "description": "Filter by channel ID"
                          },
                          "type": {
                            "type": "object",
                            "properties": {
                              "conditionType": {
                                "type": "string",
                                "description": "FILTER: multi-value filtering"
                              },
                              "filter": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "description": "Dialog type: `p2p` = one-to-one chat; `group` = group chat."
                                }
                              }
                            },
                            "description": "Filter by dialog type: `p2p` = one-to-one chat; `group` = group chat.",
                            "required": [
                              "conditionType",
                              "filter"
                            ]
                          },
                          "subjectId": {
                            "type": "object",
                            "properties": {
                              "conditionType": {
                                "type": "string",
                                "description": "KEYWORD: exact match"
                              },
                              "value": {
                                "type": "string",
                                "description": "Query value"
                              }
                            },
                            "description": "Filter by the ID of the object associated with the dialog. If `type=p2p`, `subjectId == visitorId`; if `type=group`, `subjectId == groupId`.",
                            "required": [
                              "conditionType",
                              "value"
                            ]
                          },
                          "subjectName": {
                            "type": "object",
                            "properties": {
                              "conditionType": {
                                "type": "string",
                                "description": "FUZZY: fuzzy search; KEYWORD: exact search"
                              },
                              "value": {
                                "type": "string",
                                "description": "Query value"
                              }
                            },
                            "description": "Filter by the name of the object associated with the dialog. If `type=p2p`, `subjectName == visitorName`; if `type=group`, `subjectName == groupName`.",
                            "required": [
                              "conditionType",
                              "value"
                            ]
                          }
                        },
                        "required": [
                          "channelId",
                          "type",
                          "subjectId",
                          "subjectName",
                          "id"
                        ]
                      },
                      "sorts": {
                        "type": "array",
                        "description": "",
                        "items": {
                          "$ref": "#/components/schemas/butlersession_sort"
                        }
                      },
                      "paging": {
                        "required": [
                          "length",
                          "start"
                        ],
                        "type": "object",
                        "properties": {
                          "start": {
                            "minimum": 0,
                            "type": "integer",
                            "description": "Pagination offset"
                          },
                          "length": {
                            "maximum": 500,
                            "minimum": 1,
                            "type": "integer",
                            "description": "Page size"
                          }
                        },
                        "description": ""
                      }
                    },
                    "description": "Request body"
                  }
                },
                "description": ""
              }
            }
          }
        }
      }
    },
    "/api/open/v3/butlervisitor/query": {
      "post": {
        "summary": "List Visitors",
        "deprecated": false,
        "description": "",
        "operationId": "QUERYbutlervisitorList",
        "tags": [
          "Visitor/API"
        ],
        "responses": {
          "200": {
            "description": "",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": ""
                    },
                    "message": {
                      "type": "string",
                      "description": ""
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "list": {
                          "type": "array",
                          "description": "",
                          "items": {
                            "$ref": "#/components/schemas/butlervisitor"
                          }
                        },
                        "start": {
                          "type": "integer",
                          "description": ""
                        },
                        "length": {
                          "type": "integer",
                          "description": ""
                        },
                        "recordsTotal": {
                          "type": "integer",
                          "description": ""
                        }
                      },
                      "description": ""
                    }
                  }
                },
                "example": {
                  "code": 200,
                  "message": "",
                  "data": {
                    "list": [
                      {
                        "totalVisits": 33,
                        "updatedTime": 1761104930599,
                        "firstTouch": "{\"landingPage\":\"https://3chatte.myshopify.com/\",\"hasMarketing\":true,\"capturedAt\":\"2025-10-31T13:34:39.066Z\"}",
                        "language": "zh-CN",
                        "lastTouch": "{\"landingPage\":\"https://3chatte.myshopify.com/\",\"hasMarketing\":true,\"capturedAt\":\"2025-10-31T13:34:39.066Z\"}",
                        "utmSourceLast": "",
                        "accountId": "9d989ebf-c20e-4052-8886-1d44c21b7997",
                        "phoneNumber": "18823455432",
                        "browserAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0",
                        "lastVisitTime": 1781508326632,
                        "externalReferrerLast": "",
                        "name": "Taylor",
                        "createdTime": 1753800341732,
                        "lookup_35619bh169": "sit",
                        "lastVisitIp": "198.2.152.33",
                        "landingPageLast": "https://3chatte.myshopify.com/",
                        "lookup_gd40h55ggc": "nulla",
                        "email": "gs2k34_m1086@tom.com",
                        "firstVisitTime": 1738661650861,
                        "externalUserId": "wo56kvDgAA5VmZqvgsX8d-cDmSDXCZXQ",
                        "botUserId": "user@example.com",
                        "imBotId": "1688856053740892",
                        "orgId": "6887410937e2124b6d6265a1"
                      }
                    ],
                    "start": 36,
                    "length": 1,
                    "recordsTotal": 35
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "body"
                ],
                "type": "object",
                "properties": {
                  "body": {
                    "required": [
                      "paging"
                    ],
                    "type": "object",
                    "properties": {
                      "conditions": {
                        "type": "object",
                        "properties": {
                          "updatedTime": {
                            "description": "Last updated time, Unix timestamp in milliseconds (time-range filter).",
                            "type": "object",
                            "required": [
                              "conditionType"
                            ],
                            "properties": {
                              "conditionType": {
                                "type": "string",
                                "description": "{FUZZY=fuzzy-match filtering, KEYWORD=exact-match filtering, FILTER=multi-value filtering, TIME_RANGE=time-range filtering}",
                                "enum": [
                                  "TIME_RANGE"
                                ]
                              },
                              "timeRange": {
                                "type": "object",
                                "properties": {
                                  "start": {
                                    "type": "integer",
                                    "format": "int64",
                                    "description": "Start time, Unix timestamp in milliseconds."
                                  },
                                  "end": {
                                    "type": "integer",
                                    "format": "int64",
                                    "description": "End time, Unix timestamp in milliseconds."
                                  }
                                },
                                "description": ""
                              }
                            }
                          },
                          "id": {
                            "type": "object",
                            "properties": {
                              "conditionType": {
                                "type": "string",
                                "description": "KEYWORD: exact match"
                              },
                              "value": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "conditionType",
                              "value"
                            ]
                          },
                          "firstTouch": {
                            "description": "First-touch information (supports fuzzy, exact, and multi-value filtering)",
                            "type": "object",
                            "required": [
                              "conditionType"
                            ],
                            "properties": {
                              "conditionType": {
                                "type": "string",
                                "description": "{FUZZY=fuzzy-match filtering, KEYWORD=exact-match filtering, FILTER=multi-value filtering, TIME_RANGE=time-range filtering}",
                                "enum": [
                                  "FUZZY",
                                  "KEYWORD",
                                  "FILTER"
                                ]
                              },
                              "value": {
                                "type": "string",
                                "description": ""
                              },
                              "filter": {
                                "type": "array",
                                "description": "",
                                "items": {
                                  "type": "string"
                                }
                              }
                            }
                          },
                          "language": {
                            "description": "Preferred language (supports fuzzy, exact, and multi-value filtering)",
                            "type": "object",
                            "required": [
                              "conditionType"
                            ],
                            "properties": {
                              "conditionType": {
                                "type": "string",
                                "description": "{FUZZY=fuzzy-match filtering, KEYWORD=exact-match filtering, FILTER=multi-value filtering, TIME_RANGE=time-range filtering}",
                                "enum": [
                                  "FUZZY",
                                  "KEYWORD",
                                  "FILTER"
                                ]
                              },
                              "value": {
                                "type": "string",
                                "description": ""
                              },
                              "filter": {
                                "type": "array",
                                "description": "",
                                "items": {
                                  "type": "string"
                                }
                              }
                            }
                          },
                          "lastTouch": {
                            "description": "Last-touch information (supports fuzzy, exact, and multi-value filtering)",
                            "type": "object",
                            "required": [
                              "conditionType"
                            ],
                            "properties": {
                              "conditionType": {
                                "type": "string",
                                "description": "{FUZZY=fuzzy-match filtering, KEYWORD=exact-match filtering, FILTER=multi-value filtering, TIME_RANGE=time-range filtering}",
                                "enum": [
                                  "FUZZY",
                                  "KEYWORD",
                                  "FILTER"
                                ]
                              },
                              "value": {
                                "type": "string",
                                "description": ""
                              },
                              "filter": {
                                "type": "array",
                                "description": "",
                                "items": {
                                  "type": "string"
                                }
                              }
                            }
                          },
                          "utmSourceLast": {
                            "description": "UTM (supports fuzzy, exact, and multi-value filtering)",
                            "type": "object",
                            "required": [
                              "conditionType"
                            ],
                            "properties": {
                              "conditionType": {
                                "type": "string",
                                "description": "{FUZZY=fuzzy-match filtering, KEYWORD=exact-match filtering, FILTER=multi-value filtering, TIME_RANGE=time-range filtering}",
                                "enum": [
                                  "FUZZY",
                                  "KEYWORD",
                                  "FILTER"
                                ]
                              },
                              "value": {
                                "type": "string",
                                "description": ""
                              },
                              "filter": {
                                "type": "array",
                                "description": "",
                                "items": {
                                  "type": "string"
                                }
                              }
                            }
                          },
                          "accountId": {
                            "description": "accountId (supports fuzzy, exact, and multi-value filtering)",
                            "type": "object",
                            "required": [
                              "conditionType"
                            ],
                            "properties": {
                              "conditionType": {
                                "type": "string",
                                "description": "{FUZZY=fuzzy-match filtering, KEYWORD=exact-match filtering, FILTER=multi-value filtering, TIME_RANGE=time-range filtering}",
                                "enum": [
                                  "FUZZY",
                                  "KEYWORD",
                                  "FILTER"
                                ]
                              },
                              "value": {
                                "type": "string",
                                "description": ""
                              },
                              "filter": {
                                "type": "array",
                                "description": "",
                                "items": {
                                  "type": "string"
                                }
                              }
                            }
                          },
                          "phoneNumber": {
                            "description": "Phone number (supports fuzzy, exact, and multi-value filtering)",
                            "type": "object",
                            "required": [
                              "conditionType"
                            ],
                            "properties": {
                              "conditionType": {
                                "type": "string",
                                "description": "{FUZZY=fuzzy-match filtering, KEYWORD=exact-match filtering, FILTER=multi-value filtering, TIME_RANGE=time-range filtering}",
                                "enum": [
                                  "FUZZY",
                                  "KEYWORD",
                                  "FILTER"
                                ]
                              },
                              "value": {
                                "type": "string",
                                "description": ""
                              },
                              "filter": {
                                "type": "array",
                                "description": "",
                                "items": {
                                  "type": "string"
                                }
                              }
                            }
                          },
                          "browserAgent": {
                            "description": "Browser information (supports fuzzy, exact, and multi-value filtering)",
                            "type": "object",
                            "required": [
                              "conditionType"
                            ],
                            "properties": {
                              "conditionType": {
                                "type": "string",
                                "description": "{FUZZY=fuzzy-match filtering, KEYWORD=exact-match filtering, FILTER=multi-value filtering, TIME_RANGE=time-range filtering}",
                                "enum": [
                                  "FUZZY",
                                  "KEYWORD",
                                  "FILTER"
                                ]
                              },
                              "value": {
                                "type": "string",
                                "description": ""
                              },
                              "filter": {
                                "type": "array",
                                "description": "",
                                "items": {
                                  "type": "string"
                                }
                              }
                            }
                          },
                          "lastVisitTime": {
                            "description": "Last visit time, Unix timestamp in milliseconds (time-range filter).",
                            "type": "object",
                            "required": [
                              "conditionType"
                            ],
                            "properties": {
                              "conditionType": {
                                "type": "string",
                                "description": "{FUZZY=fuzzy-match filtering, KEYWORD=exact-match filtering, FILTER=multi-value filtering, TIME_RANGE=time-range filtering}",
                                "enum": [
                                  "TIME_RANGE"
                                ]
                              },
                              "timeRange": {
                                "type": "object",
                                "properties": {
                                  "start": {
                                    "type": "integer",
                                    "format": "int64",
                                    "description": "Start time, Unix timestamp in milliseconds."
                                  },
                                  "end": {
                                    "type": "integer",
                                    "format": "int64",
                                    "description": "End time, Unix timestamp in milliseconds."
                                  }
                                },
                                "description": ""
                              }
                            }
                          },
                          "externalReferrerLast": {
                            "description": "Source information (supports fuzzy, exact, and multi-value filtering)",
                            "type": "object",
                            "required": [
                              "conditionType"
                            ],
                            "properties": {
                              "conditionType": {
                                "type": "string",
                                "description": "{FUZZY=fuzzy-match filtering, KEYWORD=exact-match filtering, FILTER=multi-value filtering, TIME_RANGE=time-range filtering}",
                                "enum": [
                                  "FUZZY",
                                  "KEYWORD",
                                  "FILTER"
                                ]
                              },
                              "value": {
                                "type": "string",
                                "description": ""
                              },
                              "filter": {
                                "type": "array",
                                "description": "",
                                "items": {
                                  "type": "string"
                                }
                              }
                            }
                          },
                          "name": {
                            "description": "Name (supports fuzzy, exact, and multi-value filtering)",
                            "type": "object",
                            "required": [
                              "conditionType"
                            ],
                            "properties": {
                              "conditionType": {
                                "type": "string",
                                "description": "{FUZZY=fuzzy-match filtering, KEYWORD=exact-match filtering, FILTER=multi-value filtering, TIME_RANGE=time-range filtering}",
                                "enum": [
                                  "FUZZY",
                                  "KEYWORD",
                                  "FILTER"
                                ]
                              },
                              "value": {
                                "type": "string",
                                "description": ""
                              },
                              "filter": {
                                "type": "array",
                                "description": "",
                                "items": {
                                  "type": "string"
                                }
                              }
                            }
                          },
                          "createdTime": {
                            "description": "Creation time, Unix timestamp in milliseconds (time-range filter).",
                            "type": "object",
                            "required": [
                              "conditionType"
                            ],
                            "properties": {
                              "conditionType": {
                                "type": "string",
                                "description": "{FUZZY=fuzzy-match filtering, KEYWORD=exact-match filtering, FILTER=multi-value filtering, TIME_RANGE=time-range filtering}",
                                "enum": [
                                  "TIME_RANGE"
                                ]
                              },
                              "timeRange": {
                                "type": "object",
                                "properties": {
                                  "start": {
                                    "type": "integer",
                                    "format": "int64",
                                    "description": "Start time, Unix timestamp in milliseconds."
                                  },
                                  "end": {
                                    "type": "integer",
                                    "format": "int64",
                                    "description": "End time, Unix timestamp in milliseconds."
                                  }
                                },
                                "description": ""
                              }
                            }
                          },
                          "lastVisitIp": {
                            "description": "Last-visit IP address (supports fuzzy, exact, and multi-value filtering)",
                            "type": "object",
                            "required": [
                              "conditionType"
                            ],
                            "properties": {
                              "conditionType": {
                                "type": "string",
                                "description": "{FUZZY=fuzzy-match filtering, KEYWORD=exact-match filtering, FILTER=multi-value filtering, TIME_RANGE=time-range filtering}",
                                "enum": [
                                  "FUZZY",
                                  "KEYWORD",
                                  "FILTER"
                                ]
                              },
                              "value": {
                                "type": "string",
                                "description": ""
                              },
                              "filter": {
                                "type": "array",
                                "description": "",
                                "items": {
                                  "type": "string"
                                }
                              }
                            }
                          },
                          "landingPageLast": {
                            "description": "Last visited page (supports fuzzy, exact, and multi-value filtering)",
                            "type": "object",
                            "required": [
                              "conditionType"
                            ],
                            "properties": {
                              "conditionType": {
                                "type": "string",
                                "description": "{FUZZY=fuzzy-match filtering, KEYWORD=exact-match filtering, FILTER=multi-value filtering, TIME_RANGE=time-range filtering}",
                                "enum": [
                                  "FUZZY",
                                  "KEYWORD",
                                  "FILTER"
                                ]
                              },
                              "value": {
                                "type": "string",
                                "description": ""
                              },
                              "filter": {
                                "type": "array",
                                "description": "",
                                "items": {
                                  "type": "string"
                                }
                              }
                            }
                          },
                          "email": {
                            "description": "Email address (supports fuzzy, exact, and multi-value filtering)",
                            "type": "object",
                            "required": [
                              "conditionType"
                            ],
                            "properties": {
                              "conditionType": {
                                "type": "string",
                                "description": "{FUZZY=fuzzy-match filtering, KEYWORD=exact-match filtering, FILTER=multi-value filtering, TIME_RANGE=time-range filtering}",
                                "enum": [
                                  "FUZZY",
                                  "KEYWORD",
                                  "FILTER"
                                ]
                              },
                              "value": {
                                "type": "string",
                                "description": ""
                              },
                              "filter": {
                                "type": "array",
                                "description": "",
                                "items": {
                                  "type": "string"
                                }
                              }
                            }
                          },
                          "firstVisitTime": {
                            "description": "First visit time, Unix timestamp in milliseconds (time-range filter).",
                            "type": "object",
                            "required": [
                              "conditionType"
                            ],
                            "properties": {
                              "conditionType": {
                                "type": "string",
                                "description": "{FUZZY=fuzzy-match filtering, KEYWORD=exact-match filtering, FILTER=multi-value filtering, TIME_RANGE=time-range filtering}",
                                "enum": [
                                  "TIME_RANGE"
                                ]
                              },
                              "timeRange": {
                                "type": "object",
                                "properties": {
                                  "start": {
                                    "type": "integer",
                                    "format": "int64",
                                    "description": "Start time, Unix timestamp in milliseconds."
                                  },
                                  "end": {
                                    "type": "integer",
                                    "format": "int64",
                                    "description": "End time, Unix timestamp in milliseconds."
                                  }
                                },
                                "description": ""
                              }
                            }
                          }
                        },
                        "required": [
                          "id"
                        ]
                      },
                      "sorts": {
                        "type": "array",
                        "description": "",
                        "items": {
                          "$ref": "#/components/schemas/butlervisitor_sort"
                        }
                      },
                      "paging": {
                        "required": [
                          "length",
                          "start"
                        ],
                        "type": "object",
                        "properties": {
                          "start": {
                            "minimum": 0,
                            "type": "integer",
                            "description": "Pagination offset"
                          },
                          "length": {
                            "maximum": 500,
                            "minimum": 1,
                            "type": "integer",
                            "description": "Page size"
                          }
                        },
                        "description": ""
                      }
                    },
                    "description": "Request body"
                  }
                },
                "description": ""
              }
            }
          }
        }
      }
    },
    "/api/open/v3/butler/visitor/update": {
      "post": {
        "summary": "Update Visitor",
        "deprecated": false,
        "description": "Update visitor fields.",
        "tags": [
          "Visitor/API"
        ],
        "responses": {
          "200": {
            "description": "",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "Error code"
                    },
                    "message": {
                      "anyOf": [
                        {
                          "type": "string",
                          "description": "Error message"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "code"
                  ]
                },
                "example": {
                  "code": 200,
                  "message": ""
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "body": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "title": "id",
                        "description": "Visitor ID (`dataId` or `accountId`)."
                      },
                      "name": {
                        "anyOf": [
                          {
                            "type": "string",
                            "title": "Name",
                            "description": "Visitor name"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "phoneNumber": {
                        "anyOf": [
                          {
                            "type": "string",
                            "title": "Phone number",
                            "description": "Visitor phone number"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "email": {
                        "anyOf": [
                          {
                            "type": "string",
                            "title": "Email address",
                            "description": "Visitor email address"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "language": {
                        "anyOf": [
                          {
                            "type": "string",
                            "title": "Language",
                            "description": "Visitor default language"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "extendMap": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {},
                            "title": "Custom fields",
                            "description": "Custom fields as an object."
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "id"
                    ]
                  }
                },
                "required": [
                  "body"
                ]
              }
            }
          }
        }
      }
    },
    "/api/open/v4/butler/visitor/create": {
      "post": {
        "summary": "Create Visitor",
        "deprecated": false,
        "description": "",
        "tags": [
          "Visitor/API"
        ],
        "responses": {
          "200": {
            "description": "",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "Status code. 200 = success; 500 = failure."
                    },
                    "message": {
                      "anyOf": [
                        {
                          "type": "string",
                          "description": "Error message"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "data": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "description": "Visitor ID"
                            }
                          },
                          "required": [
                            "id"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "code"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "accountId": {
                    "type": "string",
                    "description": "Third-party platform account ID"
                  },
                  "name": {
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "Visitor name"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "phoneNumber": {
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "Mobile number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "email": {
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "Email address"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "avatar": {
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "Avatar"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "language": {
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "Default language"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "extendMap": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {},
                        "description": "Custom status"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "accountId"
                ]
              }
            }
          }
        }
      }
    },
    "/api/open/v3/butler/transferToHuman": {
      "post": {
        "summary": "Transfer to Human Agent (1:1 Chat)",
        "deprecated": false,
        "description": "",
        "tags": [
          "Conversation/API"
        ],
        "responses": {
          "200": {
            "description": "",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "description": ""
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "message": {
                      "anyOf": [
                        {
                          "type": "string",
                          "description": ""
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                },
                "example": {
                  "code": 200,
                  "message": ""
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestParameterTransferToHumanParams",
                "description": ""
              }
            }
          }
        }
      }
    },
    "/api/butler/open/v2/group/transferToHuman": {
      "post": {
        "summary": "Transfer to Human Agent (Group Chat)",
        "deprecated": false,
        "description": "Parameter rules:\n- Provide at least one of `dialogId`, `groupId`, or `externalGroupId` to identify the group.\n- Provide `visitorId` to transfer a single contact to a human agent.\n- Provide `visitorId` together with `transferAccountId` to transfer a single contact and limit the handoff to one or more managed accounts in the list.\n- `visitorId` and `imBotId` cannot be provided together.\n- Provide only `imBotId` to transfer a managed account to a human agent.\n- `participantId` is not required. The API automatically resolves the corresponding group participant.",
        "tags": [
          "Conversation/API"
        ],
        "responses": {
          "200": {
            "description": "",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "Status code: 200 = success; 400 = invalid parameters; 500 = server error."
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "groupId": {
                          "type": "string",
                          "description": "Resolved internal platform group ID"
                        },
                        "participantId": {
                          "type": "string",
                          "description": "ID of the group participant actually transferred to a human agent."
                        },
                        "transferMode": {
                          "type": "string",
                          "description": "CONTACT_LEVEL = transfer an individual contact to a human agent; ACCOUNT_LEVEL = transfer a managed account to a human agent."
                        }
                      },
                      "required": [
                        "groupId",
                        "participantId",
                        "transferMode"
                      ]
                    }
                  },
                  "required": [
                    "code",
                    "data"
                  ]
                },
                "example": {
                  "code": 200,
                  "data": {
                    "groupId": "group_xxx",
                    "participantId": "participant_xxx",
                    "transferMode": "CONTACT_LEVEL"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "dialogId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "Group dialog ID"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "groupId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "Internal group ID"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "externalGroupId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "Chatly external group ID"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "visitorId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "Internal contact ID. When provided, transfers that contact to a human agent."
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "transferAccountId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "List of managed-account IDs allowed for a single-contact handoff. May be provided only together with `visitorId`. If omitted, the contact is transferred to a human agent for all managed accounts in the group."
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "imBotId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "Chatly managed-account ID. Used only when transferring a managed account to a human agent."
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/open/v4/butler/conversations/assign": {
      "post": {
        "summary": "Assign Human Agent",
        "deprecated": false,
        "description": "",
        "tags": [
          "Conversation/API"
        ],
        "responses": {
          "200": {
            "description": "",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": ""
                    },
                    "message": {
                      "type": "string",
                      "description": "Error description, or \"success\"."
                    },
                    "data": {
                      "anyOf": [
                        {
                          "type": "string",
                          "description": "Conversation ID, or null."
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "message",
                    "code",
                    "data"
                  ]
                },
                "example": {
                  "code": 200,
                  "message": "success",
                  "data": "conv_20260205103045_abc123"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "dialogId": {
                    "type": "string",
                    "description": "Provide either `dialogId` or `conversationId`."
                  },
                  "conversationId": {
                    "type": "string",
                    "description": "Provide either `conversationId` or `dialogId`."
                  },
                  "assigneeId": {
                    "type": "string",
                    "description": "Customer-service staff ID (`staffId`)."
                  },
                  "handoffReason": {
                    "type": "string",
                    "description": "Conversation summary / reason for handoff."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/open/v4/butler/conversation/closed": {
      "post": {
        "summary": "Close Conversation Manually",
        "deprecated": false,
        "description": "Manually close the specified dialog.",
        "tags": [
          "Conversation/API"
        ],
        "responses": {
          "200": {
            "description": "",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConversationClosedParams",
                "description": ""
              }
            }
          }
        }
      }
    },
    "/api/open/v3/butlerconversation/query": {
      "post": {
        "summary": "List Conversations",
        "deprecated": false,
        "description": "",
        "operationId": "QUERYbutlerconversationList",
        "tags": [
          "Conversation/API"
        ],
        "responses": {
          "200": {
            "description": "",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": ""
                    },
                    "message": {
                      "type": "string",
                      "description": ""
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "list": {
                          "type": "array",
                          "description": "",
                          "items": {
                            "$ref": "#/components/schemas/butlerconversation"
                          }
                        },
                        "start": {
                          "type": "integer",
                          "description": ""
                        },
                        "length": {
                          "type": "integer",
                          "description": ""
                        },
                        "recordsTotal": {
                          "type": "integer",
                          "description": ""
                        }
                      },
                      "description": ""
                    }
                  }
                },
                "example": {
                  "code": 200,
                  "data": {
                    "list": [
                      {
                        "completedTime": 1765591805398,
                        "replyStrategy": 2,
                        "solved": true,
                        "lookup_3g71fgh5f5": "e1xw1w62ez8g7chbpu8m2ecx",
                        "dataId": "artkf8obtc4aoycsfkacfepd",
                        "createdTime": 1765591479815,
                        "lookup_h70b811f83": 113,
                        "id": "artkf8obtc4aoycsfkacfepd",
                        "convStatus": 3,
                        "updatedTime": 1765591805445,
                        "sessionId": {
                          "id": "vcukzh09l5x3k8ke34b55hd7",
                          "viewKey": "butlerSession"
                        },
                        "userAccountId": "qxs024gzl1kehd1q8hhlvefk",
                        "visitorId": {
                          "id": "e1xw1w62ez8g7chbpu8m2ecx",
                          "viewKey": "butlerVisitor"
                        }
                      },
                      {
                        "completedTime": 1765591805398,
                        "replyStrategy": 2,
                        "solved": true,
                        "lookup_3g71fgh5f5": "gxp5tvn7jiqiac7wn6ivt7x3",
                        "dataId": "q1u6qd4svts3uueeewyxfhsh",
                        "createdTime": 1765591479729,
                        "lookup_h70b811f83": 113,
                        "id": "q1u6qd4svts3uueeewyxfhsh",
                        "convStatus": 3,
                        "updatedTime": 1765591805443,
                        "sessionId": {
                          "id": "am3jugfyr7r66fxgnsrcoaux",
                          "viewKey": "butlerSession"
                        },
                        "userAccountId": "cnv3kupexzjb7vaiko3vjrls",
                        "visitorId": {
                          "id": "gxp5tvn7jiqiac7wn6ivt7x3",
                          "viewKey": "butlerVisitor"
                        }
                      }
                    ],
                    "start": 0,
                    "length": 100,
                    "recordsTotal": 2
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "body"
                ],
                "type": "object",
                "properties": {
                  "body": {
                    "required": [
                      "paging"
                    ],
                    "type": "object",
                    "properties": {
                      "conditions": {
                        "type": "object",
                        "properties": {
                          "convStatus": {
                            "description": "Status: 2 = active, 3 = completed, 4 = 4. Supports multi-value filtering.",
                            "type": "object",
                            "required": [
                              "conditionType"
                            ],
                            "properties": {
                              "conditionType": {
                                "type": "string",
                                "description": "{FUZZY=fuzzy-match filtering, KEYWORD=exact-match filtering, FILTER=multi-value filtering, TIME_RANGE=time-range filtering}",
                                "enum": [
                                  "FILTER"
                                ]
                              },
                              "filter": {
                                "type": "array",
                                "description": "",
                                "items": {
                                  "type": "string"
                                }
                              }
                            }
                          },
                          "summary": {
                            "description": "summary (supports fuzzy, exact, and multi-value filtering)",
                            "type": "object",
                            "required": [
                              "conditionType"
                            ],
                            "properties": {
                              "conditionType": {
                                "type": "string",
                                "description": "{FUZZY=fuzzy-match filtering, KEYWORD=exact-match filtering, FILTER=multi-value filtering, TIME_RANGE=time-range filtering}",
                                "enum": [
                                  "FUZZY",
                                  "KEYWORD",
                                  "FILTER"
                                ]
                              },
                              "value": {
                                "type": "string",
                                "description": ""
                              },
                              "filter": {
                                "type": "array",
                                "description": "",
                                "items": {
                                  "type": "string"
                                }
                              }
                            }
                          },
                          "updatedTime": {
                            "description": "Last updated time, Unix timestamp in milliseconds (time-range filter).",
                            "type": "object",
                            "required": [
                              "conditionType"
                            ],
                            "properties": {
                              "conditionType": {
                                "type": "string",
                                "description": "{FUZZY=fuzzy-match filtering, KEYWORD=exact-match filtering, FILTER=multi-value filtering, TIME_RANGE=time-range filtering}",
                                "enum": [
                                  "TIME_RANGE"
                                ]
                              },
                              "timeRange": {
                                "type": "object",
                                "properties": {
                                  "start": {
                                    "type": "integer",
                                    "format": "int64",
                                    "description": "Start time, Unix timestamp in milliseconds."
                                  },
                                  "end": {
                                    "type": "integer",
                                    "format": "int64",
                                    "description": "End time, Unix timestamp in milliseconds."
                                  }
                                },
                                "description": ""
                              }
                            }
                          },
                          "replyStrategy": {
                            "description": "Reply strategy: 1 = human agent; 2 = 3Chat AI Agent. Supports multi-value filtering.",
                            "type": "object",
                            "required": [
                              "conditionType"
                            ],
                            "properties": {
                              "conditionType": {
                                "type": "string",
                                "description": "{FUZZY=fuzzy-match filtering, KEYWORD=exact-match filtering, FILTER=multi-value filtering, TIME_RANGE=time-range filtering}",
                                "enum": [
                                  "FILTER"
                                ]
                              },
                              "filter": {
                                "type": "array",
                                "description": "",
                                "items": {
                                  "type": "string"
                                }
                              }
                            }
                          },
                          "completedTime": {
                            "description": "Closed time, Unix timestamp in milliseconds (time-range filter).",
                            "type": "object",
                            "required": [
                              "conditionType"
                            ],
                            "properties": {
                              "conditionType": {
                                "type": "string",
                                "description": "{FUZZY=fuzzy-match filtering, KEYWORD=exact-match filtering, FILTER=multi-value filtering, TIME_RANGE=time-range filtering}",
                                "enum": [
                                  "TIME_RANGE"
                                ]
                              },
                              "timeRange": {
                                "type": "object",
                                "properties": {
                                  "start": {
                                    "type": "integer",
                                    "format": "int64",
                                    "description": "Start time, Unix timestamp in milliseconds."
                                  },
                                  "end": {
                                    "type": "integer",
                                    "format": "int64",
                                    "description": "End time, Unix timestamp in milliseconds."
                                  }
                                },
                                "description": ""
                              }
                            }
                          },
                          "solved": {
                            "description": "Resolved status. `true` = resolved; `false` = unresolved. Supports multi-value filtering.",
                            "type": "object",
                            "required": [
                              "conditionType"
                            ],
                            "properties": {
                              "conditionType": {
                                "type": "string",
                                "description": "{FUZZY=fuzzy-match filtering, KEYWORD=exact-match filtering, FILTER=multi-value filtering, TIME_RANGE=time-range filtering}",
                                "enum": [
                                  "FILTER"
                                ]
                              },
                              "filter": {
                                "type": "array",
                                "description": "",
                                "items": {
                                  "type": "string"
                                }
                              }
                            }
                          },
                          "ratingComment": {
                            "description": "Contact rating (supports fuzzy, exact, and multi-value filtering)",
                            "type": "object",
                            "required": [
                              "conditionType"
                            ],
                            "properties": {
                              "conditionType": {
                                "type": "string",
                                "description": "{FUZZY=fuzzy-match filtering, KEYWORD=exact-match filtering, FILTER=multi-value filtering, TIME_RANGE=time-range filtering}",
                                "enum": [
                                  "FUZZY",
                                  "KEYWORD",
                                  "FILTER"
                                ]
                              },
                              "value": {
                                "type": "string",
                                "description": ""
                              },
                              "filter": {
                                "type": "array",
                                "description": "",
                                "items": {
                                  "type": "string"
                                }
                              }
                            }
                          },
                          "dataId": {
                            "description": "dataId (supports fuzzy, exact, and multi-value filtering)",
                            "type": "object",
                            "required": [
                              "conditionType"
                            ],
                            "properties": {
                              "conditionType": {
                                "type": "string",
                                "description": "{FUZZY=fuzzy-match filtering, KEYWORD=exact-match filtering, FILTER=multi-value filtering, TIME_RANGE=time-range filtering}",
                                "enum": [
                                  "FUZZY",
                                  "KEYWORD",
                                  "FILTER"
                                ]
                              },
                              "value": {
                                "type": "string",
                                "description": ""
                              },
                              "filter": {
                                "type": "array",
                                "description": "",
                                "items": {
                                  "type": "string"
                                }
                              }
                            }
                          },
                          "createdTime": {
                            "description": "Creation time, Unix timestamp in milliseconds (time-range filter).",
                            "type": "object",
                            "required": [
                              "conditionType"
                            ],
                            "properties": {
                              "conditionType": {
                                "type": "string",
                                "description": "{FUZZY=fuzzy-match filtering, KEYWORD=exact-match filtering, FILTER=multi-value filtering, TIME_RANGE=time-range filtering}",
                                "enum": [
                                  "TIME_RANGE"
                                ]
                              },
                              "timeRange": {
                                "type": "object",
                                "properties": {
                                  "start": {
                                    "type": "integer",
                                    "format": "int64",
                                    "description": "Start time, Unix timestamp in milliseconds."
                                  },
                                  "end": {
                                    "type": "integer",
                                    "format": "int64",
                                    "description": "End time, Unix timestamp in milliseconds."
                                  }
                                },
                                "description": ""
                              }
                            }
                          },
                          "ratingLevels": {
                            "description": "CSAT score: 1–5. Supports multi-value filtering.",
                            "type": "object",
                            "required": [
                              "conditionType"
                            ],
                            "properties": {
                              "conditionType": {
                                "type": "string",
                                "description": "{FUZZY=fuzzy-match filtering, KEYWORD=exact-match filtering, FILTER=multi-value filtering, TIME_RANGE=time-range filtering}",
                                "enum": [
                                  "FILTER"
                                ]
                              },
                              "filter": {
                                "type": "array",
                                "description": "",
                                "items": {
                                  "type": "string"
                                }
                              }
                            }
                          },
                          "solverType": {
                            "description": "Resolver: 1 = 3Chat; 2 = human agent. Supports multi-value filtering.",
                            "type": "object",
                            "required": [
                              "conditionType"
                            ],
                            "properties": {
                              "conditionType": {
                                "type": "string",
                                "description": "{FUZZY=fuzzy-match filtering, KEYWORD=exact-match filtering, FILTER=multi-value filtering, TIME_RANGE=time-range filtering}",
                                "enum": [
                                  "FILTER"
                                ]
                              },
                              "filter": {
                                "type": "array",
                                "description": "",
                                "items": {
                                  "type": "string"
                                }
                              }
                            }
                          },
                          "id": {
                            "description": "ID (supports multi-value filtering).",
                            "type": "object",
                            "required": [
                              "conditionType"
                            ],
                            "properties": {
                              "conditionType": {
                                "type": "string",
                                "description": "KEYWORD: exact match",
                                "enum": [
                                  "KEYWORD"
                                ]
                              },
                              "value": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      },
                      "sorts": {
                        "type": "array",
                        "description": "",
                        "items": {
                          "$ref": "#/components/schemas/butlerconversation_sort"
                        }
                      },
                      "paging": {
                        "required": [
                          "length",
                          "start"
                        ],
                        "type": "object",
                        "properties": {
                          "start": {
                            "minimum": 0,
                            "type": "integer",
                            "description": "Pagination offset"
                          },
                          "length": {
                            "maximum": 500,
                            "minimum": 1,
                            "type": "integer",
                            "description": "Page size"
                          }
                        },
                        "description": ""
                      }
                    },
                    "description": "Request body"
                  }
                },
                "description": ""
              }
            }
          }
        }
      }
    },
    "/api/open/v4/butler/conversation/update": {
      "post": {
        "summary": "Update Conversation",
        "deprecated": false,
        "description": "",
        "tags": [
          "Conversation/API"
        ],
        "responses": {
          "200": {
            "description": "",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "Status code. 200 = success; 500 = failure."
                    },
                    "message": {
                      "anyOf": [
                        {
                          "type": "string",
                          "description": "Error message"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "code"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Conversation ID"
                  },
                  "convStatus": {
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "Conversation status"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "replyStrategy": {
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "Reply strategy"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "solved": {
                    "anyOf": [
                      {
                        "type": "boolean",
                        "description": "Whether resolved."
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "solverType": {
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "Resolver type"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "solverId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "Resolver ID"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "ratingLevels": {
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "Rating"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "ratingComment": {
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "Rating comment"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "completedTime": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "description": "Resolved time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "extendMap": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {},
                        "description": "Custom fields"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "id"
                ]
              }
            }
          }
        }
      }
    },
    "/api/open/v3/butlermessage/query": {
      "post": {
        "summary": "List Messages",
        "deprecated": false,
        "description": "",
        "operationId": "QUERYbutlermessageList",
        "tags": [
          "Message/API"
        ],
        "responses": {
          "200": {
            "description": "",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": ""
                    },
                    "message": {
                      "type": "string",
                      "description": ""
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "list": {
                          "type": "array",
                          "description": "",
                          "items": {
                            "$ref": "#/components/schemas/butlermessage"
                          }
                        },
                        "start": {
                          "type": "integer",
                          "description": ""
                        },
                        "length": {
                          "type": "integer",
                          "description": ""
                        },
                        "recordsTotal": {
                          "type": "integer",
                          "description": ""
                        }
                      },
                      "description": ""
                    }
                  }
                },
                "example": {
                  "code": 200,
                  "message": "",
                  "data": {
                    "list": [
                      {
                        "id": "51901704862228480",
                        "dataId": "7g0rzhgjp0a3xqpdd",
                        "senderId": "51901681609007100",
                        "workSpaceId": "a4872870-3cde-47f2-830f-a5f07801790b",
                        "senderType": 1,
                        "sendTime": 1770489117,
                        "content": "Tell me about your business.",
                        "channelId": {
                          "id": "d56sxk7g0rzhazsuqdqz0d5u"
                        },
                        "conversationId": {
                          "id": "aqxqpddc36lyaeysxhhuekih"
                        },
                        "sessionId": {
                          "id": "kiaa9exjdwdcnzrzqgjp0a32"
                        },
                        "isEffectiveReply": true,
                        "email": {
                          "from": "user@example.com",
                          "fromName": "Morgan",
                          "to": [
                            "user@example.com",
                            "user@example.com",
                            "user@example.com"
                          ],
                          "cc": [
                            "user@example.com",
                            "user@example.com"
                          ],
                          "bcc": [
                            "user@example.com"
                          ],
                          "subject": "Product Inquiry"
                        },
                        "attachments": [
                          {
                            "key": "idolor",
                            "name": "profile.png",
                            "contentType": "image/png",
                            "url": "https://mature-printer.com/",
                            "size": 3132
                          }
                        ],
                        "agentLogs": [
                          {
                            "type": "language",
                            "message": "Chinese",
                            "status": "certain",
                            "timestamp": 1762915391425
                          },
                          {
                            "type": "recall",
                            "message": "Memory content: 1, 2, 3",
                            "timestamp": 1762915391425
                          },
                          {
                            "type": "task",
                            "name": "Query Orders",
                            "timestamp": 1762915391425
                          },
                          {
                            "type": "knowledge",
                            "kb": [
                              {
                                "chunk_id": "7ae93248fe9",
                                "content": "Q: What does the sample company do?\nA: The sample company provides testing services for businesses.",
                                "created_at": 1763640658,
                                "document_id": "dd06afb5-7e33-4953-9247-113879e4653",
                                "document_name": "test-knowledge-base.md",
                                "enabled": true,
                                "lang": "zh",
                                "score": 0.7226141428807815,
                                "source": "Document"
                              }
                            ],
                            "timestamp": 1762915391425
                          },
                          {
                            "type": "tool",
                            "name": "Create Order",
                            "costTime": 5,
                            "timestamp": 1762915391425
                          },
                          {
                            "type": "tool",
                            "name": "Create Order",
                            "costTime": 5,
                            "status": "success",
                            "timestamp": 1762915391425
                          },
                          {
                            "type": "internalTool",
                            "entity": {
                              "name": "visitor",
                              "values": [
                                "Jamie",
                                "13812345678"
                              ]
                            },
                            "timestamp": 1762915391425
                          },
                          {
                            "type": "systemTask",
                            "name": "Collected information",
                            "message": "Record xx, xx, xx",
                            "timestamp": 1762915391425
                          }
                        ],
                        "createdTime": 1770489117249,
                        "updatedTime": 1747115523185,
                        "thirdId": "external_message_id",
                        "replyMessageId": "reply_message_id",
                        "processedBy": "AI_AGENT"
                      }
                    ],
                    "start": 0,
                    "length": 100,
                    "recordsTotal": 99
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "body"
                ],
                "type": "object",
                "properties": {
                  "body": {
                    "required": [
                      "paging"
                    ],
                    "type": "object",
                    "properties": {
                      "conditions": {
                        "type": "object",
                        "properties": {
                          "updatedTime": {
                            "description": "updatedTime, Unix timestamp in milliseconds (time-range filter).",
                            "type": "object",
                            "required": [
                              "conditionType"
                            ],
                            "properties": {
                              "conditionType": {
                                "type": "string",
                                "description": "{TIME_RANGE=time-range filtering}",
                                "enum": [
                                  "TIME_RANGE"
                                ]
                              },
                              "timeRange": {
                                "type": "object",
                                "properties": {
                                  "start": {
                                    "type": "integer",
                                    "format": "int64",
                                    "description": "Start time, Unix timestamp in milliseconds."
                                  },
                                  "end": {
                                    "type": "integer",
                                    "format": "int64",
                                    "description": "End time, Unix timestamp in milliseconds."
                                  }
                                },
                                "description": ""
                              }
                            }
                          },
                          "senderId": {
                            "description": "senderId",
                            "type": "object",
                            "required": [
                              "conditionType"
                            ],
                            "properties": {
                              "conditionType": {
                                "type": "string",
                                "description": "KEYWORD",
                                "enum": [
                                  "FUZZY",
                                  "KEYWORD",
                                  "FILTER"
                                ]
                              },
                              "value": {
                                "type": "string"
                              }
                            }
                          },
                          "createdTime": {
                            "description": "createdTime, Unix timestamp in milliseconds (time-range filter).",
                            "type": "object",
                            "required": [
                              "conditionType"
                            ],
                            "properties": {
                              "conditionType": {
                                "type": "string",
                                "description": "{TIME_RANGE=time-range filtering}",
                                "enum": [
                                  "TIME_RANGE"
                                ]
                              },
                              "timeRange": {
                                "type": "object",
                                "properties": {
                                  "start": {
                                    "type": "integer",
                                    "format": "int64",
                                    "description": "Start time, Unix timestamp in milliseconds."
                                  },
                                  "end": {
                                    "type": "integer",
                                    "format": "int64",
                                    "description": "End time, Unix timestamp in milliseconds."
                                  }
                                },
                                "description": ""
                              }
                            }
                          },
                          "senderType": {
                            "description": "senderType: 1 = contact (customer); 2 = human agent; 3 = 3Chat Agent; 4 = third-party agent (Zendesk).",
                            "type": "object",
                            "required": [
                              "conditionType"
                            ],
                            "properties": {
                              "conditionType": {
                                "type": "string",
                                "description": "{FILTER=multi-value filtering}",
                                "enum": [
                                  "FILTER"
                                ]
                              },
                              "filter": {
                                "type": "array",
                                "description": "",
                                "items": {
                                  "type": "integer",
                                  "description": "1 = contact (customer); 2 = human agent; 3 = 3Chat Agent; 4 = third-party agent."
                                }
                              }
                            }
                          },
                          "isEffectiveReply": {
                            "description": "isEffectiveReply: `true` = yes; `false` = no.",
                            "type": "object",
                            "required": [
                              "conditionType"
                            ],
                            "properties": {
                              "conditionType": {
                                "type": "string",
                                "description": "{FILTER=multi-value filtering}",
                                "enum": [
                                  "FILTER"
                                ]
                              },
                              "filter": {
                                "type": "array",
                                "description": "",
                                "items": {
                                  "type": "boolean"
                                }
                              }
                            }
                          },
                          "content": {
                            "description": "content",
                            "type": "object",
                            "required": [
                              "conditionType"
                            ],
                            "properties": {
                              "conditionType": {
                                "type": "string",
                                "description": "{FUZZY=fuzzy-match filtering, KEYWORD=exact-match filtering}",
                                "enum": [
                                  "FUZZY",
                                  "KEYWORD",
                                  "FILTER"
                                ]
                              },
                              "value": {
                                "type": "string",
                                "description": ""
                              }
                            }
                          },
                          "id": {
                            "description": "Message ID",
                            "type": "object",
                            "required": [
                              "conditionType"
                            ],
                            "properties": {
                              "conditionType": {
                                "type": "string",
                                "description": "KEYWORD: exact match",
                                "enum": [
                                  "KEYWORD"
                                ]
                              },
                              "value": {
                                "type": "string"
                              }
                            }
                          },
                          "sessionId": {
                            "type": "object",
                            "properties": {
                              "conditionType": {
                                "type": "string",
                                "description": "FILTER"
                              },
                              "filter": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "description": "session id"
                                },
                                "description": "Array of session IDs."
                              }
                            },
                            "required": [
                              "conditionType",
                              "filter"
                            ],
                            "description": "ID of the dialog containing the current message."
                          },
                          "conversationId": {
                            "type": "object",
                            "properties": {
                              "conditionType": {
                                "type": "string",
                                "description": "FILTER"
                              },
                              "filter": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "description": "conversation id"
                                },
                                "description": "Array of conversation IDs."
                              }
                            },
                            "required": [
                              "conditionType",
                              "filter"
                            ],
                            "description": "ID of the conversation containing the current message."
                          },
                          "processedBy": {
                            "type": "object",
                            "properties": {
                              "conditionType": {
                                "type": "string",
                                "description": "FILTER"
                              },
                              "filter": {
                                "type": "array",
                                "items": {
                                  "type": "integer",
                                  "description": "1 = human reply; 2 = AI reply; 0 = unclassified."
                                },
                                "description": "Allowed values"
                              }
                            },
                            "required": [
                              "conditionType",
                              "filter"
                            ],
                            "description": "Role that processed the current user message: 1 = human reply; 2 = AI reply; 0 = unclassified."
                          }
                        },
                        "required": [
                          "processedBy"
                        ]
                      },
                      "sorts": {
                        "type": "array",
                        "description": "",
                        "items": {
                          "$ref": "#/components/schemas/butlermessage_sort"
                        }
                      },
                      "extendFieldParams": {
                        "type": "array",
                        "description": "Custom-field query parameters",
                        "items": {
                          "required": [
                            "conditionType",
                            "key"
                          ],
                          "type": "object",
                          "properties": {
                            "conditionType": {
                              "type": "string",
                              "description": "{NONE=NONE, FUZZY=FUZZY, KEYWORD=KEYWORD, FILTER=FILTER, TIME_RANGE=TIME_RANGE, OBJECT_FILTER=OBJECT_FILTER}",
                              "enum": [
                                "NONE",
                                "FUZZY",
                                "KEYWORD",
                                "FILTER",
                                "TIME_RANGE",
                                "OBJECT_FILTER"
                              ]
                            },
                            "filter": {
                              "type": "array",
                              "description": "conditionType=FILTER",
                              "items": {
                                "type": "string"
                              }
                            },
                            "value": {
                              "type": "string",
                              "description": "conditionType=FUZZY/KEYWORD"
                            },
                            "timeRange": {
                              "type": "object",
                              "properties": {
                                "start": {
                                  "minimum": 0.01,
                                  "type": "string",
                                  "description": "Start time, 13-digit Unix timestamp in milliseconds."
                                },
                                "end": {
                                  "minimum": 0.01,
                                  "type": "string",
                                  "description": "End time, 13-digit Unix timestamp in milliseconds."
                                }
                              },
                              "description": "conditionType=TIME_RANGE"
                            },
                            "key": {
                              "type": "string",
                              "description": "Custom-field key"
                            }
                          },
                          "description": "Custom query condition."
                        }
                      },
                      "paging": {
                        "required": [
                          "length",
                          "start"
                        ],
                        "type": "object",
                        "properties": {
                          "start": {
                            "minimum": 0,
                            "type": "integer",
                            "description": "Pagination offset"
                          },
                          "length": {
                            "maximum": 500,
                            "minimum": 1,
                            "type": "integer",
                            "description": "Page size"
                          }
                        },
                        "description": ""
                      }
                    },
                    "description": "Request body"
                  }
                },
                "description": ""
              }
            }
          }
        }
      }
    },
    "/api/open/v4/butler/files": {
      "post": {
        "summary": "Upload File",
        "deprecated": false,
        "description": "Upload a source file for knowledge processing. The API returns a `fileId` and `fileUrl` that can be referenced by a knowledge-processing task.\n\n**Supported file types:**\n- PDF: `application/pdf`\n- Word: `application/vnd.openxmlformats-officedocument.wordprocessingml.document`\n- Excel: `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`, `application/vnd.ms-excel`\n- TXT: `text/plain`\n- Markdown: `text/markdown`, `text/mdx`\n- HTML: `text/html`\n- CSV: `text/csv`\n\n**Limits:**\n- Maximum file size: 15 MB\n- Maximum file-name length: 256 characters\n",
        "operationId": "uploadFile",
        "tags": [
          "Knowledge Base/API"
        ],
        "responses": {
          "200": {
            "description": "Upload successful",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "Status code",
                      "example": 200
                    },
                    "message": {
                      "type": "string",
                      "description": "Status message",
                      "example": "success"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "fileId": {
                          "type": "string",
                          "description": "Unique file ID",
                          "example": "file_01K23M1W3X7F5Q9R2D"
                        },
                        "fileName": {
                          "type": "string",
                          "description": "File name",
                          "example": "product-manual.pdf"
                        },
                        "mimeType": {
                          "type": "string",
                          "description": "File MIME type",
                          "example": "application/pdf"
                        },
                        "sizeBytes": {
                          "type": "integer",
                          "format": "int64",
                          "description": "File size in bytes",
                          "example": 2456789
                        },
                        "purpose": {
                          "type": "string",
                          "description": "File purpose",
                          "example": "knowledge"
                        },
                        "fileUrl": {
                          "type": "string",
                          "format": "uri",
                          "description": "File access URL",
                          "example": "https://files.3chat.ai/openapi/workspace_xxx/file_01K23M1W3X7F5Q9R2D"
                        },
                        "sha256": {
                          "type": "string",
                          "description": "File SHA-256 hash",
                          "example": "0f3e9cbe4e2c98f5b7d4d1c08d0e7e8f98e5d23d..."
                        },
                        "createdAt": {
                          "type": "integer",
                          "format": "int64",
                          "description": "Creation timestamp in milliseconds.",
                          "example": 1776667072000
                        }
                      }
                    }
                  }
                },
                "example": {
                  "code": 200,
                  "message": "success",
                  "data": {
                    "fileId": "0d4e6d3c-4687-4cd8-95b7-2006565c66c2",
                    "fileName": "test-file.md",
                    "mimeType": "text/markdown",
                    "sizeBytes": 2344,
                    "purpose": "knowledge",
                    "fileUrl": "https://files.example.com/knowledge/example.md",
                    "sha256": "a5450fbff557fef5dc28266e28268823a75a47b228707e5b1a77039ab2a24f5e",
                    "createdAt": 1778208611781
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "Error status code",
                      "example": 400
                    },
                    "message": {
                      "type": "string",
                      "description": "Error information",
                      "example": "The file is required."
                    },
                    "data": {
                      "type": "null",
                      "description": "Returns null when an error occurs."
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "File is too large.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 413
                    },
                    "message": {
                      "type": "string",
                      "example": "The file size exceeds the allowed limit.(Max - 15 M)"
                    },
                    "data": {
                      "type": "null"
                    }
                  }
                },
                "example": {
                  "code": 413,
                  "message": "The file size exceeds the allowed limit.(Max - 15 M)",
                  "data": null
                }
              }
            }
          },
          "415": {
            "description": "Unsupported file type.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 415
                    },
                    "message": {
                      "type": "string",
                      "example": "Unsupported file type."
                    },
                    "data": {
                      "type": "null"
                    }
                  }
                },
                "example": {
                  "code": 415,
                  "message": "Unsupported file type.",
                  "data": null
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "format": "binary",
                    "type": "string",
                    "description": "File to upload (binary stream)."
                  },
                  "purpose": {
                    "enum": [
                      "knowledge"
                    ],
                    "default": "knowledge",
                    "type": "string",
                    "description": "File purpose"
                  },
                  "fileName": {
                    "maxLength": 256,
                    "type": "string",
                    "description": "Custom file name. If omitted, the original file name is used."
                  }
                },
                "required": [
                  "file"
                ]
              }
            }
          },
          "required": true
        }
      }
    },
    "/api/open/v4/butler/knowledge/tasks": {
      "post": {
        "summary": "Create Knowledge Processing Task",
        "deprecated": false,
        "description": "Create an asynchronous knowledge-processing task. The task can include three source types, and the system automatically processes all sources and uploads the resulting content to the Knowledge Base.\n\n**Supported source types:**\n- **`uploaded_file`**: References a file previously uploaded through the `/files` API. Requires `fileId`.\n- **`remote_file`**: Provides a publicly or otherwise accessible external file URL. The system downloads and processes the file automatically.\n- **`raw_text`**: Provides text directly in the request; no file upload is required.\n\n**Design notes:**\n- All input sources use a single `sources[]` array. A task may contain multiple sources for batch ingestion.\n- The API returns a `taskId` immediately. Processing continues asynchronously, and progress can be obtained through the task-query API or a callback.\n- A failure for one file does not stop the task; the remaining files continue to be processed.\n\n**Task statuses:**\n- `task.progress`: The task is in progress.\n- `task.completed`: Processing has finished for all files. This status can still be returned when all individual files failed, provided there was no task-level error.\n- `task.failed`: The task failed because of a task-level error.\n\n**Callback example:**\n```json\n{\n  \"id\": \"df53ce97-2138-4898-8926-919bd7e161e8\",\n  \"type\": \"file.completed\",\n  \"createdAt\": 1778050876442,\n  \"data\": {\n    \"task\": {\n      \"taskId\": \"07adc997-2ce8-4dc4-89b9-08ede5bd9356\",\n      \"status\": \"task.progress\",\n      \"sourceSummary\": {\n        \"total\": 1,\n        \"accepted\": 1,\n        \"rejected\": 0,\n        \"queued\": 0,\n        \"uploading\": 0,\n        \"parsing\": 0,\n        \"completed\": 1,\n        \"failed\": 0\n      },\n      \"entitlement\": {\n        \"resourceType\": \"knowledge_unit\",\n        \"estimatedConsume\": 1,\n        \"actualConsume\": 1,\n        \"balanceRemain\": 5\n      },\n      \"errors\": [],\n      \"createdAt\": 1778050592419,\n      \"updatedAt\": 1778050875495\n    },\n    \"file\": {\n      \"sourceId\": \"my_sr_x1\",\n      \"internalId\": \"7b06a742-8593-4246-9f74-45e4cbeebbaa\",\n      \"type\": \"uploaded_file\",\n      \"displayName\": \"multi-active-conversations-by-channel.pdf\",\n      \"status\": \"file.completed\"\n    }\n  }\n}\n```\n",
        "operationId": "createKnowledgeTask",
        "tags": [
          "Knowledge Base/API"
        ],
        "responses": {
          "200": {
            "description": "Task created successfully",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "Status code",
                      "example": 200
                    },
                    "message": {
                      "type": "string",
                      "description": "Status message",
                      "example": "success"
                    },
                    "requestId": {
                      "type": "string",
                      "description": "Request ID",
                      "example": "req_01K23P7R4M6W8Q9JAB"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "taskId": {
                          "type": "string",
                          "description": "Task ID",
                          "example": "ktask_01K23P7W8D5N2X4QYZ"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "task.progress",
                            "task.completed",
                            "task.failed"
                          ],
                          "description": "Task status",
                          "example": "task.progress"
                        },
                        "sourceSummary": {
                          "type": "object",
                          "properties": {
                            "total": {
                              "type": "integer",
                              "description": "Total",
                              "example": 2
                            },
                            "accepted": {
                              "type": "integer",
                              "description": "Accepted",
                              "example": 2
                            },
                            "rejected": {
                              "type": "integer",
                              "description": "Rejected",
                              "example": 0
                            },
                            "queued": {
                              "type": "integer",
                              "description": "Queued",
                              "example": 0
                            },
                            "uploading": {
                              "type": "integer",
                              "description": "Uploading",
                              "example": 0
                            },
                            "parsing": {
                              "type": "integer",
                              "description": "Parsing",
                              "example": 0
                            },
                            "completed": {
                              "type": "integer",
                              "description": "Completed",
                              "example": 0
                            },
                            "failed": {
                              "type": "integer",
                              "description": "Failed",
                              "example": 0
                            }
                          }
                        },
                        "parseConfig": {
                          "type": "object",
                          "description": "Parsing configuration",
                          "properties": {
                            "extractImageElements": {
                              "type": "boolean",
                              "example": true
                            },
                            "parseScannedDocument": {
                              "type": "boolean",
                              "example": false
                            },
                            "language": {
                              "type": "string",
                              "example": "zh-CN"
                            },
                            "normalizeWhitespaceAndLineBreaks": {
                              "type": "boolean",
                              "example": false
                            },
                            "removeUrlsAndEmails": {
                              "type": "boolean",
                              "example": false
                            }
                          }
                        },
                        "chunkConfig": {
                          "type": "object",
                          "description": "Chunking configuration",
                          "properties": {
                            "mode": {
                              "type": "string",
                              "example": "hierarchical"
                            },
                            "hierarchical": {
                              "type": "object",
                              "properties": {
                                "level": {
                                  "type": "integer",
                                  "example": 1
                                },
                                "preserveHierarchyInfo": {
                                  "type": "boolean",
                                  "example": true
                                }
                              }
                            },
                            "custom": {
                              "type": "object",
                              "properties": {
                                "separator": {
                                  "type": "string",
                                  "example": "\n\n"
                                },
                                "maxSegmentLength": {
                                  "type": "integer",
                                  "example": 1000
                                },
                                "overlapPercent": {
                                  "type": "integer",
                                  "example": 10
                                }
                              }
                            }
                          }
                        },
                        "entitlement": {
                          "type": "object",
                          "description": "Entitlement information",
                          "properties": {
                            "resourceType": {
                              "type": "string",
                              "example": "knowledge_unit"
                            },
                            "estimatedConsume": {
                              "type": "integer",
                              "description": "Estimated usage",
                              "example": 138
                            },
                            "actualConsume": {
                              "type": "integer",
                              "description": "Actual usage",
                              "example": 5
                            },
                            "balanceRemain": {
                              "type": "integer",
                              "description": "Remaining balance",
                              "example": 12480
                            }
                          }
                        },
                        "errors": {
                          "type": "array",
                          "description": "Error list",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string",
                                "description": "Error code",
                                "example": "FILE_NOT_FOUND"
                              },
                              "message": {
                                "type": "string",
                                "description": "Error information",
                                "example": "File not found"
                              }
                            }
                          }
                        },
                        "createdAt": {
                          "type": "integer",
                          "format": "int64",
                          "description": "Creation timestamp in milliseconds.",
                          "example": 1776667072000
                        }
                      }
                    }
                  }
                },
                "example": {
                  "code": 200,
                  "message": "success",
                  "requestId": "req_01K23P7R4M6W8Q9JAB",
                  "data": {
                    "taskId": "ktask_01K23P7W8D5N2X4QYZ",
                    "status": "task.progress",
                    "sourceSummary": {
                      "total": 3,
                      "accepted": 3,
                      "rejected": 0
                    },
                    "parseConfig": {
                      "extractImageElements": true,
                      "parseScannedDocument": false,
                      "language": "zh-CN",
                      "normalizeWhitespaceAndLineBreaks": false,
                      "removeUrlsAndEmails": false
                    },
                    "chunkConfig": {
                      "mode": "hierarchical",
                      "hierarchical": {
                        "level": 1,
                        "preserveHierarchyInfo": true
                      }
                    },
                    "entitlement": {
                      "resourceType": "knowledge_unit",
                      "estimatedConsume": 3,
                      "actualConsume": 0,
                      "balanceRemain": 1000
                    },
                    "errors": [],
                    "createdAt": 1776667072000
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "Error status code",
                      "example": 400
                    },
                    "message": {
                      "type": "string",
                      "description": "Error information",
                      "example": "Sources are required"
                    },
                    "data": {
                      "type": "null",
                      "description": "Returns null when an error occurs."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "sources",
                  "chunkConfig"
                ],
                "properties": {
                  "sources": {
                    "type": "array",
                    "description": "Knowledge source list",
                    "minItems": 1,
                    "items": {
                      "description": "Knowledge source. Supported types: `uploaded_file`, `remote_file`, and `raw_text`."
                    }
                  },
                  "parseConfig": {
                    "type": "object",
                    "description": "Document parsing configuration",
                    "properties": {
                      "extractImageElements": {
                        "type": "boolean",
                        "description": "Whether to extract image elements.",
                        "default": true,
                        "example": true
                      },
                      "parseScannedDocument": {
                        "type": "boolean",
                        "description": "Whether to parse scanned documents.",
                        "default": false,
                        "example": false
                      },
                      "language": {
                        "type": "string",
                        "description": "Document language",
                        "default": "zh-CN",
                        "example": "zh-CN"
                      },
                      "normalizeWhitespaceAndLineBreaks": {
                        "type": "boolean",
                        "description": "Whether to normalize whitespace and line breaks.",
                        "default": false,
                        "example": false
                      },
                      "removeUrlsAndEmails": {
                        "type": "boolean",
                        "description": "Whether to remove URLs and email addresses.",
                        "default": false,
                        "example": false
                      }
                    }
                  },
                  "chunkConfig": {
                    "type": "object",
                    "required": [
                      "mode"
                    ],
                    "description": "Chunking configuration",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "enum": [
                          "hierarchical",
                          "custom"
                        ],
                        "description": "Chunking mode",
                        "example": "hierarchical"
                      },
                      "hierarchical": {
                        "type": "object",
                        "description": "Hierarchical chunking settings. Used when `mode=hierarchical`.",
                        "properties": {
                          "level": {
                            "type": "integer",
                            "description": "Hierarchy depth",
                            "minimum": 1,
                            "maximum": 10,
                            "example": 1
                          },
                          "preserveHierarchyInfo": {
                            "type": "boolean",
                            "description": "Whether to preserve hierarchy information.",
                            "example": true
                          }
                        }
                      },
                      "custom": {
                        "type": "object",
                        "description": "Custom chunking settings. Used when `mode=custom`.",
                        "properties": {
                          "separator": {
                            "type": "string",
                            "description": "Chunk delimiter",
                            "example": "\n\n"
                          },
                          "maxSegmentLength": {
                            "type": "integer",
                            "description": "Maximum chunk length",
                            "minimum": 100,
                            "maximum": 5000,
                            "example": 1000
                          },
                          "overlapPercent": {
                            "type": "integer",
                            "description": "Overlap percentage (0–100).",
                            "minimum": 0,
                            "maximum": 100,
                            "example": 10
                          }
                        }
                      }
                    }
                  },
                  "callback": {
                    "type": "object",
                    "description": "Callback notification settings",
                    "properties": {
                      "url": {
                        "type": "string",
                        "format": "uri",
                        "description": "Callback URL",
                        "example": "https://client.example.com/webhooks/3chat/knowledge"
                      },
                      "events": {
                        "type": "array",
                        "description": "Subscribed event type",
                        "items": {
                          "type": "string",
                          "description": "Subscribed event list",
                          "enum": [
                            "file.uploading",
                            "file.parsing",
                            "file.completed",
                            "file.failed",
                            "knowledge.task.completed",
                            "knowledge.task.failed"
                          ]
                        },
                        "example": [
                          "file.uploading",
                          "file.parsing",
                          "file.completed",
                          "file.failed"
                        ]
                      },
                      "secret": {
                        "type": "string",
                        "description": "Callback signing secret, passed in the `Authorization` request header.",
                        "example": "whsec_xxx"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/open/v4/butler/knowledge/tasks/{taskId}": {
      "get": {
        "summary": "Get Knowledge Processing Task",
        "deprecated": false,
        "description": "Retrieve the details and processing progress of a knowledge-processing task by task ID.\n\n**Task statuses:**\n- `task.progress`: Processing\n- `task.completed`: Completed\n- `task.failed`: Failed\n\n**Per-file statuses:**\n- `file.uploading`: Uploading\n- `file.parsing`: Parsing\n- `file.completed`: Completed\n- `file.failed`: Failed\n",
        "operationId": "getKnowledgeTask",
        "tags": [
          "Knowledge Base/API"
        ],
        "responses": {
          "200": {
            "description": "Query successful",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "Status code",
                      "example": 200
                    },
                    "message": {
                      "type": "string",
                      "description": "Status message",
                      "example": "success"
                    },
                    "requestId": {
                      "type": "string",
                      "description": "Request ID",
                      "example": "req_01K23Q3M2D8R4W7XYS"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "taskId": {
                          "type": "string",
                          "description": "Task ID",
                          "example": "ktask_01K23P7W8D5N2X4QYZ"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "task.progress",
                            "task.completed",
                            "task.failed"
                          ],
                          "description": "Task status",
                          "example": "task.progress"
                        },
                        "sourceSummary": {
                          "type": "object",
                          "description": "Source summary",
                          "properties": {
                            "total": {
                              "type": "integer",
                              "description": "Total",
                              "example": 2
                            },
                            "accepted": {
                              "type": "integer",
                              "description": "Accepted",
                              "example": 2
                            },
                            "rejected": {
                              "type": "integer",
                              "description": "Rejected",
                              "example": 0
                            },
                            "queued": {
                              "type": "integer",
                              "description": "Queued",
                              "example": 0
                            },
                            "uploading": {
                              "type": "integer",
                              "description": "Uploading",
                              "example": 0
                            },
                            "parsing": {
                              "type": "integer",
                              "description": "Parsing",
                              "example": 1
                            },
                            "completed": {
                              "type": "integer",
                              "description": "Completed",
                              "example": 1
                            },
                            "failed": {
                              "type": "integer",
                              "description": "Failed",
                              "example": 0
                            }
                          }
                        },
                        "sources": {
                          "type": "array",
                          "description": "Source list and statuses",
                          "items": {
                            "type": "object",
                            "properties": {
                              "sourceId": {
                                "type": "string",
                                "description": "Caller-defined source ID used for reconciliation.",
                                "example": "src_1"
                              },
                              "internalId": {
                                "type": "string",
                                "description": "Internal source ID used for status indexing.",
                                "example": "int_01K23Q1W9A4V6N8R5P"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "uploaded_file",
                                  "remote_file",
                                  "raw_text"
                                ],
                                "description": "Source type",
                                "example": "uploaded_file"
                              },
                              "displayName": {
                                "type": "string",
                                "description": "Display name",
                                "example": "product-manual.pdf"
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "queued",
                                  "file.uploading",
                                  "file.parsing",
                                  "file.completed",
                                  "file.failed"
                                ],
                                "description": "Processing status",
                                "example": "file.completed"
                              },
                              "documentId": {
                                "type": "string",
                                "description": "Document ID, returned after processing succeeds.",
                                "example": "doc_01K23Q1W9A4V6N8R5P"
                              },
                              "errorCode": {
                                "type": "string",
                                "description": "Error code, returned on failure.",
                                "example": "FILE_DOWNLOAD_FAILED"
                              },
                              "errorMessage": {
                                "type": "string",
                                "description": "Error message, returned on failure.",
                                "example": "Unable to download the remote file."
                              }
                            }
                          }
                        },
                        "entitlement": {
                          "type": "object",
                          "description": "Entitlement information",
                          "properties": {
                            "resourceType": {
                              "type": "string",
                              "example": "knowledge_unit"
                            },
                            "estimatedConsume": {
                              "type": "integer",
                              "description": "Estimated usage",
                              "example": 138
                            },
                            "actualConsume": {
                              "type": "integer",
                              "description": "Actual usage",
                              "example": 5
                            },
                            "balanceRemain": {
                              "type": "integer",
                              "description": "Remaining balance",
                              "example": 12480
                            }
                          }
                        },
                        "errors": {
                          "type": "array",
                          "description": "Error list",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string",
                                "description": "Error code",
                                "example": "FILE_DOWNLOAD_FAILED"
                              },
                              "message": {
                                "type": "string",
                                "description": "Error information",
                                "example": "Unable to download the remote file."
                              }
                            }
                          }
                        },
                        "createdAt": {
                          "type": "integer",
                          "format": "int64",
                          "description": "Creation timestamp in milliseconds.",
                          "example": 1776667072000
                        },
                        "updatedAt": {
                          "type": "integer",
                          "format": "int64",
                          "description": "Last-updated timestamp in milliseconds.",
                          "example": 1776667072000
                        },
                        "completedAt": {
                          "type": "integer",
                          "format": "int64",
                          "description": "Completion time, Unix timestamp in milliseconds.",
                          "example": 1776667085000
                        }
                      }
                    }
                  }
                },
                "example": {
                  "code": 200,
                  "message": "success",
                  "data": {
                    "taskId": "a47e4576-b921-4cae-b7b6-8a04ceaf00db",
                    "status": "task.progress",
                    "sourceSummary": {
                      "total": 3,
                      "accepted": 3,
                      "rejected": 0,
                      "queued": 0,
                      "uploading": 0,
                      "parsing": 0,
                      "completed": 3,
                      "failed": 0
                    },
                    "sources": [
                      {
                        "sourceId": "my_src_1",
                        "internalId": "33502bea-0ffb-452d-8774-4267b139ac00",
                        "type": "uploaded_file",
                        "displayName": "medical-knowledge-base.md",
                        "status": "file.completed",
                        "documentId": "64da8c4d-6cb1-423b-804a-9b12905a0dac"
                      },
                      {
                        "sourceId": "my_src_2",
                        "internalId": "1bc42419-4733-4dc5-b3f1-a3c1de39c6e8",
                        "type": "remote_file",
                        "displayName": "contacts.xlsx",
                        "status": "file.completed",
                        "documentId": "febadcb5-344e-413a-9400-5a6433fb8677"
                      },
                      {
                        "sourceId": "my_src_3",
                        "internalId": "af71c665-aa97-4545-ac01-6aaafa9a2a38",
                        "type": "raw_text",
                        "displayName": "text-knowledge-base.txt",
                        "status": "file.completed",
                        "documentId": "c1544869-efbf-417c-a739-4dc15040bc58"
                      }
                    ],
                    "entitlement": {
                      "resourceType": "knowledge_unit",
                      "estimatedConsume": 3,
                      "actualConsume": 3,
                      "balanceRemain": 10
                    },
                    "errors": [],
                    "createdAt": 1778208780078,
                    "updatedAt": 1778208802846
                  }
                }
              }
            }
          },
          "404": {
            "description": "Task not found.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 404
                    },
                    "message": {
                      "type": "string",
                      "example": "Task not found"
                    },
                    "data": {
                      "type": "null"
                    }
                  }
                },
                "example": {
                  "code": 404,
                  "message": "Task not found",
                  "data": null
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "taskId",
            "in": "path",
            "description": "Task ID",
            "required": true,
            "x-example": "",
            "schema": {
              "type": "string"
            },
            "example": ""
          }
        ]
      }
    },
    "/api/open/v4/butler/knowledge/delete": {
      "post": {
        "summary": "Delete Knowledge Bases",
        "deprecated": false,
        "description": "Delete Knowledge Bases in bulk by Knowledge Base ID.",
        "tags": [
          "Knowledge Base/API"
        ],
        "responses": {
          "200": {
            "description": "",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KnowledgeDeleteParams",
                "description": ""
              }
            }
          }
        }
      }
    },
    "/api/open/v4/butler/group/update": {
      "post": {
        "summary": "Update Chat Group",
        "deprecated": false,
        "description": "Update the basic information and custom fields of a Butler chat group.",
        "tags": [
          "Chat Group/API"
        ],
        "responses": {
          "200": {
            "description": "",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "message": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "code"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "Chat group name"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "avatar": {
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "Chat group avatar"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "extendMap": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {},
                        "description": "Custom fields"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "id"
                ]
              }
            }
          }
        }
      }
    },
    "/api/open/v3/butlergroup/query": {
      "post": {
        "summary": "List Chat Groups",
        "deprecated": false,
        "description": "",
        "operationId": "QUERYbutlergroupList",
        "tags": [
          "Chat Group/API"
        ],
        "responses": {
          "200": {
            "description": "",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "200 = success; 400 = invalid parameters; 500 = internal server error."
                    },
                    "message": {
                      "type": "string",
                      "description": ""
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "list": {
                          "type": "array",
                          "description": "",
                          "items": {
                            "type": "object",
                            "properties": {
                              "updatedTime": {
                                "type": "integer",
                                "description": "Last updated time, Unix timestamp in milliseconds.",
                                "format": "int64"
                              },
                              "lookup_2e4hdgd7hg": {
                                "type": "string",
                                "description": "Channel type, 110=Shopify, 111=Facebook, 112=Instagram, 113=Sandbox, 114=SHOPLINE, 115=WeChat Shop, 118=Personal WeChat Account, 10=DingTalk, 11=Feishu, 12=Xiaohongshu (RED), 13=WeChat Official Account (old), 14=Feishu (old), 15=Lazada (old), 16=openApi (old), 17=WeCom (old), 18=Chatly (old), 19=Unknown, 0=0, 1=WeChat, 200=Manychat, 101=Email, 2=WeCom, 201=Instagram(Manychat), 102=Livechat, 3=WeChat Official Account, 202=TikTok(Manychat), 103=WeChat Official Account, 4=WhatsApp, 203=WhatsApp(Manychat), 104=Feishu, 5=WeChat Customer Service, 204=Facebook(Manychat), 105=Lazada, 6=TikTok, 205=SMS(Manychat), 106=OpenAPI, 7=WeChat Mini Program, 206=Email(Manychat), 107=WeChat Customer Service, 8=Douyin, 207=Telegram(Manychat), 108=Chatly, 9=Instagram, 109=Unknown, 20=Shopify (old)"
                              },
                              "dataId": {
                                "type": "string",
                                "description": "Data ID"
                              },
                              "name": {
                                "type": "string",
                                "description": "Group name"
                              },
                              "createdTime": {
                                "type": "integer",
                                "description": "Creation time, Unix timestamp in milliseconds.",
                                "format": "int64"
                              },
                              "externalGroupId": {
                                "type": "string",
                                "description": "Platform group ID"
                              },
                              "avatar": {
                                "type": "object",
                                "description": "Group avatar",
                                "properties": {}
                              }
                            }
                          }
                        },
                        "start": {
                          "type": "integer",
                          "description": ""
                        },
                        "length": {
                          "type": "integer",
                          "description": ""
                        },
                        "recordsTotal": {
                          "type": "integer",
                          "description": ""
                        }
                      },
                      "description": ""
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "body"
                ],
                "type": "object",
                "properties": {
                  "body": {
                    "required": [
                      "paging"
                    ],
                    "type": "object",
                    "properties": {
                      "conditions": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "description": "Chat group ID",
                            "type": "object",
                            "required": [
                              "conditionType"
                            ],
                            "properties": {
                              "conditionType": {
                                "type": "string",
                                "description": "KEYWORD: exact match",
                                "enum": [
                                  "KEYWORD"
                                ]
                              },
                              "value": {
                                "type": "string"
                              }
                            }
                          },
                          "updatedTime": {
                            "description": "Last updated time, Unix timestamp in milliseconds (time-range filter).",
                            "type": "object",
                            "required": [
                              "conditionType"
                            ],
                            "properties": {
                              "conditionType": {
                                "type": "string",
                                "description": "{FUZZY=fuzzy-match filtering, KEYWORD=exact-match filtering, FILTER=multi-value filtering, TIME_RANGE=time-range filtering}",
                                "enum": [
                                  "TIME_RANGE"
                                ]
                              },
                              "timeRange": {
                                "type": "object",
                                "properties": {
                                  "start": {
                                    "type": "integer",
                                    "format": "int64",
                                    "description": "Start time, Unix timestamp in milliseconds."
                                  },
                                  "end": {
                                    "type": "integer",
                                    "format": "int64",
                                    "description": "End time, Unix timestamp in milliseconds."
                                  }
                                },
                                "description": ""
                              }
                            }
                          },
                          "name": {
                            "description": "Group name (supports fuzzy and exact matching).",
                            "type": "object",
                            "required": [
                              "conditionType"
                            ],
                            "properties": {
                              "conditionType": {
                                "type": "string",
                                "description": "FUZZY: fuzzy-match filtering; KEYWORD: exact-match filtering",
                                "enum": [
                                  "FUZZY",
                                  "KEYWORD",
                                  "FILTER"
                                ]
                              },
                              "value": {
                                "type": "string",
                                "description": ""
                              }
                            }
                          },
                          "createdTime": {
                            "description": "Creation time, Unix timestamp in milliseconds (time-range filter).",
                            "type": "object",
                            "required": [
                              "conditionType"
                            ],
                            "properties": {
                              "conditionType": {
                                "type": "string",
                                "description": "{FUZZY=fuzzy-match filtering, KEYWORD=exact-match filtering, FILTER=multi-value filtering, TIME_RANGE=time-range filtering}",
                                "enum": [
                                  "TIME_RANGE"
                                ]
                              },
                              "timeRange": {
                                "type": "object",
                                "properties": {
                                  "start": {
                                    "type": "integer",
                                    "format": "int64",
                                    "description": "Start time, Unix timestamp in milliseconds."
                                  },
                                  "end": {
                                    "type": "integer",
                                    "format": "int64",
                                    "description": "End time, Unix timestamp in milliseconds."
                                  }
                                },
                                "description": ""
                              }
                            }
                          },
                          "externalGroupId": {
                            "description": "Platform group ID (supports fuzzy and exact matching).",
                            "type": "object",
                            "required": [
                              "conditionType"
                            ],
                            "properties": {
                              "conditionType": {
                                "type": "string",
                                "description": "FUZZY: fuzzy-match filtering; KEYWORD: exact-match filtering",
                                "enum": [
                                  "FUZZY",
                                  "KEYWORD"
                                ]
                              },
                              "value": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      },
                      "sorts": {
                        "type": "array",
                        "description": "",
                        "items": {
                          "$ref": "#/components/schemas/butlergroup_sort"
                        }
                      },
                      "extendFieldParams": {
                        "type": "array",
                        "description": "Custom-field query parameters",
                        "items": {
                          "required": [
                            "conditionType",
                            "key"
                          ],
                          "type": "object",
                          "properties": {
                            "conditionType": {
                              "type": "string",
                              "description": "{NONE=NONE, FUZZY=FUZZY, KEYWORD=KEYWORD, FILTER=FILTER, TIME_RANGE=TIME_RANGE, OBJECT_FILTER=OBJECT_FILTER}",
                              "enum": [
                                "NONE",
                                "FUZZY",
                                "KEYWORD",
                                "FILTER",
                                "TIME_RANGE",
                                "OBJECT_FILTER"
                              ]
                            },
                            "filter": {
                              "type": "array",
                              "description": "conditionType=FILTER",
                              "items": {
                                "type": "string"
                              }
                            },
                            "value": {
                              "type": "string",
                              "description": "conditionType=FUZZY/KEYWORD"
                            },
                            "timeRange": {
                              "type": "object",
                              "properties": {
                                "start": {
                                  "minimum": 0.01,
                                  "type": "string",
                                  "description": "Start time, 13-digit Unix timestamp in milliseconds."
                                },
                                "end": {
                                  "minimum": 0.01,
                                  "type": "string",
                                  "description": "End time, 13-digit Unix timestamp in milliseconds."
                                }
                              },
                              "description": "conditionType=TIME_RANGE"
                            },
                            "key": {
                              "type": "string",
                              "description": "Custom-field key"
                            }
                          },
                          "description": "Custom query condition."
                        }
                      },
                      "paging": {
                        "required": [
                          "length",
                          "start"
                        ],
                        "type": "object",
                        "properties": {
                          "start": {
                            "minimum": 0,
                            "type": "integer",
                            "description": "Pagination offset"
                          },
                          "length": {
                            "maximum": 500,
                            "minimum": 1,
                            "type": "integer",
                            "description": "Page size"
                          }
                        },
                        "description": ""
                      }
                    },
                    "description": "Request body"
                  }
                },
                "description": ""
              }
            }
          }
        }
      }
    },
    "/api/open/v4/butler/agent/skills/createOrUpdate": {
      "post": {
        "summary": "Create or Update Skill",
        "deprecated": false,
        "description": "",
        "tags": [
          "Skill/API"
        ],
        "responses": {
          "200": {
            "description": "",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Skill ID"
                  },
                  "title": {
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "Skill title"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "type": {
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "Skill type",
                        "enum": [
                          "custom",
                          "portrait",
                          "recommendation"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "askProactively": {
                    "anyOf": [
                      {
                        "type": "boolean",
                        "description": "Whether proactive follow-up is enabled."
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "status": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "run",
                          "pause"
                        ],
                        "description": "Status"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "id"
                ]
              }
            }
          }
        }
      }
    },
    "/api/open/v3/butlerskill/query": {
      "post": {
        "summary": "List Skills",
        "deprecated": false,
        "description": "",
        "tags": [
          "Skill/API"
        ],
        "responses": {
          "200": {
            "description": "",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "200 = success; 400 = invalid parameters; 500 = internal server error."
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "list": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "Skill ID"
                              },
                              "dataId": {
                                "type": "string",
                                "description": "Skill data ID (kept for compatibility with data created before 26.06)."
                              },
                              "title": {
                                "type": "string",
                                "description": "Skill title"
                              },
                              "effectiveChannels": {
                                "type": "string",
                                "description": "Trigger channel",
                                "enum": [
                                  "email",
                                  "liveChat",
                                  "wechatPublic",
                                  "feishu",
                                  "qywechat",
                                  "wxxd",
                                  "chatly",
                                  "manychat",
                                  "openApi",
                                  "unkown"
                                ]
                              },
                              "status": {
                                "type": "string",
                                "description": "Skill status",
                                "enum": [
                                  "0",
                                  "1",
                                  "2"
                                ]
                              },
                              "type": {
                                "type": "string",
                                "description": "Skill type",
                                "enum": [
                                  "custom",
                                  "portrait",
                                  "recommendation"
                                ]
                              },
                              "askProactively": {
                                "type": "boolean",
                                "description": "Whether proactive follow-up is enabled."
                              },
                              "runTimes": {
                                "type": "integer",
                                "description": "Run count"
                              },
                              "lastTriggerTime": {
                                "type": "integer",
                                "description": "Last triggered time"
                              },
                              "lastPublishTime": {
                                "type": "integer",
                                "description": "Last published time"
                              },
                              "createdTime": {
                                "type": "integer",
                                "description": "created time"
                              },
                              "updatedTime": {
                                "type": "integer",
                                "description": "updated time"
                              }
                            },
                            "required": [
                              "id",
                              "dataId"
                            ]
                          }
                        },
                        "start": {
                          "type": "integer"
                        },
                        "length": {
                          "type": "integer"
                        },
                        "recordsTotal": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "list",
                        "start",
                        "length",
                        "recordsTotal"
                      ]
                    }
                  },
                  "required": [
                    "code"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "body"
                ],
                "type": "object",
                "properties": {
                  "body": {
                    "required": [
                      "paging"
                    ],
                    "type": "object",
                    "properties": {
                      "conditions": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "description": "Skill ID",
                            "type": "object",
                            "required": [
                              "conditionType"
                            ],
                            "properties": {
                              "conditionType": {
                                "type": "string",
                                "description": "KEYWORD: exact match",
                                "enum": [
                                  "KEYWORD"
                                ]
                              },
                              "value": {
                                "type": "string"
                              }
                            }
                          },
                          "updatedTime": {
                            "description": "Last updated time, Unix timestamp in milliseconds (time-range filter).",
                            "type": "object",
                            "required": [
                              "conditionType"
                            ],
                            "properties": {
                              "conditionType": {
                                "type": "string",
                                "description": "{FUZZY=fuzzy-match filtering, KEYWORD=exact-match filtering, FILTER=multi-value filtering, TIME_RANGE=time-range filtering}",
                                "enum": [
                                  "TIME_RANGE"
                                ]
                              },
                              "timeRange": {
                                "type": "object",
                                "properties": {
                                  "start": {
                                    "type": "integer",
                                    "format": "int64",
                                    "description": "Start time, Unix timestamp in milliseconds."
                                  },
                                  "end": {
                                    "type": "integer",
                                    "format": "int64",
                                    "description": "End time, Unix timestamp in milliseconds."
                                  }
                                },
                                "description": ""
                              }
                            }
                          },
                          "createdTime": {
                            "description": "Creation time, Unix timestamp in milliseconds (time-range filter).",
                            "type": "object",
                            "required": [
                              "conditionType"
                            ],
                            "properties": {
                              "conditionType": {
                                "type": "string",
                                "description": "{FUZZY=fuzzy-match filtering, KEYWORD=exact-match filtering, FILTER=multi-value filtering, TIME_RANGE=time-range filtering}",
                                "enum": [
                                  "TIME_RANGE"
                                ]
                              },
                              "timeRange": {
                                "type": "object",
                                "properties": {
                                  "start": {
                                    "type": "integer",
                                    "format": "int64",
                                    "description": "Start time, Unix timestamp in milliseconds."
                                  },
                                  "end": {
                                    "type": "integer",
                                    "format": "int64",
                                    "description": "End time, Unix timestamp in milliseconds."
                                  }
                                },
                                "description": ""
                              }
                            }
                          },
                          "title": {
                            "description": "Skill name (supports fuzzy and exact matching).",
                            "type": "object",
                            "required": [
                              "conditionType"
                            ],
                            "properties": {
                              "conditionType": {
                                "type": "string",
                                "description": "FUZZY: fuzzy-match filtering; KEYWORD: exact-match filtering",
                                "enum": [
                                  "FUZZY",
                                  "KEYWORD",
                                  "FILTER"
                                ]
                              },
                              "value": {
                                "type": "string",
                                "description": ""
                              }
                            }
                          },
                          "type": {
                            "type": "object",
                            "properties": {
                              "conditionType": {
                                "type": "string",
                                "description": "FILTER"
                              },
                              "filter": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "custom",
                                    "portrait",
                                    "recommendation"
                                  ]
                                }
                              }
                            },
                            "description": "Filter by skill type",
                            "required": [
                              "conditionType",
                              "filter"
                            ]
                          },
                          "status": {
                            "type": "object",
                            "properties": {
                              "conditionType": {
                                "type": "string",
                                "description": "FILTER"
                              },
                              "filter": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "0",
                                    "1",
                                    "2"
                                  ]
                                }
                              }
                            },
                            "description": "Filter by skill status",
                            "required": [
                              "conditionType",
                              "filter"
                            ]
                          },
                          "askProactively": {
                            "type": "object",
                            "properties": {
                              "conditionType": {
                                "type": "string",
                                "description": "FILTER"
                              },
                              "filter": {
                                "type": "array",
                                "items": {
                                  "type": "boolean"
                                }
                              }
                            },
                            "description": "Filter by proactive follow-up setting",
                            "required": [
                              "conditionType",
                              "filter"
                            ]
                          }
                        }
                      },
                      "sorts": {
                        "type": "array",
                        "description": "",
                        "items": {
                          "$ref": "#/components/schemas/butlergroup_sort"
                        }
                      },
                      "paging": {
                        "required": [
                          "length",
                          "start"
                        ],
                        "type": "object",
                        "properties": {
                          "start": {
                            "minimum": 0,
                            "type": "integer",
                            "description": "Pagination offset"
                          },
                          "length": {
                            "maximum": 500,
                            "minimum": 1,
                            "type": "integer",
                            "description": "Page size"
                          }
                        },
                        "description": ""
                      }
                    },
                    "description": "Request body"
                  }
                },
                "description": ""
              }
            }
          }
        }
      }
    },
    "/api/open/v3/staffs/create": {
      "post": {
        "summary": "Create Staff Member",
        "deprecated": false,
        "description": "Create Staff Member",
        "tags": [
          "User & Tenant Domain/Staff/API"
        ],
        "responses": {
          "200": {
            "description": "",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BaseResponse",
                  "description": "Base HTTP response information."
                },
                "example": {
                  "code": 0,
                  "message": ""
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestParameterStaffSaveV3Param",
                "description": ""
              }
            }
          }
        }
      }
    },
    "/api/open/v3/staffs/update": {
      "post": {
        "summary": "Update Staff Member",
        "deprecated": false,
        "description": "Update Staff Member",
        "tags": [
          "User & Tenant Domain/Staff/API"
        ],
        "responses": {
          "200": {
            "description": "",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BaseResponse",
                  "description": "Base HTTP response information."
                },
                "example": {
                  "code": 0,
                  "message": ""
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestParameterStaffSaveV3Param",
                "description": ""
              }
            }
          }
        }
      }
    },
    "/api/open/v3/staff/query": {
      "post": {
        "summary": "List Staff Members",
        "deprecated": false,
        "description": "",
        "operationId": "QUERYstaffList",
        "tags": [
          "User & Tenant Domain/Staff/API"
        ],
        "responses": {
          "200": {
            "description": "",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": ""
                    },
                    "message": {
                      "type": "string",
                      "description": ""
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "list": {
                          "type": "array",
                          "description": "",
                          "items": {
                            "$ref": "#/components/schemas/staff"
                          }
                        },
                        "start": {
                          "type": "integer",
                          "description": ""
                        },
                        "length": {
                          "type": "integer",
                          "description": ""
                        },
                        "recordsTotal": {
                          "type": "integer",
                          "description": ""
                        }
                      },
                      "description": ""
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "viewKey",
            "in": "query",
            "description": "",
            "required": true,
            "x-example": "",
            "schema": {
              "type": "string"
            },
            "example": ""
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "body"
                ],
                "type": "object",
                "properties": {
                  "body": {
                    "required": [
                      "paging"
                    ],
                    "type": "object",
                    "properties": {
                      "conditions": {
                        "$ref": "#/components/schemas/staff_filter"
                      },
                      "sorts": {
                        "type": "array",
                        "description": "",
                        "items": {
                          "$ref": "#/components/schemas/staff_sort"
                        }
                      },
                      "extendFieldParams": {
                        "type": "array",
                        "description": "Custom-field query parameters",
                        "items": {
                          "required": [
                            "conditionType",
                            "key"
                          ],
                          "type": "object",
                          "properties": {
                            "conditionType": {
                              "type": "string",
                              "description": "{NONE=NONE, FUZZY=FUZZY, KEYWORD=KEYWORD, FILTER=FILTER, TIME_RANGE=TIME_RANGE, OBJECT_FILTER=OBJECT_FILTER}",
                              "enum": [
                                "NONE",
                                "FUZZY",
                                "KEYWORD",
                                "FILTER",
                                "TIME_RANGE",
                                "OBJECT_FILTER"
                              ]
                            },
                            "filter": {
                              "type": "array",
                              "description": "conditionType=FILTER",
                              "items": {
                                "type": "string"
                              }
                            },
                            "value": {
                              "type": "string",
                              "description": "conditionType=FUZZY/KEYWORD"
                            },
                            "timeRange": {
                              "type": "object",
                              "properties": {
                                "start": {
                                  "minimum": 0.01,
                                  "type": "string",
                                  "description": "Start time, 13-digit Unix timestamp in milliseconds."
                                },
                                "end": {
                                  "minimum": 0.01,
                                  "type": "string",
                                  "description": "End time, 13-digit Unix timestamp in milliseconds."
                                }
                              },
                              "description": "conditionType=TIME_RANGE"
                            },
                            "key": {
                              "type": "string",
                              "description": "Custom-field key"
                            }
                          },
                          "description": "Custom query condition."
                        }
                      },
                      "paging": {
                        "required": [
                          "length",
                          "start"
                        ],
                        "type": "object",
                        "properties": {
                          "start": {
                            "minimum": 0,
                            "type": "integer",
                            "description": "Pagination offset"
                          },
                          "length": {
                            "maximum": 500,
                            "minimum": 1,
                            "type": "integer",
                            "description": "Page size"
                          }
                        },
                        "description": ""
                      }
                    },
                    "description": "Request body"
                  }
                },
                "description": ""
              }
            }
          }
        }
      }
    },
    "/api/open/v3/currentStaff/query": {
      "post": {
        "summary": "Get Current Staff Member",
        "deprecated": false,
        "description": "Create Staff Member",
        "tags": [
          "User & Tenant Domain/Staff/API"
        ],
        "responses": {
          "200": {
            "description": "",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "entity": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer"
                            },
                            "name": {
                              "type": "string"
                            },
                            "employeeId": {
                              "type": "string"
                            },
                            "headPortrait": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "id",
                            "name",
                            "employeeId",
                            "headPortrait"
                          ]
                        }
                      },
                      "required": [
                        "entity"
                      ]
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "data"
                  ]
                },
                "example": {
                  "code": 39,
                  "message": "commodo",
                  "data": {
                    "entity": {
                      "id": 90,
                      "name": "Alex",
                      "employeeId": "96",
                      "headPortrait": "irure elit ut minim non"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/open/v3/staff/searchAfter": {
      "post": {
        "summary": "List Staff Members in Batches",
        "deprecated": false,
        "description": "",
        "operationId": "SEARCH_AFTERstaffList",
        "tags": [
          "User & Tenant Domain/Staff/API"
        ],
        "responses": {
          "200": {
            "description": "",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": ""
                    },
                    "message": {
                      "type": "string",
                      "description": ""
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "list": {
                          "type": "array",
                          "description": "",
                          "items": {
                            "$ref": "#/components/schemas/staff"
                          }
                        },
                        "start": {
                          "type": "integer",
                          "description": ""
                        },
                        "length": {
                          "type": "integer",
                          "description": ""
                        },
                        "recordsTotal": {
                          "type": "integer",
                          "description": ""
                        },
                        "boundaryIds": {
                          "type": "array",
                          "description": "The `boundaryIds` returned by this query. Pass them directly as `boundaryIds` in the next query.",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "description": ""
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "viewKey",
            "in": "query",
            "description": "",
            "required": true,
            "x-example": "",
            "schema": {
              "type": "string"
            },
            "example": ""
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "body"
                ],
                "type": "object",
                "properties": {
                  "body": {
                    "type": "object",
                    "properties": {
                      "conditions": {
                        "$ref": "#/components/schemas/staff_filter"
                      },
                      "sorts": {
                        "type": "array",
                        "description": "",
                        "items": {
                          "$ref": "#/components/schemas/staff_sort"
                        }
                      },
                      "extendFieldParams": {
                        "type": "array",
                        "description": "Custom-field query parameters",
                        "items": {
                          "required": [
                            "conditionType",
                            "key"
                          ],
                          "type": "object",
                          "properties": {
                            "conditionType": {
                              "type": "string",
                              "description": "{NONE=NONE, FUZZY=FUZZY, KEYWORD=KEYWORD, FILTER=FILTER, TIME_RANGE=TIME_RANGE, OBJECT_FILTER=OBJECT_FILTER}",
                              "enum": [
                                "NONE",
                                "FUZZY",
                                "KEYWORD",
                                "FILTER",
                                "TIME_RANGE",
                                "OBJECT_FILTER"
                              ]
                            },
                            "filter": {
                              "type": "array",
                              "description": "conditionType=FILTER",
                              "items": {
                                "type": "string"
                              }
                            },
                            "value": {
                              "type": "string",
                              "description": "conditionType=FUZZY/KEYWORD"
                            },
                            "timeRange": {
                              "type": "object",
                              "properties": {
                                "start": {
                                  "minimum": 0.01,
                                  "type": "string",
                                  "description": "Start time, 13-digit Unix timestamp in milliseconds."
                                },
                                "end": {
                                  "minimum": 0.01,
                                  "type": "string",
                                  "description": "End time, 13-digit Unix timestamp in milliseconds."
                                }
                              },
                              "description": "conditionType=TIME_RANGE"
                            },
                            "key": {
                              "type": "string",
                              "description": "Custom-field key"
                            }
                          },
                          "description": "Custom query condition."
                        }
                      },
                      "boundaryIds": {
                        "type": "array",
                        "description": "Starting ID. Use `null` for the first query.",
                        "items": {
                          "type": "string"
                        }
                      },
                      "length": {
                        "maximum": 2000,
                        "minimum": 1,
                        "type": "integer",
                        "description": "Number of records per query"
                      }
                    },
                    "description": "Request body"
                  }
                },
                "description": ""
              }
            }
          }
        }
      }
    },
    "/api/open/v3/department_staff_relation/query": {
      "post": {
        "summary": "Query Staff-Department Relationships",
        "deprecated": false,
        "description": "",
        "operationId": "QUERYdepartment_staff_relationList",
        "tags": [
          "User & Tenant Domain/Staff/API"
        ],
        "responses": {
          "200": {
            "description": "",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": ""
                    },
                    "message": {
                      "type": "string",
                      "description": ""
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "list": {
                          "type": "array",
                          "description": "",
                          "items": {
                            "$ref": "#/components/schemas/department_staff_relation"
                          }
                        },
                        "start": {
                          "type": "integer",
                          "description": ""
                        },
                        "length": {
                          "type": "integer",
                          "description": ""
                        },
                        "recordsTotal": {
                          "type": "integer",
                          "description": ""
                        }
                      },
                      "description": ""
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "viewKey",
            "in": "query",
            "description": "",
            "required": true,
            "x-example": "",
            "schema": {
              "type": "string"
            },
            "example": ""
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "body"
                ],
                "type": "object",
                "properties": {
                  "body": {
                    "required": [
                      "paging"
                    ],
                    "type": "object",
                    "properties": {
                      "conditions": {
                        "$ref": "#/components/schemas/department_staff_relation_filter"
                      },
                      "sorts": {
                        "type": "array",
                        "description": "",
                        "items": {
                          "$ref": "#/components/schemas/department_staff_relation_sort"
                        }
                      },
                      "extendFieldParams": {
                        "type": "array",
                        "description": "Custom-field query parameters",
                        "items": {
                          "required": [
                            "conditionType",
                            "key"
                          ],
                          "type": "object",
                          "properties": {
                            "conditionType": {
                              "type": "string",
                              "description": "{NONE=NONE, FUZZY=FUZZY, KEYWORD=KEYWORD, FILTER=FILTER, TIME_RANGE=TIME_RANGE, OBJECT_FILTER=OBJECT_FILTER}",
                              "enum": [
                                "NONE",
                                "FUZZY",
                                "KEYWORD",
                                "FILTER",
                                "TIME_RANGE",
                                "OBJECT_FILTER"
                              ]
                            },
                            "filter": {
                              "type": "array",
                              "description": "conditionType=FILTER",
                              "items": {
                                "type": "string"
                              }
                            },
                            "value": {
                              "type": "string",
                              "description": "conditionType=FUZZY/KEYWORD"
                            },
                            "timeRange": {
                              "type": "object",
                              "properties": {
                                "start": {
                                  "minimum": 0.01,
                                  "type": "string",
                                  "description": "Start time, 13-digit Unix timestamp in milliseconds."
                                },
                                "end": {
                                  "minimum": 0.01,
                                  "type": "string",
                                  "description": "End time, 13-digit Unix timestamp in milliseconds."
                                }
                              },
                              "description": "conditionType=TIME_RANGE"
                            },
                            "key": {
                              "type": "string",
                              "description": "Custom-field key"
                            }
                          },
                          "description": "Custom query condition."
                        }
                      },
                      "paging": {
                        "required": [
                          "length",
                          "start"
                        ],
                        "type": "object",
                        "properties": {
                          "start": {
                            "minimum": 0,
                            "type": "integer",
                            "description": "Pagination offset"
                          },
                          "length": {
                            "maximum": 500,
                            "minimum": 1,
                            "type": "integer",
                            "description": "Page size"
                          }
                        },
                        "description": ""
                      }
                    },
                    "description": "Request body"
                  }
                },
                "description": ""
              }
            }
          }
        }
      }
    },
    "/api/open/v3/department_staff_relation/searchAfter": {
      "post": {
        "summary": "Query Staff-Department Relationships in Batches",
        "deprecated": false,
        "description": "",
        "operationId": "SEARCH_AFTERdepartment_staff_relationList",
        "tags": [
          "User & Tenant Domain/Staff/API"
        ],
        "responses": {
          "200": {
            "description": "",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": ""
                    },
                    "message": {
                      "type": "string",
                      "description": ""
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "list": {
                          "type": "array",
                          "description": "",
                          "items": {
                            "$ref": "#/components/schemas/department_staff_relation"
                          }
                        },
                        "start": {
                          "type": "integer",
                          "description": ""
                        },
                        "length": {
                          "type": "integer",
                          "description": ""
                        },
                        "recordsTotal": {
                          "type": "integer",
                          "description": ""
                        },
                        "boundaryIds": {
                          "type": "array",
                          "description": "The `boundaryIds` returned by this query. Pass them directly as `boundaryIds` in the next query.",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "description": ""
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "viewKey",
            "in": "query",
            "description": "",
            "required": true,
            "x-example": "",
            "schema": {
              "type": "string"
            },
            "example": ""
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "body"
                ],
                "type": "object",
                "properties": {
                  "body": {
                    "type": "object",
                    "properties": {
                      "conditions": {
                        "$ref": "#/components/schemas/department_staff_relation_filter"
                      },
                      "sorts": {
                        "type": "array",
                        "description": "",
                        "items": {
                          "$ref": "#/components/schemas/department_staff_relation_sort"
                        }
                      },
                      "extendFieldParams": {
                        "type": "array",
                        "description": "Custom-field query parameters",
                        "items": {
                          "required": [
                            "conditionType",
                            "key"
                          ],
                          "type": "object",
                          "properties": {
                            "conditionType": {
                              "type": "string",
                              "description": "{NONE=NONE, FUZZY=FUZZY, KEYWORD=KEYWORD, FILTER=FILTER, TIME_RANGE=TIME_RANGE, OBJECT_FILTER=OBJECT_FILTER}",
                              "enum": [
                                "NONE",
                                "FUZZY",
                                "KEYWORD",
                                "FILTER",
                                "TIME_RANGE",
                                "OBJECT_FILTER"
                              ]
                            },
                            "filter": {
                              "type": "array",
                              "description": "conditionType=FILTER",
                              "items": {
                                "type": "string"
                              }
                            },
                            "value": {
                              "type": "string",
                              "description": "conditionType=FUZZY/KEYWORD"
                            },
                            "timeRange": {
                              "type": "object",
                              "properties": {
                                "start": {
                                  "minimum": 0.01,
                                  "type": "string",
                                  "description": "Start time, 13-digit Unix timestamp in milliseconds."
                                },
                                "end": {
                                  "minimum": 0.01,
                                  "type": "string",
                                  "description": "End time, 13-digit Unix timestamp in milliseconds."
                                }
                              },
                              "description": "conditionType=TIME_RANGE"
                            },
                            "key": {
                              "type": "string",
                              "description": "Custom-field key"
                            }
                          },
                          "description": "Custom query condition."
                        }
                      },
                      "boundaryIds": {
                        "type": "array",
                        "description": "Starting ID. Use `null` for the first query.",
                        "items": {
                          "type": "string"
                        }
                      },
                      "length": {
                        "maximum": 2000,
                        "minimum": 1,
                        "type": "integer",
                        "description": "Number of records per query"
                      }
                    },
                    "description": "Request body"
                  }
                },
                "description": ""
              }
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "x-components": {
    "responses": {}
  },
  "servers": [
    {
      "url": "https://app.3chat.ai",
      "description": "3Chat production server"
    }
  ],
  "components": {
    "schemas": {
      "butlervisitor_sort": {
        "type": "object",
        "properties": {
          "sortOrder": {
            "type": "string",
            "description": "Sort order: use `ASC` for ascending order and `DESC` for descending order.",
            "enum": [
              "ASC",
              "DESC"
            ]
          },
          "sortFieldKey": {
            "type": "string",
            "description": "Sortable fields: totalVisits, updatedTime, lastVisitTime, createdTime, firstVisitTime"
          }
        }
      },
      "butlersession": {
        "type": "object",
        "properties": {
          "updatedTime": {
            "type": "integer",
            "description": "updatedTime, Unix timestamp in milliseconds.",
            "format": "int64"
          },
          "workSpaceId": {
            "type": "string",
            "description": "workSpaceId"
          },
          "createdTime": {
            "type": "integer",
            "description": "createdTime, Unix timestamp in milliseconds.",
            "format": "int64"
          },
          "visitorId": {
            "type": "string",
            "description": "visitorId"
          }
        }
      },
      "butlersession_sort": {
        "type": "object",
        "properties": {
          "sortOrder": {
            "type": "string",
            "description": "Sort order: use `ASC` for ascending order and `DESC` for descending order.",
            "enum": [
              "ASC",
              "DESC"
            ]
          },
          "sortFieldKey": {
            "type": "string",
            "description": "Sortable fields: updatedTime, createdTime"
          }
        }
      },
      "butlervisitor": {
        "type": "object",
        "properties": {
          "dataId": {
            "type": "string",
            "description": "Visitor data ID"
          },
          "totalVisits": {
            "type": "number",
            "description": "Total visits",
            "format": "double"
          },
          "updatedTime": {
            "type": "integer",
            "description": "Last updated time, Unix timestamp in milliseconds.",
            "format": "int64"
          },
          "firstTouch": {
            "type": "string",
            "description": "First-touch information"
          },
          "language": {
            "type": "string",
            "description": "Preferred language"
          },
          "lastTouch": {
            "type": "string",
            "description": "Last-touch information"
          },
          "utmSourceLast": {
            "type": "string",
            "description": "UTM"
          },
          "accountId": {
            "type": "string",
            "description": "accountId"
          },
          "phoneNumber": {
            "type": "string",
            "description": "Phone number"
          },
          "browserAgent": {
            "type": "string",
            "description": "Browser information"
          },
          "lastVisitTime": {
            "type": "integer",
            "description": "Last visit time, Unix timestamp in milliseconds.",
            "format": "int64"
          },
          "externalReferrerLast": {
            "type": "string",
            "description": "Source information"
          },
          "name": {
            "type": "string",
            "description": "Name"
          },
          "createdTime": {
            "type": "integer",
            "description": "Creation time, Unix timestamp in milliseconds.",
            "format": "int64"
          },
          "lookup_35619bh169": {
            "type": "string",
            "description": "Channel type: chatly=Chatly, openApi=OpenAPI, lazadaSeller=Lazada, wechatPublic=WeChat Official Account, feishu=Feishu, qywechat=WeCom, liveChat=Live Chat, email=Email, unknown=Unknown."
          },
          "lastVisitIp": {
            "type": "string",
            "description": "Last-visit IP address"
          },
          "landingPageLast": {
            "type": "string",
            "description": "Last visited page"
          },
          "lookup_gd40h55ggc": {
            "type": "string",
            "description": "Source channel, 110=Shopify, 10=DingTalk, 11=Feishu, 12=Livechat (old), 13=WeChat Official Account (old), 14=Feishu (old), 15=Lazada (old), 16=openApi (old), 17=WeCom (old), 18=Chatly (old), 19=Unknown, 0=0, 1=WeChat, 101=Email, 2=WeCom, 102=Livechat, 3=WeChat Official Account, 103=WeChat Official Account, 4=WhatsApp, 104=Feishu, 5=WeChat Customer Service, 105=Lazada, 6=TikTok, 106=OpenAPI, 7=Mini Program, 107=WeCom, 8=Douyin, 108=Chatly, 9=Instagram, 109=Unknown, 20=Shopify (old)"
          },
          "email": {
            "type": "string",
            "description": "Email address"
          },
          "firstVisitTime": {
            "type": "integer",
            "description": "First visit time, Unix timestamp in milliseconds.",
            "format": "int64"
          },
          "externalUserId": {
            "anyOf": [
              {
                "type": "string",
                "description": "Chatly channel `externalUserId` parameter."
              },
              {
                "type": "null"
              }
            ]
          },
          "botUserId": {
            "anyOf": [
              {
                "type": "string",
                "description": "Chatly channel `botUserId` parameter."
              },
              {
                "type": "null"
              }
            ]
          },
          "imBotId": {
            "anyOf": [
              {
                "type": "string",
                "description": "Chatly channel `imBotId` parameter."
              },
              {
                "type": "null"
              }
            ]
          },
          "orgId": {
            "anyOf": [
              {
                "type": "string",
                "description": "Chatly channel `orgId` parameter."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "dataId"
        ]
      },
      "staff": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Staff name"
          },
          "employeeId": {
            "type": "string",
            "description": "Staff employee number"
          },
          "headPortrait": {
            "type": "string",
            "description": "Staff avatar"
          }
        }
      },
      "staff_filter": {
        "type": "object",
        "properties": {
          "id": {
            "description": "ID (supports multi-value filtering).",
            "type": "object",
            "required": [
              "conditionType"
            ],
            "properties": {
              "conditionType": {
                "type": "string",
                "description": "{FUZZY=fuzzy-match filtering, KEYWORD=exact-match filtering, FILTER=multi-value filtering, TIME_RANGE=time-range filtering}",
                "enum": [
                  "FILTER"
                ]
              },
              "filter": {
                "type": "array",
                "description": "",
                "items": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "staff_sort": {
        "type": "object",
        "properties": {
          "sortOrder": {
            "type": "string",
            "description": "Sort order: use `ASC` for ascending order and `DESC` for descending order.",
            "enum": [
              "ASC",
              "DESC"
            ]
          },
          "sortFieldKey": {
            "type": "string",
            "description": "Sortable fields: "
          }
        }
      },
      "AccountParam": {
        "type": "object",
        "properties": {
          "account": {
            "anyOf": [
              {
                "type": "string",
                "description": "Account"
              },
              {
                "type": "null"
              }
            ]
          },
          "password": {
            "anyOf": [
              {
                "type": "string",
                "description": "Password"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "account",
          "password"
        ]
      },
      "StaffSaveV3Param": {
        "type": "object",
        "properties": {
          "code": {
            "anyOf": [
              {
                "type": "string",
                "description": "Code"
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "anyOf": [
              {
                "type": "string",
                "description": "Name"
              },
              {
                "type": "null"
              }
            ]
          },
          "accountInfo": {
            "$ref": "#/components/schemas/AccountParam",
            "description": "Account information. Optional. If provided, an account is enabled for the staff member; if omitted, the staff member does not have a login account."
          },
          "roleNames": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Role list"
          },
          "departmentNames": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Department list"
          }
        },
        "required": [
          "code",
          "name"
        ]
      },
      "RequestParameterStaffSaveV3Param": {
        "type": "object",
        "properties": {
          "body": {
            "anyOf": [
              {
                "description": "",
                "$ref": "#/components/schemas/StaffSaveV3Param"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "body"
        ]
      },
      "ChannelMessageSendParams": {
        "type": "object",
        "properties": {
          "dialogId": {
            "type": "string",
            "description": "Dialog ID"
          },
          "message": {
            "type": "string",
            "description": "Message content. At least one of `message` and `attachments` must be non-empty."
          },
          "attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AttachmentData",
              "description": "Attachment metadata."
            },
            "description": "Attachment list. At least one of `attachments` and `message` must be non-empty."
          },
          "emailOptions": {
            "$ref": "#/components/schemas/ChannelMessageSendEmailParams",
            "description": ""
          }
        }
      },
      "ChannelMessageSendDTO": {
        "type": "object",
        "properties": {
          "messageId": {
            "type": "string",
            "description": "Message ID"
          }
        }
      },
      "EntityResponseDataChannelMessageSendDTO": {
        "type": "object",
        "properties": {
          "entity": {
            "$ref": "#/components/schemas/ChannelMessageSendDTO",
            "description": ""
          }
        }
      },
      "EntityResponseChannelMessageSendDTO": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "description": ""
          },
          "message": {
            "type": "string",
            "description": ""
          },
          "data": {
            "$ref": "#/components/schemas/EntityResponseDataChannelMessageSendDTO",
            "description": ""
          }
        }
      },
      "RequestParameterChannelMessageSendParams": {
        "type": "object",
        "properties": {
          "body": {
            "$ref": "#/components/schemas/ChannelMessageSendParams",
            "description": ""
          }
        },
        "required": [
          "body"
        ]
      },
      "AttachmentData": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Attachment name"
          },
          "type": {
            "type": "string",
            "description": "Attachment type. Use a standard HTTP media type: https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/MIME_types"
          },
          "url": {
            "type": "string",
            "description": "Attachment URL"
          },
          "size": {
            "type": "integer",
            "description": "Attachment size",
            "format": "int64"
          }
        }
      },
      "TransferToHumanParams": {
        "type": "object",
        "properties": {
          "dialogId": {
            "type": "string",
            "description": "Dialog ID"
          }
        }
      },
      "RequestParameterTransferToHumanParams": {
        "type": "object",
        "properties": {
          "body": {
            "$ref": "#/components/schemas/TransferToHumanParams",
            "description": ""
          }
        },
        "required": [
          "body"
        ]
      },
      "ChannelMessageSendEmailParams": {
        "type": "object",
        "properties": {
          "topic": {
            "type": "string",
            "description": "Subject/title used for the email channel."
          },
          "useAttachmentBuffer": {
            "type": "boolean",
            "description": "Whether to send attachment binary data for the email channel. When binary attachment data is included, each attachment must not exceed 10 MB."
          },
          "replyEmailMessageId": {
            "type": "string",
            "description": "Email message ID to reply to."
          }
        }
      },
      "butlermessage_sort": {
        "type": "object",
        "properties": {
          "sortOrder": {
            "type": "string",
            "description": "Sort order: use `ASC` for ascending order and `DESC` for descending order.",
            "enum": [
              "ASC",
              "DESC"
            ]
          },
          "sortFieldKey": {
            "type": "string",
            "description": "Sortable fields: updatedTime, msgType, createdTime"
          }
        }
      },
      "RecipientInfo": {
        "type": "object",
        "properties": {
          "commentId": {
            "anyOf": [
              {
                "type": "string",
                "description": "Comment ID"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "anyOf": [
              {
                "type": "string",
                "description": "Recipient ID"
              },
              {
                "type": "null"
              }
            ]
          },
          "postId": {
            "anyOf": [
              {
                "type": "string",
                "description": "Post ID"
              },
              {
                "type": "null"
              }
            ]
          },
          "userRef": {
            "anyOf": [
              {
                "type": "string",
                "description": "User reference"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "PrivateMessageSendParams": {
        "type": "object",
        "properties": {
          "pageId": {
            "type": "string",
            "description": "Page ID"
          },
          "recipient": {
            "$ref": "#/components/schemas/RecipientInfo",
            "description": "Recipient information"
          },
          "message": {
            "type": "string",
            "description": "Message content"
          }
        },
        "required": [
          "pageId",
          "recipient",
          "message"
        ]
      },
      "RequestParameter_PrivateMessageSendParams_": {
        "type": "object",
        "properties": {
          "body": {
            "$ref": "#/components/schemas/PrivateMessageSendParams",
            "description": ""
          }
        },
        "required": [
          "body"
        ]
      },
      "CommentReplyParams": {
        "type": "object",
        "properties": {
          "pageId": {
            "type": "string",
            "description": "Page ID"
          },
          "commentId": {
            "type": "string",
            "description": "Comment ID"
          },
          "message": {
            "type": "string",
            "description": "Reply content"
          }
        },
        "required": [
          "pageId",
          "commentId",
          "message"
        ]
      },
      "RequestParameter_CommentReplyParams_": {
        "type": "object",
        "properties": {
          "body": {
            "$ref": "#/components/schemas/CommentReplyParams",
            "description": ""
          }
        },
        "required": [
          "body"
        ]
      },
      "PostDetailParams": {
        "type": "object",
        "properties": {
          "pageId": {
            "type": "string",
            "description": "Page ID"
          },
          "postId": {
            "type": "string",
            "description": "Post ID"
          },
          "fields": {
            "anyOf": [
              {
                "type": "string",
                "description": "Comma-separated list of fields to return. For example: `id,message,created_time,permalink_url,from{id,name},shares,comments,likes,attachments{media_type,media,subattachments}`."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "pageId",
          "postId"
        ]
      },
      "RequestParameter_PostDetailParams_": {
        "type": "object",
        "properties": {
          "body": {
            "$ref": "#/components/schemas/PostDetailParams",
            "description": ""
          }
        },
        "required": [
          "body"
        ]
      },
      "EntityResponseData_Object_": {
        "type": "object",
        "properties": {
          "entity": {
            "$ref": "#/components/schemas/Object",
            "description": ""
          }
        }
      },
      "EntityResponse_Object_": {
        "type": "object",
        "properties": {
          "code": {
            "anyOf": [
              {
                "type": "integer",
                "description": ""
              },
              {
                "type": "null"
              }
            ]
          },
          "message": {
            "anyOf": [
              {
                "type": "string",
                "description": ""
              },
              {
                "type": "null"
              }
            ]
          },
          "data": {
            "$ref": "#/components/schemas/EntityResponseData_Object_",
            "description": ""
          }
        }
      },
      "Object": {
        "type": "object",
        "properties": {}
      },
      "butlerconversation": {
        "type": "object",
        "properties": {
          "convStatus": {
            "type": "string",
            "description": "Status: 2 = active, 3 = completed."
          },
          "summary": {
            "type": "string",
            "description": "Current conversation summary"
          },
          "updatedTime": {
            "type": "integer",
            "description": "Last updated time, Unix timestamp in milliseconds.",
            "format": "int64"
          },
          "replyStrategy": {
            "type": "string",
            "description": "Reply strategy: 1 = human agent; 2 = 3Chat AI Agent; 3 = contact/visitor."
          },
          "completedTime": {
            "type": "integer",
            "description": "Closed time, Unix timestamp in milliseconds.",
            "format": "int64"
          },
          "solved": {
            "type": "boolean",
            "description": "Resolved status. `true` = resolved; `false` = unresolved."
          },
          "ratingComment": {
            "type": "string",
            "description": "Contact rating"
          },
          "lookup_3g71fgh5f5": {
            "type": "string",
            "description": "Contact name"
          },
          "duration": {
            "type": "number",
            "description": "Conversation duration",
            "format": "double"
          },
          "dataId": {
            "type": "string",
            "description": "Database ID"
          },
          "userAccountId": {
            "type": "string",
            "description": "Visitor platform ID"
          },
          "createdTime": {
            "type": "integer",
            "description": "Creation time, Unix timestamp in milliseconds.",
            "format": "int64"
          },
          "lookup_h70b811f83": {
            "type": "string",
            "description": "Channel type (new), 110=Shopify, 111=Facebook, 112=Instagram, 113=Sandbox, 114=SHOPLINE, 10=DingTalk, 11=Feishu, 12=Xiaohongshu (RED), 13=WeChat Official Account (old), 14=Feishu (old), 15=Lazada (old), 16=openApi (old), 17=WeCom (old), 18=Chatly (old), 19=Unknown, 0=0, 1=WeChat, 101=Email, 2=WeCom, 102=Livechat, 3=WeChat Official Account, 103=WeChat Official Account, 4=WhatsApp, 104=Feishu, 5=WeChat Customer Service, 105=Lazada, 6=TikTok, 106=OpenAPI, 7=WeChat Mini Program, 107=WeCom, 8=Douyin, 108=Chatly, 9=Instagram, 109=Unknown, 20=Shopify (old)"
          },
          "ratingLevels": {
            "type": "string",
            "description": "Rating: 1, 2, 3, 4, or 5."
          },
          "lookup_02fghe5910": {
            "type": "string",
            "description": "Contact email address"
          },
          "solverType": {
            "type": "string",
            "description": "Resolver: 1 = 3Chat; 2 = human agent."
          }
        }
      },
      "butlerconversation_sort": {
        "type": "object",
        "properties": {
          "sortOrder": {
            "type": "string",
            "description": "Sort order: use `ASC` for ascending order and `DESC` for descending order.",
            "enum": [
              "ASC",
              "DESC"
            ]
          },
          "sortFieldKey": {
            "type": "string",
            "description": "Sortable fields: duration, updatedTime, completedTime, createdTime"
          }
        }
      },
      "butlerchannel": {
        "type": "object",
        "properties": {
          "updatedTime": {
            "type": "integer",
            "description": "updatedTime, Unix timestamp in milliseconds.",
            "format": "int64"
          },
          "weChatPublicAppId": {
            "type": "string",
            "description": "weChatPublicAppId"
          },
          "appName": {
            "type": "string",
            "description": "appName"
          },
          "accountType": {
            "type": "string",
            "description": "accountType: [110=Shopify, 111=Facebook, 112=Instagram, 113=Sandbox, 114=SHOPLINE, 10=DingTalk, 11=Feishu, 12=Xiaohongshu (RED), 13=WeChat Official Account (old), 14=Feishu (old), 15=Lazada (old), 16=openApi (old), 17=WeCom (old), 18=Chatly (old), 19=Unknown, 0=0, 1=WeChat, 101=Email address, 2=WeCom, 102=Livechat, 3=WeChat Official Account, 103=WeChat Official Account, 4=WhatsApp, 104=Feishu, 5=WeChat Customer Service, 105=Lazada, 6=TikTok, 106=OpenAPI, 7=WeChat Mini Program, 107=WeCom, 8=Douyin, 108=Chatly, 9=Instagram, 109=Unknown, 20=Shopify (old)]"
          },
          "type": {
            "type": "string",
            "description": "type: [chatly=Chatly, openApi=OpenAPI, lazadaSeller=Lazada, wechatPublic=WeChat Official Account, feishu=Feishu, qywechat=WeCom, liveChat=Live Chat, email=Email, meta=Facebook, instagram=Instagram, sandbox=Sandbox, unknown=Unknown]"
          },
          "accessToken": {
            "type": "string",
            "description": "accessToken"
          },
          "feishuAppId": {
            "type": "string",
            "description": "feishuAppId"
          },
          "dataId": {
            "type": "string",
            "description": "dataId"
          },
          "feishuSecret": {
            "type": "string",
            "description": "feishuSecret"
          },
          "authorizerRefreshToken": {
            "type": "string",
            "description": "authorizerRefreshToken"
          },
          "feishuTenantAccessToken": {
            "type": "string",
            "description": "feishuTenantAccessToken"
          },
          "workSpaceId": {
            "type": "string",
            "description": "workSpaceId"
          },
          "createdTime": {
            "type": "integer",
            "description": "createdTime, Unix timestamp in milliseconds.",
            "format": "int64"
          },
          "lazadaSellerId": {
            "type": "string",
            "description": "lazadaSellerId"
          },
          "liveChatType": {
            "type": "string",
            "description": "liveChatType: [shopify=Shopify, official=Official Website, shopline=SHOPLINE, shared=Shared Link]"
          }
        }
      },
      "butlerchannel_filter": {
        "type": "object",
        "properties": {
          "updatedTime": {
            "description": "updatedTime, Unix timestamp in milliseconds (time-range filter).",
            "type": "object",
            "required": [
              "conditionType"
            ],
            "properties": {
              "conditionType": {
                "type": "string",
                "description": "{FUZZY=fuzzy-match filtering, KEYWORD=exact-match filtering, FILTER=multi-value filtering, TIME_RANGE=time-range filtering}",
                "enum": [
                  "TIME_RANGE"
                ]
              },
              "timeRange": {
                "type": "object",
                "properties": {
                  "start": {
                    "type": "integer",
                    "format": "int64",
                    "description": "Start time, Unix timestamp in milliseconds."
                  },
                  "end": {
                    "type": "integer",
                    "format": "int64",
                    "description": "End time, Unix timestamp in milliseconds."
                  }
                },
                "description": ""
              }
            }
          },
          "weChatPublicAppId": {
            "description": "weChatPublicAppId (supports fuzzy, exact, and multi-value filtering)",
            "type": "object",
            "required": [
              "conditionType"
            ],
            "properties": {
              "conditionType": {
                "type": "string",
                "description": "{FUZZY=fuzzy-match filtering, KEYWORD=exact-match filtering, FILTER=multi-value filtering, TIME_RANGE=time-range filtering}",
                "enum": [
                  "FUZZY",
                  "KEYWORD",
                  "FILTER"
                ]
              },
              "value": {
                "type": "string",
                "description": ""
              },
              "filter": {
                "type": "array",
                "description": "",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          "appName": {
            "description": "appName (supports fuzzy, exact, and multi-value filtering)",
            "type": "object",
            "required": [
              "conditionType"
            ],
            "properties": {
              "conditionType": {
                "type": "string",
                "description": "{FUZZY=fuzzy-match filtering, KEYWORD=exact-match filtering, FILTER=multi-value filtering, TIME_RANGE=time-range filtering}",
                "enum": [
                  "FUZZY",
                  "KEYWORD",
                  "FILTER"
                ]
              },
              "value": {
                "type": "string",
                "description": ""
              },
              "filter": {
                "type": "array",
                "description": "",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          "accountType": {
            "description": "accountType, 110=Shopify, 111=Facebook, 112=Instagram, 113=Sandbox, 114=SHOPLINE, 10=DingTalk, 11=Feishu, 12=Xiaohongshu (RED), 13=WeChat Official Account (old), 14=Feishu (old), 15=Lazada (old), 16=openApi (old), 17=WeCom (old), 18=Chatly (old), 19=Unknown, 0=0, 1=WeChat, 101=Email, 2=WeCom, 102=Livechat, 3=WeChat Official Account, 103=WeChat Official Account, 4=WhatsApp, 104=Feishu, 5=WeChat Customer Service, 105=Lazada, 6=TikTok, 106=OpenAPI, 7=WeChat Mini Program, 107=WeCom, 8=Douyin, 108=Chatly, 9=Instagram, 109=Unknown, 20=Shopify (old) (supports multi-value filtering)",
            "type": "object",
            "required": [
              "conditionType"
            ],
            "properties": {
              "conditionType": {
                "type": "string",
                "description": "{FUZZY=fuzzy-match filtering, KEYWORD=exact-match filtering, FILTER=multi-value filtering, TIME_RANGE=time-range filtering}",
                "enum": [
                  "FILTER"
                ]
              },
              "filter": {
                "type": "array",
                "description": "",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          "type": {
            "description": "type: chatly=Chatly, openApi=OpenAPI, lazadaSeller=Lazada, wechatPublic=WeChat Official Account, feishu=Feishu, qywechat=WeCom, liveChat=Live Chat, email=Email, unknown=Unknown. Supports multi-value filtering.",
            "type": "object",
            "required": [
              "conditionType"
            ],
            "properties": {
              "conditionType": {
                "type": "string",
                "description": "{FUZZY=fuzzy-match filtering, KEYWORD=exact-match filtering, FILTER=multi-value filtering, TIME_RANGE=time-range filtering}",
                "enum": [
                  "FILTER"
                ]
              },
              "filter": {
                "type": "array",
                "description": "",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          "accessToken": {
            "description": "accessToken (supports fuzzy, exact, and multi-value filtering)",
            "type": "object",
            "required": [
              "conditionType"
            ],
            "properties": {
              "conditionType": {
                "type": "string",
                "description": "{FUZZY=fuzzy-match filtering, KEYWORD=exact-match filtering, FILTER=multi-value filtering, TIME_RANGE=time-range filtering}",
                "enum": [
                  "FUZZY",
                  "KEYWORD",
                  "FILTER"
                ]
              },
              "value": {
                "type": "string",
                "description": ""
              },
              "filter": {
                "type": "array",
                "description": "",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          "feishuAppId": {
            "description": "feishuAppId (supports fuzzy, exact, and multi-value filtering)",
            "type": "object",
            "required": [
              "conditionType"
            ],
            "properties": {
              "conditionType": {
                "type": "string",
                "description": "{FUZZY=fuzzy-match filtering, KEYWORD=exact-match filtering, FILTER=multi-value filtering, TIME_RANGE=time-range filtering}",
                "enum": [
                  "FUZZY",
                  "KEYWORD",
                  "FILTER"
                ]
              },
              "value": {
                "type": "string",
                "description": ""
              },
              "filter": {
                "type": "array",
                "description": "",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          "dataId": {
            "description": "dataId (supports fuzzy, exact, and multi-value filtering)",
            "type": "object",
            "required": [
              "conditionType"
            ],
            "properties": {
              "conditionType": {
                "type": "string",
                "description": "{FUZZY=fuzzy-match filtering, KEYWORD=exact-match filtering, FILTER=multi-value filtering, TIME_RANGE=time-range filtering}",
                "enum": [
                  "FUZZY",
                  "KEYWORD",
                  "FILTER"
                ]
              },
              "value": {
                "type": "string",
                "description": ""
              },
              "filter": {
                "type": "array",
                "description": "",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          "feishuSecret": {
            "description": "feishuSecret (supports fuzzy, exact, and multi-value filtering)",
            "type": "object",
            "required": [
              "conditionType"
            ],
            "properties": {
              "conditionType": {
                "type": "string",
                "description": "{FUZZY=fuzzy-match filtering, KEYWORD=exact-match filtering, FILTER=multi-value filtering, TIME_RANGE=time-range filtering}",
                "enum": [
                  "FUZZY",
                  "KEYWORD",
                  "FILTER"
                ]
              },
              "value": {
                "type": "string",
                "description": ""
              },
              "filter": {
                "type": "array",
                "description": "",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          "authorizerRefreshToken": {
            "description": "authorizerRefreshToken (supports fuzzy, exact, and multi-value filtering)",
            "type": "object",
            "required": [
              "conditionType"
            ],
            "properties": {
              "conditionType": {
                "type": "string",
                "description": "{FUZZY=fuzzy-match filtering, KEYWORD=exact-match filtering, FILTER=multi-value filtering, TIME_RANGE=time-range filtering}",
                "enum": [
                  "FUZZY",
                  "KEYWORD",
                  "FILTER"
                ]
              },
              "value": {
                "type": "string",
                "description": ""
              },
              "filter": {
                "type": "array",
                "description": "",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          "feishuTenantAccessToken": {
            "description": "feishuTenantAccessToken (supports fuzzy, exact, and multi-value filtering)",
            "type": "object",
            "required": [
              "conditionType"
            ],
            "properties": {
              "conditionType": {
                "type": "string",
                "description": "{FUZZY=fuzzy-match filtering, KEYWORD=exact-match filtering, FILTER=multi-value filtering, TIME_RANGE=time-range filtering}",
                "enum": [
                  "FUZZY",
                  "KEYWORD",
                  "FILTER"
                ]
              },
              "value": {
                "type": "string",
                "description": ""
              },
              "filter": {
                "type": "array",
                "description": "",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          "workSpaceId": {
            "description": "workSpaceId (supports fuzzy, exact, and multi-value filtering)",
            "type": "object",
            "required": [
              "conditionType"
            ],
            "properties": {
              "conditionType": {
                "type": "string",
                "description": "{FUZZY=fuzzy-match filtering, KEYWORD=exact-match filtering, FILTER=multi-value filtering, TIME_RANGE=time-range filtering}",
                "enum": [
                  "FUZZY",
                  "KEYWORD",
                  "FILTER"
                ]
              },
              "value": {
                "type": "string",
                "description": ""
              },
              "filter": {
                "type": "array",
                "description": "",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          "createdTime": {
            "description": "createdTime, Unix timestamp in milliseconds (time-range filter).",
            "type": "object",
            "required": [
              "conditionType"
            ],
            "properties": {
              "conditionType": {
                "type": "string",
                "description": "{FUZZY=fuzzy-match filtering, KEYWORD=exact-match filtering, FILTER=multi-value filtering, TIME_RANGE=time-range filtering}",
                "enum": [
                  "TIME_RANGE"
                ]
              },
              "timeRange": {
                "type": "object",
                "properties": {
                  "start": {
                    "type": "integer",
                    "format": "int64",
                    "description": "Start time, Unix timestamp in milliseconds."
                  },
                  "end": {
                    "type": "integer",
                    "format": "int64",
                    "description": "End time, Unix timestamp in milliseconds."
                  }
                },
                "description": ""
              }
            }
          },
          "lazadaSellerId": {
            "description": "lazadaSellerId (supports fuzzy, exact, and multi-value filtering)",
            "type": "object",
            "required": [
              "conditionType"
            ],
            "properties": {
              "conditionType": {
                "type": "string",
                "description": "{FUZZY=fuzzy-match filtering, KEYWORD=exact-match filtering, FILTER=multi-value filtering, TIME_RANGE=time-range filtering}",
                "enum": [
                  "FUZZY",
                  "KEYWORD",
                  "FILTER"
                ]
              },
              "value": {
                "type": "string",
                "description": ""
              },
              "filter": {
                "type": "array",
                "description": "",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          "liveChatType": {
            "description": "liveChatType: shopify=Shopify, official=Official Website, shopline=SHOPLINE. Supports multi-value filtering.",
            "type": "object",
            "required": [
              "conditionType"
            ],
            "properties": {
              "conditionType": {
                "type": "string",
                "description": "{FUZZY=fuzzy-match filtering, KEYWORD=exact-match filtering, FILTER=multi-value filtering, TIME_RANGE=time-range filtering}",
                "enum": [
                  "FILTER"
                ]
              },
              "filter": {
                "type": "array",
                "description": "",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          "id": {
            "description": "ID (supports multi-value filtering).",
            "type": "object",
            "required": [
              "conditionType"
            ],
            "properties": {
              "conditionType": {
                "type": "string",
                "description": "{FUZZY=fuzzy-match filtering, KEYWORD=exact-match filtering, FILTER=multi-value filtering, TIME_RANGE=time-range filtering}",
                "enum": [
                  "FILTER"
                ]
              },
              "filter": {
                "type": "array",
                "description": "",
                "items": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "butlerchannel_sort": {
        "type": "object",
        "properties": {
          "sortOrder": {
            "type": "string",
            "description": "Sort order: use `ASC` for ascending order and `DESC` for descending order.",
            "enum": [
              "ASC",
              "DESC"
            ]
          },
          "sortFieldKey": {
            "type": "string",
            "description": "Sortable fields: updatedTime, createdTime"
          }
        }
      },
      "butlermessage": {
        "type": "object",
        "properties": {
          "updatedTime": {
            "type": "integer",
            "description": "updatedTime, Unix timestamp in milliseconds.",
            "format": "int64"
          },
          "createdTime": {
            "type": "integer",
            "description": "createdTime, Unix timestamp in milliseconds.",
            "format": "int64"
          },
          "senderId": {
            "type": "integer",
            "description": "Sender ID. If `senderType==1`, `senderId` is the contact ID; if `senderType==2`, it is the platform sender ID; if `senderType==3`, it is the Agent ID."
          },
          "workSpaceId": {
            "type": "string",
            "description": "workSpaceId"
          },
          "senderType": {
            "type": "integer",
            "description": "senderType: -1 = unknown; 0 = system; 1 = contact (customer); 2 = human agent; 3 = 3Chat Agent."
          },
          "isEffectiveReply": {
            "type": "boolean",
            "description": "isEffectiveReply: `true` = yes; `false` = no."
          },
          "email": {
            "type": "object",
            "description": "email",
            "properties": {
              "from": {
                "type": "string",
                "description": "Sender address"
              },
              "fromName": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "Sender name"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "to": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Recipient address array"
              },
              "cc": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "CC address array"
              },
              "bcc": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "BCC address array"
              },
              "subject": {
                "type": "string",
                "description": "Email subject"
              }
            },
            "required": [
              "from",
              "to",
              "cc",
              "bcc",
              "subject"
            ]
          },
          "content": {
            "type": "string",
            "description": "content"
          },
          "id": {
            "type": "string",
            "description": "Unique entry ID"
          },
          "dataId": {
            "type": "string",
            "description": "Database ID"
          },
          "sessionId": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "Dialog ID"
              },
              "viewKey": {
                "type": "string",
                "description": "View entity key"
              }
            },
            "description": "Dialog ID; equivalent to `dialogId`.",
            "required": [
              "id",
              "viewKey"
            ]
          },
          "conversationId": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "Conversation ID"
              },
              "viewKey": {
                "type": "string",
                "description": "View entity key"
              }
            },
            "description": "Conversation ID",
            "required": [
              "id",
              "viewKey"
            ]
          },
          "channelId": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "Channel ID"
              },
              "viewKey": {
                "type": "string",
                "description": "View entity key"
              }
            },
            "description": "Channel ID",
            "required": [
              "id",
              "viewKey"
            ]
          },
          "attachments": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "key": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "name": {
                      "type": "string"
                    },
                    "contentType": {
                      "type": "string",
                      "description": "Attachment MIME type"
                    },
                    "url": {
                      "type": "string",
                      "description": "Attachment URL"
                    },
                    "size": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "description": "Attachment size"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "name",
                    "contentType",
                    "url"
                  ]
                },
                "description": "Attachment array"
              },
              {
                "type": "null"
              }
            ]
          },
          "extendMap": {
            "type": "object",
            "properties": {},
            "description": "Custom fields"
          },
          "agentLogs": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "description": "Log type: `language` (language detection) | `recall` (memory recall) | `task` (intent/task selection) | `knowledge` (Knowledge Base retrieval) | `tool` (MCP tool call) | `internalTool` (internal tool call) | `systemTask` (special system task)."
                },
                "name": {
                  "type": "string",
                  "description": "Tool or task name"
                },
                "message": {
                  "type": "string",
                  "description": "Log content"
                },
                "status": {
                  "type": "string",
                  "description": "Language-detection status or tool execution status"
                },
                "kb": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "content": {
                        "type": "string",
                        "description": "Knowledge Base chunk content"
                      },
                      "chunk_id": {
                        "type": "string",
                        "description": "Chunk ID"
                      },
                      "document_id": {
                        "type": "string",
                        "description": "Knowledge Base document ID"
                      },
                      "document_name": {
                        "type": "string",
                        "description": "Knowledge Base document name"
                      },
                      "enabled": {
                        "type": "boolean",
                        "description": "Whether enabled."
                      },
                      "lang": {
                        "type": "string",
                        "description": "Knowledge Base language"
                      },
                      "score": {
                        "type": "number",
                        "description": "Retrieval score"
                      },
                      "source": {
                        "type": "string",
                        "description": "Source: Document | FAQ | Sample (generated example) | Website content."
                      },
                      "created_at": {
                        "type": "integer",
                        "description": "Knowledge Base creation time"
                      }
                    },
                    "required": [
                      "document_id",
                      "enabled"
                    ]
                  },
                  "description": "Referenced Knowledge Base"
                },
                "entity": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "description": "Entity name"
                    },
                    "values": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {},
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "description": "Entity value"
                    }
                  },
                  "description": "Internal entity invocation",
                  "required": [
                    "name"
                  ]
                },
                "timestamp": {
                  "type": "integer",
                  "description": "Log timestamp"
                }
              },
              "description": "Agent activity log content",
              "required": [
                "type",
                "timestamp"
              ]
            },
            "description": "Agent activity logs"
          },
          "processedBy": {
            "type": "string",
            "description": "Indicates how the message was answered: `HUMAN_AGENT` = human reply; `AI_AGENT` = AI reply; `UNKNOWN` = unclassified."
          }
        },
        "required": [
          "id",
          "sessionId",
          "conversationId",
          "channelId",
          "extendMap",
          "dataId"
        ]
      },
      "ChatDTO": {
        "type": "object",
        "properties": {
          "dialogId": {
            "type": "string",
            "description": "Dialog ID"
          },
          "agentLogs": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "description": "Log type: `language` (language detection) | `recall` (memory recall) | `task` (intent/task selection) | `knowledge` (Knowledge Base retrieval) | `tool` (MCP tool call) | `internalTool` (internal tool call) | `systemTask` (special system task)."
                },
                "name": {
                  "type": "string",
                  "description": "Tool or task name"
                },
                "message": {
                  "type": "string",
                  "description": "Log content"
                },
                "status": {
                  "type": "string",
                  "description": "Language-detection status or tool execution status"
                },
                "kb": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "content": {
                        "type": "string",
                        "description": "Knowledge Base chunk content"
                      },
                      "chunk_id": {
                        "type": "string",
                        "description": "Chunk ID"
                      },
                      "document_id": {
                        "type": "string",
                        "description": "Knowledge Base document ID"
                      },
                      "document_name": {
                        "type": "string",
                        "description": "Knowledge Base document name"
                      },
                      "enabled": {
                        "type": "boolean",
                        "description": "Whether enabled."
                      },
                      "lang": {
                        "type": "string",
                        "description": "Knowledge Base language"
                      },
                      "score": {
                        "type": "number",
                        "description": "Retrieval score"
                      },
                      "source": {
                        "type": "string",
                        "description": "Source: Document | FAQ | Sample (generated example) | Website content."
                      },
                      "created_at": {
                        "type": "integer",
                        "description": "Knowledge Base creation time"
                      }
                    },
                    "required": [
                      "document_id",
                      "enabled"
                    ]
                  },
                  "description": "Referenced Knowledge Base"
                },
                "entity": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "description": "Entity name"
                    },
                    "values": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {},
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "description": "Entity value"
                    }
                  },
                  "description": "Internal entity invocation",
                  "required": [
                    "name"
                  ]
                },
                "timestamp": {
                  "type": "integer",
                  "description": "Log timestamp"
                }
              },
              "description": "Agent activity log content",
              "required": [
                "type",
                "timestamp"
              ]
            },
            "description": "Agent activity logs"
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "description": "Primary content type.\nUsed by clients to select the appropriate rendering component.\nAllowed values:\n- `text`: Plain text\n- `image`: Image\n- `audio`: Audio\n- `video`: Video\n- `file`: File or attachment"
                },
                "contentType": {
                  "type": "string",
                  "description": "Media format (MIME type), using standard IANA media types.\nExamples:\n- Text: `text/plain`\n- Image: `image/jpeg`, `image/png`\n- Audio/video: `audio/mpeg`, `video/mp4`\nUsed by players and browsers to determine how the resource should be decoded or rendered."
                },
                "text": {
                  "type": "string",
                  "description": "Display text / fallback text.\n- When `type=text`, this is the primary message content and supports Markdown.\n- When `type=image`, `audio`, or `video`, this value acts as alt text or the file name. Clients that cannot render the media should display this text instead."
                },
                "url": {
                  "type": "string",
                  "description": "Resource URL.\n- When `type=text`, this is an empty string or `null`.\n- For other types, this is the CDN URL used to access or download the media file."
                },
                "meta": {
                  "type": "object",
                  "properties": {
                    "width": {
                      "type": "number",
                      "description": "Applies to `image`: image width in pixels. Clients can use this value to reserve layout space before the image loads."
                    },
                    "height": {
                      "type": "number",
                      "description": "Applies to `image`: image height in pixels."
                    },
                    "size_kb": {
                      "type": "number",
                      "description": "Applies to `image`/`file`: file size in KB, used for loading estimates or data-usage hints."
                    },
                    "duration": {
                      "type": "number",
                      "description": "Applies to `audio`/`video`: media duration in seconds, which can be used to render the progress bar before the media finishes loading."
                    },
                    "format": {
                      "type": "string",
                      "description": "Applies to `audio`/`video`: file extension. Some legacy players may use this value to identify the media format."
                    },
                    "coverUrl": {
                      "type": "string",
                      "description": "Applies to `video`: optional video poster/thumbnail URL."
                    }
                  },
                  "description": "Metadata containing non-business attributes of the media resource."
                }
              },
              "description": "Agent message content"
            },
            "description": "Agent message list"
          }
        }
      },
      "EntityResponseChatDTO": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "description": ""
          },
          "message": {
            "type": "string",
            "description": ""
          },
          "data": {
            "$ref": "#/components/schemas/ChatDTO"
          }
        }
      },
      "CertifyResponseDTO": {
        "type": "object",
        "properties": {
          "staffId": {
            "type": "integer",
            "description": "staff id\nStaff ID",
            "format": "int64"
          },
          "tenantId": {
            "type": "string",
            "description": "Tenant ID"
          },
          "agent": {
            "type": "string",
            "description": "Device type",
            "enum": [
              "WEB",
              "APP",
              "PAD",
              "BOARD",
              "OTHER",
              "FEISHU",
              "WECOM",
              "DINGTALK"
            ]
          }
        }
      },
      "EntityResponseDataCertifyResponseDTO": {
        "type": "object",
        "properties": {
          "entity": {
            "$ref": "#/components/schemas/CertifyResponseDTO",
            "description": ""
          }
        }
      },
      "EntityResponseCertifyResponseDTO": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "description": ""
          },
          "message": {
            "type": "string",
            "description": ""
          },
          "data": {
            "$ref": "#/components/schemas/EntityResponseDataCertifyResponseDTO",
            "description": ""
          }
        }
      },
      "CertifyParams": {
        "type": "object",
        "properties": {
          "method": {
            "type": "string",
            "description": "HTTP method",
            "enum": [
              "GET",
              "POST",
              "PUT",
              "DELETE"
            ]
          },
          "uri": {
            "type": "string",
            "description": "Request URL"
          },
          "session": {
            "type": "string",
            "description": "Session ID"
          },
          "token": {
            "type": "string",
            "description": "Token"
          }
        },
        "required": [
          "method",
          "uri"
        ]
      },
      "TokenRequest": {
        "type": "object",
        "properties": {
          "appKey": {
            "type": "string",
            "description": "App key"
          },
          "appSecret": {
            "type": "string",
            "description": "App secret"
          }
        },
        "required": [
          "appKey",
          "appSecret"
        ]
      },
      "OpenApiTokenDTO": {
        "type": "object",
        "properties": {
          "accessToken": {
            "type": "string",
            "description": "Credential"
          },
          "accessTokenExpireIn": {
            "type": "integer",
            "description": "Credential expiration time",
            "format": "int64"
          },
          "refreshToken": {
            "type": "string",
            "description": "Refresh token"
          },
          "refreshTokenExpireIn": {
            "type": "integer",
            "description": "Refresh-token expiration time",
            "format": "int64"
          }
        }
      },
      "EntityResponseDataOpenApiTokenDTO": {
        "type": "object",
        "properties": {
          "entity": {
            "$ref": "#/components/schemas/OpenApiTokenDTO",
            "description": ""
          }
        }
      },
      "EntityResponseOpenApiTokenDTO": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "description": ""
          },
          "message": {
            "type": "string",
            "description": ""
          },
          "data": {
            "$ref": "#/components/schemas/EntityResponseDataOpenApiTokenDTO",
            "description": ""
          }
        }
      },
      "RequestParameterTokenRequest": {
        "type": "object",
        "properties": {
          "body": {
            "$ref": "#/components/schemas/TokenRequest",
            "description": ""
          }
        },
        "required": [
          "body"
        ]
      },
      "TokenRefresh": {
        "type": "object",
        "properties": {
          "refreshToken": {
            "type": "string",
            "description": "Refresh Token"
          }
        },
        "required": [
          "refreshToken"
        ]
      },
      "RequestParameterTokenRefresh": {
        "type": "object",
        "properties": {
          "body": {
            "$ref": "#/components/schemas/TokenRefresh",
            "description": ""
          }
        },
        "required": [
          "body"
        ]
      },
      "department_staff_relation": {
        "type": "object",
        "properties": {
          "createTime": {
            "type": "integer",
            "description": "Creation time, Unix timestamp in milliseconds.",
            "format": "int64"
          },
          "departmentId": {
            "type": "string",
            "description": "Department"
          },
          "inCharge": {
            "type": "boolean",
            "description": "Whether this staff member is the owner. `true` = yes; `false` = no."
          },
          "staffId": {
            "type": "string",
            "description": "Staff member"
          }
        }
      },
      "department_staff_relation_filter": {
        "type": "object",
        "properties": {
          "id": {
            "description": "ID (supports multi-value filtering).",
            "type": "object",
            "required": [
              "conditionType"
            ],
            "properties": {
              "conditionType": {
                "type": "string",
                "description": "{FUZZY=fuzzy-match filtering, KEYWORD=exact-match filtering, FILTER=multi-value filtering, TIME_RANGE=time-range filtering}",
                "enum": [
                  "FILTER"
                ]
              },
              "filter": {
                "type": "array",
                "description": "",
                "items": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "department_staff_relation_sort": {
        "type": "object",
        "properties": {
          "sortOrder": {
            "type": "string",
            "description": "Sort order: use `ASC` for ascending order and `DESC` for descending order.",
            "enum": [
              "ASC",
              "DESC"
            ]
          },
          "sortFieldKey": {
            "type": "string",
            "description": "Sortable fields: "
          }
        }
      },
      "KnowledgeDeleteParams": {
        "type": "object",
        "properties": {
          "ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "List of Knowledge Base IDs to delete."
          }
        },
        "required": [
          "ids"
        ]
      },
      "ConversationClosedParams": {
        "type": "object",
        "properties": {
          "conversationId": {
            "type": "string",
            "description": "Dialog ID"
          },
          "dialogId": {
            "type": "string",
            "description": "Conversation ID"
          }
        }
      },
      "AgentEnableParams": {
        "type": "object",
        "properties": {
          "enable": {
            "type": "boolean",
            "description": "Whether the Agent is deployed/enabled. `true` = enabled; `false` = disabled."
          }
        },
        "required": [
          "enable"
        ]
      },
      "BaseResponse": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "description": ""
          },
          "message": {
            "type": "string",
            "description": ""
          }
        }
      },
      "butlergroup_sort": {
        "type": "object",
        "properties": {
          "sortOrder": {
            "type": "string",
            "description": "Sort order: use `ASC` for ascending order and `DESC` for descending order.",
            "enum": [
              "ASC",
              "DESC"
            ]
          },
          "sortFieldKey": {
            "type": "string",
            "description": "Sortable fields: updatedTime, createdTime"
          }
        }
      },
      "WebhookEntityId": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Entity ID."
          }
        }
      },
      "DialogCreatedWebhookData": {
        "type": "object",
        "description": "Dialog data included in the Dialog Created event.",
        "properties": {
          "id": {
            "type": "string",
            "example": "sess_p2p_001"
          },
          "workSpaceId": {
            "type": "string",
            "example": "ws_001"
          },
          "type": {
            "type": "string",
            "example": "p2p"
          },
          "channelId": {
            "$ref": "#/components/schemas/WebhookEntityId",
            "example": {
              "id": "ch_livechat_01"
            }
          },
          "visitorId": {
            "$ref": "#/components/schemas/WebhookEntityId",
            "example": {
              "id": "visitor_123"
            }
          },
          "lastMessageId": {
            "$ref": "#/components/schemas/WebhookEntityId",
            "example": {
              "id": "msg_202"
            }
          },
          "createdTime": {
            "type": "integer",
            "example": 1690000000,
            "format": "int64"
          },
          "updatedTime": {
            "type": "integer",
            "example": 1690003600,
            "format": "int64"
          }
        }
      },
      "DialogCreatedWebhookEvent": {
        "type": "object",
        "required": [
          "requestId",
          "businessType",
          "data"
        ],
        "properties": {
          "requestId": {
            "type": "string",
            "description": "Unique ID of this webhook delivery.",
            "example": "03703d30-50f2-4103-bdb6-8aa331f36cc5"
          },
          "businessType": {
            "type": "integer",
            "description": "Business type code. 15013 represents the Dialog Created event.",
            "example": 15013
          },
          "data": {
            "$ref": "#/components/schemas/DialogCreatedWebhookData"
          }
        },
        "example": {
          "requestId": "03703d30-50f2-4103-bdb6-8aa331f36cc5",
          "businessType": 15013,
          "data": {
            "id": "sess_p2p_001",
            "workSpaceId": "ws_001",
            "type": "p2p",
            "channelId": {
              "id": "ch_livechat_01"
            },
            "visitorId": {
              "id": "visitor_123"
            },
            "lastMessageId": {
              "id": "msg_202"
            },
            "createdTime": 1690000000,
            "updatedTime": 1690003600
          }
        }
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "Access Token",
        "description": "Access Token returned by the Create Access Token or Refresh Access Token endpoint."
      }
    }
  }
}