{
  "openapi": "3.0.3",
  "info": {
    "title": "星云API · 企业微信 API 接口文档",
    "version": "1.3.3",
    "description": "星云API · 企业微信 API 接口文档（由开发文档自动导出，与在线文档内容一致）。\n\n## 基础约定\n\n- **请求**：全部为 `POST`，`Content-Type: application/json`\n- **鉴权**：请求头 `X-Nebula-Key: <你的 API Key>`（在开发者控制台「API Key」创建）\n- **实例**：业务接口在请求体里携带 `instance_guid`（实例标识 inst_xxxx，在控制台「实例」页获取）\n- **响应**：统一信封 `{ ok, code, message, request_id, data }`，`code = 0` 表示成功，业务数据在 `data`\n- **大整数 ID**：超过 JS 安全整数范围的 ID 以字符串返回；请求时传字符串或数字均可\n\n完整说明、登录流程、回调结构与错误码见在线开发文档：https://api.xingyapi.com/api-docs\n"
  },
  "servers": [
    {
      "url": "https://api.xingyapi.com",
      "description": "生产环境"
    }
  ],
  "tags": [
    {
      "name": "设备"
    },
    {
      "name": "登录"
    },
    {
      "name": "长连接"
    },
    {
      "name": "消息"
    },
    {
      "name": "联系人"
    },
    {
      "name": "群聊"
    },
    {
      "name": "好友/朋友圈"
    },
    {
      "name": "文件"
    },
    {
      "name": "个人"
    },
    {
      "name": "标签"
    },
    {
      "name": "收藏"
    }
  ],
  "paths": {
    "/api/device/create": {
      "post": {
        "tags": [
          "设备"
        ],
        "summary": "创建设备",
        "description": "### 接口用途\n新建一个实例（用于登录一个企业微信账号），返回 instance_guid。创建时指定该设备使用的代理；创建成功只代表设备已存在，还需要扫码登录。\n\n### 调用时机\n登录流程第 1 步（共 8 步：创建设备 → 获取个人信息 → 获取二维码 → 检测二维码 → 提交验证码 → 检测二维码 → 获取个人信息 → 更新回调地址）。每个账号只需调用一次，instance_guid 请保存并复用。完整步骤见左侧「开始使用 › 登录流程（新版）」。\n\n### 注意\n- proxy 必填，不用代理时传空字符串。建议与后续获取二维码、检测二维码传同一个代理；登录成功约 30 分钟后平台会自动切换为直连。\n- 已不再使用 lanIp 参数，传了也会被忽略。\n- 每创建一个实例占用 1 个账号额度（无论是否登录成功）；不再使用的实例请在控制台「实例」页移除。\n- 在控制台「一键登录」上号时，平台会按所选省份自动分配代理并创建实例，无需再调用本接口。",
        "operationId": "device_create",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "description": "设备类型，固定传 iPad。",
                    "example": "iPad"
                  },
                  "name": {
                    "type": "string",
                    "description": "设备备注名，用于在控制台区分实例，不超过 120 字。",
                    "example": "客服01号"
                  },
                  "version": {
                    "type": "integer",
                    "description": "设备版本，固定传数字 0。",
                    "example": 0
                  },
                  "proxy": {
                    "type": "string",
                    "description": "设备使用的代理，格式 socks5://用户名:密码@IP:端口（无认证写 socks5://IP:端口）；不用代理传空字符串。",
                    "example": "socks5://user:pass@1.2.3.4:1080"
                  }
                },
                "required": [
                  "type",
                  "name",
                  "version",
                  "proxy"
                ]
              },
              "example": {
                "type": "iPad",
                "name": "客服01号",
                "version": 0,
                "proxy": "socks5://user:pass@1.2.3.4:1080"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "instance_guid": {
                          "type": "string",
                          "description": "实例标识（inst_xxxx），后续所有接口用它指定账号，请保存复用。"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {
                    "instance_guid": "inst_xxxxxxxx"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/device/updateVersion": {
      "post": {
        "tags": [
          "设备"
        ],
        "summary": "更新设备版本",
        "description": "### 接口用途\n把实例的设备版本更新到平台当前版本。平台底层升级设备版本后，未更新的设备无法开启长链，需要先更新版本。\n\n### 调用时机\n一般不需要手动调用：平台在掉线恢复、维护后重连、调用「恢复长链」时，遇到需要更新版本会自动更新。以下情况可以手动调用：\n- 调用「恢复长链」提示「当前版本信息未更新,请先更新版本」时，先调用本接口，再重试。\n\n### 注意\n- 每个实例更新一次即可。已是当前版本时返回失败，提示「当前版本无需更新」，可以忽略。\n- 更新成功后，平台会自动为该实例恢复长链并重新连接账号（约几秒），期间收发消息可能短暂返回 -11001「操作失败」，稍后重试即可，无需重新扫码。\n- 提示「当前设备已被舍弃不在维护」：该设备已停止维护，无法更新，请创建新设备并重新扫码登录。",
        "operationId": "device_updateVersion",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "实例标识（inst_xxxx），由「创建设备」返回。",
                    "example": "inst_xxxxxxxx"
                  }
                },
                "required": [
                  "instance_guid"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "nullable": true,
                      "description": "成功时 data 为空对象。"
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {}
                }
              }
            }
          }
        }
      }
    },
    "/api/login/getQr": {
      "post": {
        "tags": [
          "登录"
        ],
        "summary": "获取二维码",
        "description": "### 接口用途\n获取企业微信登录二维码，用要登录的企业微信账号在手机上扫码确认即可登录到该实例。\n\n### 调用时机\n登录流程第 3 步，之后用返回的 uuid 调用「检测二维码」。二维码过期、用户取消或退出后重新登录时，再次调用本接口取新码。完整步骤见左侧「开始使用 › 登录流程（新版）」。\n\n### 注意\n- 取码前的准备由平台自动完成，本接口可能需要十几秒才返回，请求超时建议设为 30 秒以上。\n- 网页展示二维码：图片地址写 data:image/png;base64, 加上 imageBase64。\n- 重新取码后请改用新的 uuid。",
        "operationId": "login_getQr",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "实例标识（inst_xxxx），由「创建设备」返回。",
                    "example": "inst_xxxxxxxx"
                  },
                  "proxy": {
                    "type": "string",
                    "description": "登录代理，可选，不用代理传空字符串。格式 socks5://用户名:密码@IP:端口。同一次登录的获取二维码、检测二维码、提交验证码须传同一个值。",
                    "example": "socks5://user:pass@203.0.113.10:1080"
                  }
                },
                "required": [
                  "instance_guid"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "proxy": ""
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "imageBase64": {
                          "type": "string",
                          "description": "二维码图片（PNG）的 Base64 内容。"
                        },
                        "uuid": {
                          "type": "string",
                          "description": "本次二维码编号，检测二维码、提交验证码时原样传入。"
                        },
                        "refreshInterval": {
                          "type": "number",
                          "description": "二维码有效期（秒），一般为 600，约 10 分钟。"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {
                    "imageBase64": "iVBORw0KGgoAAAANSUhEUgAA...（PNG 图片的 Base64，约 5–6 万字符，此处省略）",
                    "uuid": "0A1B2C3D4E5F60718293A4B5C6D7E8F9",
                    "refreshInterval": 600
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/login/submitQrCode": {
      "post": {
        "tags": [
          "登录"
        ],
        "summary": "提交验证码",
        "description": "### 接口用途\n提交登录验证码。检测二维码返回 status=10 时，用户手机企业微信上会显示验证码，用本接口提交。\n\n### 调用时机\n登录流程第 5 步（仅检测二维码返回 status=10 时）。提交后必须做第 6 步：再调用「检测二维码」，直到 status=2，账号才真正登录。完整步骤见左侧「开始使用 › 登录流程（新版）」。\n\n### 注意\n- proxy 必须与获取二维码、检测二维码时相同，否则可能校验失败。\n- 验证码按字符串传，避免开头的 0 丢失。",
        "operationId": "login_submitQrCode",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "实例标识（inst_xxxx），由「创建设备」返回。",
                    "example": "inst_xxxxxxxx"
                  },
                  "uuid": {
                    "type": "string",
                    "description": "本次二维码编号，与检测二维码使用的 uuid 相同。",
                    "example": "0123456789ABCDEF0123456789ABCDEF"
                  },
                  "code": {
                    "type": "string",
                    "description": "手机企业微信上显示的登录验证码，按字符串传。",
                    "example": "123456"
                  },
                  "proxy": {
                    "type": "string",
                    "description": "登录代理，可选，不用代理传空字符串。格式 socks5://用户名:密码@IP:端口。同一次登录的获取二维码、检测二维码、提交验证码须传同一个值。",
                    "example": "socks5://user:pass@203.0.113.10:1080"
                  }
                },
                "required": [
                  "instance_guid",
                  "uuid",
                  "code"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "uuid": "0123456789ABCDEF0123456789ABCDEF",
                "code": "123456",
                "proxy": ""
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object",
                      "description": "提交成功时为空对象，请继续检测二维码。"
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {}
                }
              }
            }
          }
        }
      }
    },
    "/api/login/checkQr": {
      "post": {
        "tags": [
          "登录"
        ],
        "summary": "检测二维码（扫码状态）",
        "description": "### 接口用途\n查询二维码的扫码状态，判断用户是否已扫码、是否需要验证码、是否登录成功。\n\n### 调用时机\n登录流程第 4 步：取码后每 2–3 秒调用一次。返回 status=10 → 第 5 步「提交验证码」，提交后第 6 步再调用本接口继续查，直到 status=2；返回 status=2 → 第 7 步「获取个人信息」。完整步骤见左侧「开始使用 › 登录流程（新版）」。\n\n### 状态说明（data.status）\n0 = 未扫码；1 = 已扫码，等待手机确认；10 = 需要输入验证码（调用「提交验证码」后，必须回到本接口继续查，直到 status=2）；2 = 登录成功；4 = 用户取消登录。\n\n### 注意\n- 二维码过期时接口返回失败（code=50001，message 含 -12007），请重新获取二维码。\n- 不传 callbackUrl、控制台也未配置回调时，登录后该实例可能收不到消息推送。推荐在控制台「实例」页点「配置回调」。\n- 登录成功后停止轮询；建议再用「获取个人信息」确认 uin 非 0 后开始发消息。",
        "operationId": "login_checkQr",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "实例标识（inst_xxxx），由「创建设备」返回。",
                    "example": "inst_xxxxxxxx"
                  },
                  "uuid": {
                    "type": "string",
                    "description": "本次二维码编号，取自「获取二维码」返回的 uuid。",
                    "example": "1A2B3C4D5E6F7A8B9C0D1E2F3A4B5C6D"
                  },
                  "proxy": {
                    "type": "string",
                    "description": "登录代理，可选，不用代理传空字符串。格式 socks5://用户名:密码@IP:端口。同一次登录的获取二维码、检测二维码、提交验证码须传同一个值。"
                  },
                  "pushHistory": {
                    "type": "boolean",
                    "description": "登录后是否推送历史消息，默认 false，一般传 false。",
                    "example": false
                  },
                  "callbackUrl": {
                    "type": "string",
                    "description": "可选。消息直接推送到这个公网地址（不经平台签名转发）。使用控制台配置的回调转发时不要传。",
                    "example": "https://example.com/wecom/callback"
                  }
                },
                "required": [
                  "instance_guid",
                  "uuid"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "uuid": "1A2B3C4D5E6F7A8B9C0D1E2F3A4B5C6D",
                "proxy": "",
                "pushHistory": false,
                "callbackUrl": "https://example.com/wecom/callback"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "number",
                          "description": "扫码状态：0 未扫码、1 已扫码待确认、10 需要验证码、2 登录成功、4 用户取消。"
                        },
                        "uuid": {
                          "type": "string",
                          "description": "本次二维码编号，和请求里的 uuid 相同。实测每次成功返回都会带上。"
                        },
                        "nickName": {
                          "type": "string",
                          "description": "扫码成员在企业微信里的名称（仅 status=2 时返回）。"
                        },
                        "avatarUrl": {
                          "type": "string",
                          "description": "扫码成员的头像图片地址（仅 status=2 时返回）。"
                        },
                        "corpUserId": {
                          "type": "number",
                          "description": "扫码账号在企业内的成员 ID（登录成功时返回）。"
                        },
                        "corpId": {
                          "type": "number",
                          "description": "扫码账号所属企业的 ID（登录成功时返回）。"
                        },
                        "corpLogoUrl": {
                          "type": "string",
                          "description": "企业 Logo 图片地址（仅 status=2 时返回）。"
                        },
                        "confirmedFlag": {
                          "type": "boolean",
                          "description": "是否已在手机上确认登录，status=2 时通常为 true（仅 status=2 时返回）。"
                        },
                        "corpBriefInfo": {
                          "type": "object",
                          "description": "扫码成员所在企业的简要信息（仅 status=2 时返回，下面的 corpBriefInfo.* 也一样）。",
                          "properties": {
                            "corpName": {
                              "type": "string",
                              "description": "企业名称。"
                            },
                            "corpFullName": {
                              "type": "string",
                              "description": "企业全称，可能为空。"
                            },
                            "corpId": {
                              "type": "string",
                              "description": "企业的字符串型 ID（通常以 ww 开头），和外层数字型 corpId 格式不同。"
                            },
                            "scannerAccountId": {
                              "type": "number",
                              "description": "扫码成员所属企业的数字 ID，实测和外层 corpId 相同。"
                            },
                            "scannerUserId": {
                              "type": "number",
                              "description": "扫码成员的数字 ID，实测和外层 corpUserId 相同。"
                            },
                            "scannerUserIdDup": {
                              "type": "number",
                              "description": "内部字段，无需处理。"
                            },
                            "ownerName": {
                              "type": "string",
                              "description": "企业所有者（负责人）相关的名称，可能为空，含义以实际返回为准。"
                            },
                            "corpLogoUrl": {
                              "type": "string",
                              "description": "企业 Logo 图片地址。"
                            },
                            "corpLogo": {
                              "type": "string",
                              "description": "企业 Logo 的备用字段，可能为空。"
                            },
                            "corpAvatarTimestamp": {
                              "type": "number",
                              "description": "企业头像（Logo）最近一次更新的时间，Unix 时间戳（秒）。"
                            },
                            "mail": {
                              "type": "number",
                              "description": "邮箱相关的标记（不是邮箱地址），含义以实际返回为准。"
                            },
                            "memberFlag": {
                              "type": "number",
                              "description": "成员标记，含义以实际返回为准。"
                            },
                            "status": {
                              "type": "number",
                              "description": "企业侧的状态值，含义以实际返回为准。它不是扫码状态，判断扫码进度请看外层 status。"
                            },
                            "unreadNum": {
                              "type": "number",
                              "description": "该企业下的未读数量。"
                            },
                            "createTime": {
                              "type": "number",
                              "description": "创建时间的时间戳，可能为 0。"
                            },
                            "updateTime": {
                              "type": "number",
                              "description": "更新时间的时间戳，可能为 0。"
                            },
                            "workCardFaceUrl": {
                              "type": "string",
                              "description": "工作名片封面图地址，可能为空。"
                            },
                            "trust": {
                              "type": "number",
                              "description": "认证/信任相关的标记，含义以实际返回为准。"
                            },
                            "virtualCorpClaimingName": {
                              "type": "string",
                              "description": "虚拟企业的认领名称，可能为空。"
                            },
                            "corpTypeLegacy": {
                              "type": "number",
                              "description": "企业类型（旧字段），取值以实际返回为准。"
                            },
                            "personalWorkType": {
                              "type": "number",
                              "description": "个人/工作身份类型，取值以实际返回为准。"
                            },
                            "adminUrl": {
                              "type": "string",
                              "description": "企业管理后台相关链接。"
                            },
                            "authedDomain": {
                              "type": "string",
                              "description": "企业已认证的域名，可能为空。"
                            },
                            "isAccepted": {
                              "type": "number",
                              "description": "标记字段，含义以实际返回为准。"
                            },
                            "isInitModUser": {
                              "type": "number",
                              "description": "内部字段，无需处理。"
                            },
                            "customCheckUrl": {
                              "type": "string",
                              "description": "内部字段，无需处理。"
                            },
                            "userProfile": {
                              "type": "object",
                              "description": "扫码成员的个人资料。",
                              "properties": {
                                "displayName": {
                                  "type": "string",
                                  "description": "扫码成员的显示名称。"
                                },
                                "phone": {
                                  "type": "string",
                                  "description": "扫码成员的手机号（可能为打码形式）。"
                                },
                                "email": {
                                  "type": "string",
                                  "description": "扫码成员的邮箱，可能为空。"
                                },
                                "avatarUrlBackup": {
                                  "type": "string",
                                  "description": "扫码成员头像的备用地址。"
                                },
                                "countryCode": {
                                  "type": "string",
                                  "description": "手机号的国家/地区区号，例如 86。"
                                },
                                "reserved12": {
                                  "type": "string",
                                  "description": "保留字段，无需处理。"
                                }
                              }
                            },
                            "miniProgram": {
                              "type": "object",
                              "description": "企业关联的小程序信息，内部字段，无需处理。",
                              "properties": {
                                "username": {
                                  "type": "string",
                                  "description": "小程序原始 ID（形如 gh_xxxx@app），无需处理。"
                                },
                                "instance_guid": {
                                  "type": "string",
                                  "description": "平台填入的当前实例标识，和请求里的 instance_guid 相同，没有额外含义，无需处理。"
                                },
                                "path": {
                                  "type": "string",
                                  "description": "小程序页面路径，无需处理。"
                                },
                                "source": {
                                  "type": "number",
                                  "description": "来源标记，无需处理。"
                                }
                              }
                            }
                          }
                        },
                        "WxUserProfile": {
                          "type": "object",
                          "description": "扫码账号关联的微信资料，内容以实际返回为准（仅 status=2 时返回）。",
                          "properties": {
                            "wechatName": {
                              "type": "string",
                              "description": "微信昵称。"
                            },
                            "avatarUrl": {
                              "type": "string",
                              "description": "微信头像地址。"
                            }
                          }
                        },
                        "authId": {
                          "type": "number",
                          "description": "内部字段，无需处理（仅 status=2 时返回）。"
                        },
                        "confirmationToken": {
                          "type": "string",
                          "description": "内部字段，无需处理（实测常为空；仅 status=2 时返回）。"
                        },
                        "encryptedLoginPayload": {
                          "type": "string",
                          "description": "内部字段（加密数据），无需处理（仅 status=2 时返回）。"
                        },
                        "encryptedAccountPayload": {
                          "type": "string",
                          "description": "内部字段（加密数据），无需处理（仅 status=2 时返回）。"
                        },
                        "scannerNonce": {
                          "type": "string",
                          "description": "内部字段，无需处理（仅 status=2 时返回）。"
                        },
                        "nonceKey": {
                          "type": "string",
                          "description": "内部字段，无需处理（仅 status=2 时返回）。"
                        },
                        "deviceUuid": {
                          "type": "string",
                          "description": "内部字段，无需处理（仅 status=2 时返回）。"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {
                    "status": 2,
                    "encryptedLoginPayload": "<加密数据，示例省略>",
                    "scannerNonce": "xxxxxxxxxxxxxxxxxxxxxx==",
                    "corpUserId": 1688850000000001,
                    "nickName": "示例成员",
                    "avatarUrl": "https://example.com/avatar.png",
                    "confirmationToken": "",
                    "corpLogoUrl": "https://example.com/corp_logo.png",
                    "uuid": "1A2B3C4D5E6F7A8B9C0D1E2F3A4B5C6D",
                    "corpId": 1970320000000001,
                    "confirmedFlag": true,
                    "authId": 2251800000000001,
                    "corpBriefInfo": {
                      "scannerAccountId": 1970320000000001,
                      "scannerUserId": 1688850000000001,
                      "corpName": "示例企业",
                      "corpAvatarTimestamp": 1760000000,
                      "ownerName": "示例名称",
                      "mail": 0,
                      "memberFlag": 1,
                      "corpLogoUrl": "https://example.com/corp_logo.png",
                      "corpLogo": "",
                      "userProfile": {
                        "displayName": "示例成员",
                        "phone": "138****0000",
                        "email": "",
                        "avatarUrlBackup": "https://example.com/avatar.png",
                        "countryCode": "86",
                        "reserved12": ""
                      },
                      "scannerUserIdDup": 1688850000000002,
                      "status": 1,
                      "unreadNum": 0,
                      "corpFullName": "",
                      "createTime": 0,
                      "workCardFaceUrl": "",
                      "trust": 0,
                      "virtualCorpClaimingName": "",
                      "corpTypeLegacy": 1,
                      "adminUrl": "https://example.com/admin",
                      "authedDomain": "",
                      "isAccepted": 0,
                      "isInitModUser": 0,
                      "customCheckUrl": "",
                      "personalWorkType": 0,
                      "corpId": "wwxxxxxxxxxxxxxxxx",
                      "miniProgram": {
                        "username": "gh_xxxxxxxxxxxx@app",
                        "instance_guid": "inst_xxxxxxxx",
                        "path": "<示例省略>",
                        "source": 0
                      },
                      "updateTime": 0
                    },
                    "WxUserProfile": {
                      "wechatName": "示例微信昵称",
                      "avatarUrl": "https://example.com/wx_avatar.png"
                    },
                    "encryptedAccountPayload": "<加密数据，示例省略>",
                    "deviceUuid": "0123456789abcdef",
                    "nonceKey": "xxxxxxxxxxxxxxxxxxxxxx=="
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/login/logout": {
      "post": {
        "tags": [
          "登录"
        ],
        "summary": "退出登录",
        "description": "### 接口用途\n退出该实例上登录的企业微信账号。退出后需要重新扫码才能再登录（同一个 instance_guid 可复用）。\n\n### 注意\n- 退出后建议再调用「关闭长链」。\n- 退出不释放账号额度，不再使用的实例请在控制台「实例」页移除。\n- 设备上没有登录账号时返回失败（no account is currently logged in on this device），可视为已退出。",
        "operationId": "login_logout",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "实例标识（inst_xxxx），由「创建设备」返回。",
                    "example": "inst_xxxxxxxx"
                  }
                },
                "required": [
                  "instance_guid"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object",
                      "description": "成功时为空。"
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {}
                }
              }
            }
          }
        }
      }
    },
    "/api/device/restoreLong": {
      "post": {
        "tags": [
          "长连接"
        ],
        "summary": "恢复长链（开启长链）",
        "description": "### 接口用途\n开启或恢复该实例的长链（平台与企业微信之间用于实时收发消息的连接）。长链已开启时调用也返回成功，可重复调用。\n\n### 调用时机\n一般不需要手动调用：取二维码前、掉线恢复、平台维护后重连时，平台都会自动开启长链。以下情况可以手动调用：\n- 调用接口提示 the long chain of the device has not been activated（长链未激活）时，先调用本接口再重试；\n- 主动关闭长链（「关闭长链」）后需要重新开启时。\n\n### 注意\n- 本接口只负责开启长链，不设置消息推送地址；推送地址在控制台「实例」页配置回调，或调用「更新回调地址」。\n- 长链开启不代表账号在线，判断账号是否在线请用「获取个人信息」（uin 非 0）。\n- 设备上没有登录账号时，长链可以开启，但收不到消息，需要扫码登录。\n- 平台底层升级设备版本后，未更新的设备会先自动「更新设备版本」再开启长链，无需额外处理。",
        "operationId": "device_restoreLong",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "实例标识（inst_xxxx），由「创建设备」返回。",
                    "example": "inst_xxxxxxxx"
                  }
                },
                "required": [
                  "instance_guid"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "instance_guid": {
                          "type": "string",
                          "description": "实例标识。"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {
                    "instance_guid": "inst_xxxxxxxx"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/long/stop": {
      "post": {
        "tags": [
          "长连接"
        ],
        "summary": "关闭长链",
        "description": "### 接口用途\n关闭该实例的长链，停止接收消息推送。\n\n### 注意\n- 关闭长链不等于退出账号；退出账号请先调用「退出登录」，再调用本接口。\n- 账号仍在线时，平台的自动保活可能重新开启长链。如需彻底停用，请退出登录或在控制台移除实例。",
        "operationId": "long_stop",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "实例标识（inst_xxxx），由「创建设备」返回。",
                    "example": "inst_xxxxxxxx"
                  }
                },
                "required": [
                  "instance_guid"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "nullable": true,
                      "description": "成功时 data 为空。"
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {}
                }
              }
            }
          }
        }
      }
    },
    "/api/long/check": {
      "post": {
        "tags": [
          "长连接"
        ],
        "summary": "检查长链",
        "description": "### 接口用途\n检查该实例的长链连接是否正常，code=0 表示连接正常。\n\n### 注意\n- 连接正常不代表账号一定在线。判断账号是否在线请用「获取个人信息」（uin 非 0）。\n- 体验版不可用。",
        "operationId": "long_check",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "实例标识（inst_xxxx），由「创建设备」返回。",
                    "example": "inst_xxxxxxxx"
                  }
                },
                "required": [
                  "instance_guid"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object",
                      "description": "成功时为空，以 code=0 判断连接正常。"
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": null
                }
              }
            }
          }
        }
      }
    },
    "/api/long/updateCallbackURL": {
      "post": {
        "tags": [
          "长连接"
        ],
        "summary": "更新回调地址",
        "description": "### 接口用途\n设置该实例的消息推送地址（直连方式）：消息直接推送到你的地址，不经平台签名转发。\n\n### 调用时机\n登录流程第 8 步（直连推送时）：登录成功后调用，把消息推送地址设为你自己的地址。已在控制台「实例」页配置回调（平台签名转发）时跳过本步；体验版不可用，可改为在「检测二维码」时传 callbackUrl 或在控制台配置回调。完整步骤见左侧「开始使用 › 登录流程（新版）」。\n\n### 注意\n- 会覆盖控制台「实例」页配置的回调转发；两种方式同一时间只有一种生效，后设置的生效。\n- 地址必须能从公网访问。\n- 体验版不可用。",
        "operationId": "long_updateCallbackURL",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "实例标识（inst_xxxx），由「创建设备」返回。",
                    "example": "inst_xxxxxxxx"
                  },
                  "callbackUrl": {
                    "type": "string",
                    "description": "消息推送地址，必填，公网可访问的 http(s) 地址。",
                    "example": "https://example.com/wecom/callback"
                  }
                },
                "required": [
                  "instance_guid",
                  "callbackUrl"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "callbackUrl": "https://example.com/wecom/callback"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "instance_guid": {
                          "type": "string",
                          "description": "实例标识。"
                        },
                        "callbackUrl": {
                          "type": "string",
                          "description": "设置后的推送地址。"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {
                    "instance_guid": "inst_xxxxxxxx",
                    "callbackUrl": "https://example.com/wecom/callback"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/message/sync": {
      "post": {
        "tags": [
          "消息"
        ],
        "summary": "同步消息",
        "description": "### 接口用途\n用于同步消息。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；其他字段说明见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "message_sync",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "limit": {
                    "type": "integer",
                    "description": "单次返回数量上限。",
                    "example": 10
                  },
                  "syncKey": {
                    "type": "integer",
                    "description": "增量同步游标；首次同步可按接口约定传空值或初始值，后续使用上次返回值。",
                    "example": 0
                  }
                },
                "required": [
                  "instance_guid"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "limit": 10,
                "syncKey": 0
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "count": {
                          "type": "number",
                          "description": "数据总数。"
                        },
                        "isEnd": {
                          "type": "boolean",
                          "description": "是否已到达本次分页或同步数据末尾。"
                        },
                        "list": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "number",
                                "description": "业务记录或消息内部标识。"
                              },
                              "syncKey": {
                                "type": "number",
                                "description": "增量同步游标，后续同步时应回传该值。"
                              },
                              "messageType": {
                                "type": "number",
                                "description": "会话类型：0=单聊，1=群聊；另有 3、4 等值为系统/通知等特定会话类型，具体以实际返回为准"
                              },
                              "fromUserId": {
                                "type": "number",
                                "description": "消息发送方用户标识。"
                              },
                              "toUserId": {
                                "type": "number",
                                "description": "消息接收方用户标识。"
                              },
                              "roomId": {
                                "type": "number",
                                "description": "群聊或客户群唯一标识。"
                              },
                              "contentType": {
                                "type": "number",
                                "description": "消息内容类型码（见「回调结构说明」类型总览）"
                              },
                              "sendTime": {
                                "type": "number",
                                "description": "发送时间（秒级时间戳）"
                              },
                              "senderName": {
                                "type": "string",
                                "description": "消息发送方名称。"
                              },
                              "content": {
                                "type": "object",
                                "description": "消息或业务内容对象；具体结构随内容类型而变化。"
                              }
                            }
                          },
                          "description": "同步返回的消息列表。"
                        },
                        "syncKey": {
                          "type": "number",
                          "description": "增量同步游标，后续同步时应回传该值。"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {
                    "count": 2,
                    "isEnd": false,
                    "list": [
                      {
                        "id": 1000694,
                        "syncKey": 9547333,
                        "messageType": 3,
                        "fromUserId": 10120,
                        "toUserId": 0,
                        "roomId": 10120,
                        "contentType": 31,
                        "sendTime": 1787103644,
                        "senderName": "",
                        "content": {
                          "msgType": 31,
                          "hex": "<省略>"
                        }
                      },
                      {
                        "id": 1000697,
                        "syncKey": 9547334,
                        "messageType": 3,
                        "fromUserId": 10067,
                        "toUserId": 1688857970889847,
                        "roomId": 10067,
                        "contentType": 573,
                        "sendTime": 1787104018,
                        "senderName": "",
                        "content": {
                          "msgType": 573,
                          "hex": "<省略>"
                        }
                      }
                    ],
                    "syncKey": 9547335
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/message/sendText": {
      "post": {
        "tags": [
          "消息"
        ],
        "summary": "发送文本消息",
        "description": "### 接口用途\n用于发送文本消息。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；其他字段说明见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "message_sendText",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "conversationId": {
                    "type": "number",
                    "description": "会话唯一标识，可表示单聊或群聊会话。",
                    "example": "10758922947847562"
                  },
                  "content": {
                    "type": "string",
                    "description": "要发送的文本消息内容。",
                    "example": "这是一条来自星云API的测试消息"
                  }
                },
                "required": [
                  "instance_guid",
                  "conversationId",
                  "content"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "conversationId": "10758922947847562",
                "content": "这是一条来自星云API的测试消息"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "number",
                          "description": "发送成功后的消息内部标识。"
                        },
                        "syncKey": {
                          "type": "number",
                          "description": "增量同步游标，后续同步时应回传该值。"
                        },
                        "messageType": {
                          "type": "number",
                          "description": "会话类型：0=单聊，1=群聊；另有 3、4 等值为系统/通知等特定会话类型，具体以实际返回为准"
                        },
                        "fromUserId": {
                          "type": "number",
                          "description": "消息发送方用户标识。"
                        },
                        "toUserId": {
                          "type": "number",
                          "description": "消息接收方用户标识。"
                        },
                        "roomId": {
                          "type": "string",
                          "description": "群聊或客户群唯一标识。"
                        },
                        "contentType": {
                          "type": "number",
                          "description": "消息内容类型码（见「回调结构说明」类型总览）"
                        },
                        "sendTime": {
                          "type": "number",
                          "description": "发送时间（秒级时间戳）"
                        },
                        "senderName": {
                          "type": "string",
                          "description": "消息发送方名称。"
                        },
                        "content": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "number",
                                "description": "内容片段类型：0=纯文本、3=表情符号、5=@成员。"
                              },
                              "text": {
                                "type": "string",
                                "description": "文本内容"
                              },
                              "userId": {
                                "type": "number",
                                "description": "@成员的目标用户 ID；@所有人时该字段为空。"
                              }
                            }
                          },
                          "description": "发送成功后返回的消息内容或内容片段。"
                        },
                        "flag": {
                          "type": "number",
                          "description": "消息标志位（内部）"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {
                    "id": 1003108,
                    "syncKey": 9548406,
                    "messageType": 1,
                    "fromUserId": 1688857970889847,
                    "toUserId": 0,
                    "roomId": "10758922947847562",
                    "contentType": 0,
                    "sendTime": 1788431411,
                    "senderName": "示例名称",
                    "content": [
                      {
                        "type": 0,
                        "text": "这是一条来自星云API的测试消息"
                      }
                    ],
                    "flag": 83886080
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/message/sendRichText": {
      "post": {
        "tags": [
          "消息"
        ],
        "summary": "发送带富文本消息",
        "description": "### 接口用途\n用于发送带富文本消息。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；其他字段说明见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "message_sendRichText",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "conversationId": {
                    "type": "number",
                    "description": "会话唯一标识，可表示单聊或群聊会话。",
                    "example": "10758922947847562"
                  },
                  "content": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "number",
                          "description": "内容片段类型：0=纯文本、3=表情符号、5=@成员。"
                        },
                        "text": {
                          "type": "string",
                          "description": "片段文本内容：type=0（纯文本）填文字；type=3（表情符号）填表情码，如 [愉快]。"
                        },
                        "userId": {
                          "type": "number",
                          "description": "仅 type=5（@成员）时使用：不传该字段或留空=@所有人；传具体用户 ID=@指定成员。"
                        }
                      },
                      "required": [
                        "type"
                      ]
                    },
                    "description": "富文本内容：按顺序拼接的内容片段数组，可混排纯文本、表情符号、@成员；各片段字段见下方 content[].*。"
                  }
                },
                "required": [
                  "instance_guid",
                  "conversationId",
                  "content"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "conversationId": "10758922947847562",
                "content": [
                  {
                    "type": 0,
                    "text": "你好 "
                  },
                  {
                    "type": 3,
                    "text": "[愉快]"
                  },
                  {
                    "type": 5,
                    "userId": 1688850000000000
                  },
                  {
                    "type": 0,
                    "text": " 测试一下"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "number",
                          "description": "发送成功后的消息内部标识。"
                        },
                        "syncKey": {
                          "type": "number",
                          "description": "增量同步游标，后续同步时应回传该值。"
                        },
                        "messageType": {
                          "type": "number",
                          "description": "会话类型：0=单聊，1=群聊；另有 3、4 等值为系统/通知等特定会话类型，具体以实际返回为准"
                        },
                        "fromUserId": {
                          "type": "number",
                          "description": "消息发送方用户标识。"
                        },
                        "toUserId": {
                          "type": "number",
                          "description": "消息接收方用户标识。"
                        },
                        "roomId": {
                          "type": "string",
                          "description": "群/会话 id（群消息时有值；大整数以字符串返回）"
                        },
                        "contentType": {
                          "type": "number",
                          "description": "消息内容类型码（见「回调结构说明」类型总览）"
                        },
                        "sendTime": {
                          "type": "number",
                          "description": "发送时间（秒级时间戳）"
                        },
                        "senderName": {
                          "type": "string",
                          "description": "消息发送方名称。"
                        },
                        "content": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "number",
                                "description": "内容片段类型：0=纯文本、3=表情符号、5=@成员。"
                              },
                              "text": {
                                "type": "string",
                                "description": "文本内容"
                              },
                              "userId": {
                                "type": "number",
                                "description": "@成员的目标用户 ID；@所有人时该字段为空。"
                              }
                            }
                          },
                          "description": "发送成功后返回的消息内容或内容片段。"
                        },
                        "flag": {
                          "type": "number",
                          "description": "消息标志位（内部）"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {
                    "id": 1003110,
                    "syncKey": 9548407,
                    "messageType": 1,
                    "fromUserId": 1688857970889847,
                    "toUserId": 0,
                    "roomId": "10758922947847562",
                    "contentType": 0,
                    "sendTime": 1788431412,
                    "senderName": "示例名称",
                    "content": [
                      {
                        "type": 0,
                        "text": "你好 "
                      },
                      {
                        "type": 3,
                        "text": "[愉快]"
                      },
                      {
                        "type": 0,
                        "text": " 测试一下"
                      }
                    ],
                    "flag": 83886080
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/message/sendVoice": {
      "post": {
        "tags": [
          "消息"
        ],
        "summary": "发送语音消息",
        "description": "### 接口用途\n用于发送语音消息。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；其他字段说明见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "message_sendVoice",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "conversationId": {
                    "type": "integer",
                    "description": "会话唯一标识，可表示单聊或群聊会话。",
                    "example": "10758922947847562"
                  },
                  "content": {
                    "type": "object",
                    "description": "媒体内容对象：各字段通常来自文件上传接口的返回，请按示例结构整体填入；具体字段见下。",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "媒体文件 ID（fileId）：由文件上传接口返回。"
                      },
                      "url": {
                        "type": "string",
                        "description": "文件直链（可留空，留空时平台按 fileId + aesKey 拉取）。"
                      },
                      "size": {
                        "type": "number",
                        "description": "文件大小（字节）。"
                      },
                      "voiceTime": {
                        "type": "number",
                        "description": "语音时长（秒）。"
                      },
                      "aesKey": {
                        "type": "string",
                        "description": "文件解密密钥（AES）。"
                      },
                      "md5": {
                        "type": "string",
                        "description": "文件内容 MD5 校验值。"
                      }
                    }
                  }
                },
                "required": [
                  "instance_guid",
                  "conversationId"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "conversationId": "10758922947847562",
                "content": {
                  "id": "<fileId 省略>",
                  "url": "",
                  "size": 3396,
                  "voiceTime": 1,
                  "aesKey": "<省略>",
                  "md5": "070d4d75a6fbddf3be85532412c42743"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "number",
                          "description": "发送成功后的消息内部标识。"
                        },
                        "syncKey": {
                          "type": "number",
                          "description": "增量同步游标，后续同步时应回传该值。"
                        },
                        "messageType": {
                          "type": "number",
                          "description": "消息类型编号；具体枚举以消息协议为准。"
                        },
                        "fromUserId": {
                          "type": "number",
                          "description": "消息发送方用户标识。"
                        },
                        "toUserId": {
                          "type": "number",
                          "description": "消息接收方用户标识。"
                        },
                        "roomId": {
                          "type": "string",
                          "description": "群聊或客户群唯一标识。"
                        },
                        "contentType": {
                          "type": "number",
                          "description": "消息内容类型编号；具体枚举以消息协议为准。"
                        },
                        "sendTime": {
                          "type": "number",
                          "description": "消息发送时间戳。"
                        },
                        "senderName": {
                          "type": "string",
                          "description": "消息发送方名称。"
                        },
                        "content": {
                          "type": "object",
                          "description": "发送成功后返回的消息内容或内容片段。",
                          "properties": {
                            "id": {
                              "type": "string",
                              "description": "发送成功后的消息内部标识。"
                            },
                            "url": {
                              "type": "string",
                              "description": "访问地址。"
                            },
                            "size": {
                              "type": "number",
                              "description": "数据或文件大小。"
                            },
                            "voiceTime": {
                              "type": "number",
                              "description": "语音时长，单位以服务端返回为准。"
                            },
                            "aesKey": {
                              "type": "string",
                              "description": "媒体 AES 解密密钥。"
                            },
                            "md5": {
                              "type": "string",
                              "description": "文件 MD5 摘要。"
                            }
                          }
                        },
                        "flag": {
                          "type": "number",
                          "description": "状态或能力标识；具体枚举以协议为准。"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {
                    "id": 1003721,
                    "syncKey": 11196805,
                    "messageType": 1,
                    "fromUserId": 1688857970889847,
                    "toUserId": 0,
                    "roomId": "10758922947847562",
                    "contentType": 16,
                    "sendTime": 1788158004,
                    "senderName": "示例名称",
                    "content": {
                      "id": "<fileId 省略>",
                      "url": "",
                      "size": 3396,
                      "voiceTime": 1,
                      "aesKey": "<省略>",
                      "md5": "070d4d75a6fbddf3be85532412c42743"
                    },
                    "flag": 83886080
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/message/sendImage": {
      "post": {
        "tags": [
          "消息"
        ],
        "summary": "发送图片消息",
        "description": "### 接口用途\n用于发送图片消息。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；其他字段说明见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "message_sendImage",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "conversationId": {
                    "type": "integer",
                    "description": "会话唯一标识，可表示单聊或群聊会话。",
                    "example": "10758922947847562"
                  },
                  "content": {
                    "type": "object",
                    "description": "媒体内容对象：各字段通常来自文件上传接口的返回，请按示例结构整体填入；具体字段见下。",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "媒体文件 ID（fileId）：由文件上传接口返回。"
                      },
                      "size": {
                        "type": "number",
                        "description": "文件大小（字节）。"
                      },
                      "width": {
                        "type": "number",
                        "description": "宽度（像素）。"
                      },
                      "height": {
                        "type": "number",
                        "description": "高度（像素）。"
                      },
                      "aesKey": {
                        "type": "string",
                        "description": "文件解密密钥（AES）。"
                      },
                      "md5": {
                        "type": "string",
                        "description": "文件内容 MD5 校验值。"
                      },
                      "midImageFileSize": {
                        "type": "number",
                        "description": "中等尺寸图大小（字节）。"
                      },
                      "thumbFileSize": {
                        "type": "number",
                        "description": "缩略图大小（字节）。"
                      },
                      "thumbWidth": {
                        "type": "number",
                        "description": "缩略图宽度（像素）。"
                      },
                      "thumbHeight": {
                        "type": "number",
                        "description": "缩略图高度（像素）。"
                      },
                      "thumbMd5": {
                        "type": "string",
                        "description": "缩略图 MD5 校验值。"
                      }
                    }
                  }
                },
                "required": [
                  "instance_guid",
                  "conversationId"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "conversationId": "10758922947847562",
                "content": {
                  "id": "<fileId 省略>",
                  "size": 10528,
                  "width": 180,
                  "height": 120,
                  "aesKey": "<省略>",
                  "md5": "<省略>",
                  "midImageFileSize": 11338,
                  "thumbFileSize": 8452,
                  "thumbWidth": 180,
                  "thumbHeight": 120,
                  "thumbMd5": "<省略>"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "number",
                          "description": "发送成功后的消息内部标识。"
                        },
                        "syncKey": {
                          "type": "number",
                          "description": "增量同步游标，后续同步时应回传该值。"
                        },
                        "messageType": {
                          "type": "number",
                          "description": "消息类型编号；具体枚举以消息协议为准。"
                        },
                        "fromUserId": {
                          "type": "number",
                          "description": "消息发送方用户标识。"
                        },
                        "toUserId": {
                          "type": "number",
                          "description": "消息接收方用户标识。"
                        },
                        "roomId": {
                          "type": "string",
                          "description": "群聊或客户群唯一标识。"
                        },
                        "contentType": {
                          "type": "number",
                          "description": "消息内容类型编号；具体枚举以消息协议为准。"
                        },
                        "sendTime": {
                          "type": "number",
                          "description": "消息发送时间戳。"
                        },
                        "senderName": {
                          "type": "string",
                          "description": "消息发送方名称。"
                        },
                        "content": {
                          "type": "object",
                          "description": "发送成功后返回的消息内容或内容片段。",
                          "properties": {
                            "id": {
                              "type": "string",
                              "description": "发送成功后的消息内部标识。"
                            },
                            "size": {
                              "type": "number",
                              "description": "数据或文件大小。"
                            },
                            "width": {
                              "type": "number",
                              "description": "媒体宽度，单位为像素。"
                            },
                            "height": {
                              "type": "number",
                              "description": "媒体高度，单位为像素。"
                            },
                            "aesKey": {
                              "type": "string",
                              "description": "媒体 AES 解密密钥。"
                            },
                            "md5": {
                              "type": "string",
                              "description": "文件 MD5 摘要。"
                            },
                            "midImageFileSize": {
                              "type": "number",
                              "description": "中等尺寸图片文件大小。"
                            },
                            "thumbFileSize": {
                              "type": "number",
                              "description": "缩略图文件大小。"
                            },
                            "thumbWidth": {
                              "type": "number",
                              "description": "缩略图宽度。"
                            },
                            "thumbHeight": {
                              "type": "number",
                              "description": "缩略图高度。"
                            },
                            "thumbMd5": {
                              "type": "string",
                              "description": "缩略图文件 MD5 值。"
                            }
                          }
                        },
                        "flag": {
                          "type": "number",
                          "description": "状态或能力标识；具体枚举以协议为准。"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {
                    "id": 1003097,
                    "syncKey": 9548401,
                    "messageType": 1,
                    "fromUserId": 1688857970889847,
                    "toUserId": 0,
                    "roomId": "10758922947847562",
                    "contentType": 14,
                    "sendTime": 1788430206,
                    "senderName": "示例名称",
                    "content": {
                      "id": "<fileId 省略>",
                      "size": 360,
                      "width": 180,
                      "height": 120,
                      "aesKey": "<省略>",
                      "md5": "<省略>",
                      "midImageFileSize": 979,
                      "thumbFileSize": 979,
                      "thumbWidth": 180,
                      "thumbHeight": 120,
                      "thumbMd5": "<省略>"
                    },
                    "flag": 83886080
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/message/sendVideo": {
      "post": {
        "tags": [
          "消息"
        ],
        "summary": "发送视频消息",
        "description": "### 接口用途\n用于发送视频消息。\n\n**推荐流程**：先调「上传CDN视频」`/api/cdn/uploadVideo`，把返回的 `data` 原样作为本接口的 `content` 传入即可（字段一一对应，无需改名）。本接口本身很快（实测约 0.3 秒），耗时主要在上传。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；其他字段说明见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "message_sendVideo",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "conversationId": {
                    "type": "integer",
                    "description": "会话唯一标识，可表示单聊或群聊会话。",
                    "example": "10758922947847562"
                  },
                  "content": {
                    "type": "object",
                    "description": "媒体内容对象：各字段通常来自文件上传接口的返回，请按示例结构整体填入；具体字段见下。",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "媒体文件 ID（fileId）：由文件上传接口返回。"
                      },
                      "size": {
                        "type": "number",
                        "description": "文件大小（字节）。"
                      },
                      "duration": {
                        "type": "number",
                        "description": "视频时长（秒）。"
                      },
                      "width": {
                        "type": "number",
                        "description": "宽度（像素）。"
                      },
                      "height": {
                        "type": "number",
                        "description": "高度（像素）。"
                      },
                      "thumbUrl": {
                        "type": "string",
                        "description": "视频封面（缩略图）直链地址。"
                      },
                      "aesKey": {
                        "type": "string",
                        "description": "文件解密密钥（AES）。"
                      },
                      "md5": {
                        "type": "string",
                        "description": "文件内容 MD5 校验值。"
                      }
                    }
                  }
                },
                "required": [
                  "instance_guid",
                  "conversationId"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "conversationId": "10758922947847562",
                "content": {
                  "id": "<fileId 省略>",
                  "size": 346390,
                  "duration": 3,
                  "width": 1280,
                  "height": 720,
                  "thumbUrl": "https://example.com/...",
                  "aesKey": "<省略>",
                  "md5": "da922726e2822017143cf73bfa453baa"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "number",
                          "description": "发送成功后的消息内部标识。"
                        },
                        "syncKey": {
                          "type": "number",
                          "description": "增量同步游标，后续同步时应回传该值。"
                        },
                        "messageType": {
                          "type": "number",
                          "description": "会话类型：0=单聊，1=群聊；另有 3、4 等值为系统/通知等特定会话类型，具体以实际返回为准"
                        },
                        "fromUserId": {
                          "type": "number",
                          "description": "消息发送方用户标识。"
                        },
                        "toUserId": {
                          "type": "number",
                          "description": "消息接收方用户标识。"
                        },
                        "roomId": {
                          "type": "string",
                          "description": "群聊或客户群唯一标识。"
                        },
                        "contentType": {
                          "type": "number",
                          "description": "消息内容类型码（见「回调结构说明」类型总览）"
                        },
                        "sendTime": {
                          "type": "number",
                          "description": "发送时间（秒级时间戳）"
                        },
                        "senderName": {
                          "type": "string",
                          "description": "消息发送方名称。"
                        },
                        "content": {
                          "type": "object",
                          "description": "发送成功后返回的消息内容或内容片段。",
                          "properties": {
                            "id": {
                              "type": "string",
                              "description": "记录/消息服务端 id"
                            },
                            "size": {
                              "type": "number",
                              "description": "文件大小（字节）"
                            },
                            "duration": {
                              "type": "number",
                              "description": "媒体时长，单位以协议为准。"
                            },
                            "width": {
                              "type": "number",
                              "description": "媒体宽度，单位为像素。"
                            },
                            "height": {
                              "type": "number",
                              "description": "媒体高度，单位为像素。"
                            },
                            "thumbUrl": {
                              "type": "string",
                              "description": "缩略图地址。"
                            },
                            "aesKey": {
                              "type": "string",
                              "description": "媒体 AES 解密密钥。"
                            },
                            "md5": {
                              "type": "string",
                              "description": "文件 MD5 校验"
                            }
                          }
                        },
                        "flag": {
                          "type": "number",
                          "description": "消息标志位（内部）"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {
                    "id": 1003729,
                    "syncKey": 11196808,
                    "messageType": 1,
                    "fromUserId": 1688857970889847,
                    "toUserId": 0,
                    "roomId": "10758922947847562",
                    "contentType": 23,
                    "sendTime": 1788158084,
                    "senderName": "示例名称",
                    "content": {
                      "id": "<fileId 省略>",
                      "size": 346390,
                      "duration": 3,
                      "width": 1280,
                      "height": 720,
                      "thumbUrl": "https://example.com/...",
                      "aesKey": "<省略>",
                      "md5": "da922726e2822017143cf73bfa453baa"
                    },
                    "flag": 83886080
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/message/sendFile": {
      "post": {
        "tags": [
          "消息"
        ],
        "summary": "发送文件消息",
        "description": "### 接口用途\n用于发送文件消息。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；其他字段说明见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "message_sendFile",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "conversationId": {
                    "type": "integer",
                    "description": "会话唯一标识，可表示单聊或群聊会话。",
                    "example": "10758922947847562"
                  },
                  "content": {
                    "type": "object",
                    "description": "媒体内容对象：各字段通常来自文件上传接口的返回，请按示例结构整体填入；具体字段见下。",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "媒体文件 ID（fileId）：由文件上传接口返回。"
                      },
                      "name": {
                        "type": "string",
                        "description": "文件名（含扩展名）。"
                      },
                      "url": {
                        "type": "string",
                        "description": "文件直链（可留空）。"
                      },
                      "size": {
                        "type": "number",
                        "description": "文件大小（字节）。"
                      },
                      "aesKey": {
                        "type": "string",
                        "description": "文件解密密钥（AES）。"
                      },
                      "md5": {
                        "type": "string",
                        "description": "文件内容 MD5 校验值。"
                      }
                    }
                  }
                },
                "required": [
                  "instance_guid",
                  "conversationId"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "conversationId": "10758922947847562",
                "content": {
                  "id": "<fileId 省略>",
                  "name": "测试.txt",
                  "url": "",
                  "size": 1024,
                  "aesKey": "<省略>",
                  "md5": "<省略>"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "number",
                          "description": "发送成功后的消息内部标识。"
                        },
                        "syncKey": {
                          "type": "number",
                          "description": "增量同步游标，后续同步时应回传该值。"
                        },
                        "messageType": {
                          "type": "number",
                          "description": "会话类型：0=单聊，1=群聊；另有 3、4 等值为系统/通知等特定会话类型，具体以实际返回为准"
                        },
                        "fromUserId": {
                          "type": "number",
                          "description": "消息发送方用户标识。"
                        },
                        "toUserId": {
                          "type": "number",
                          "description": "消息接收方用户标识。"
                        },
                        "roomId": {
                          "type": "string",
                          "description": "群聊或客户群唯一标识。"
                        },
                        "contentType": {
                          "type": "number",
                          "description": "消息内容类型码（见「回调结构说明」类型总览）"
                        },
                        "sendTime": {
                          "type": "number",
                          "description": "发送时间（秒级时间戳）"
                        },
                        "senderName": {
                          "type": "string",
                          "description": "消息发送方名称。"
                        },
                        "content": {
                          "type": "object",
                          "description": "发送成功后返回的消息内容或内容片段。",
                          "properties": {
                            "id": {
                              "type": "string",
                              "description": "发送成功后的消息内部标识。"
                            },
                            "name": {
                              "type": "string",
                              "description": "消息内容中的文件名或展示名称。"
                            },
                            "url": {
                              "type": "string",
                              "description": "访问地址。"
                            },
                            "size": {
                              "type": "number",
                              "description": "数据或文件大小。"
                            },
                            "aesKey": {
                              "type": "string",
                              "description": "媒体 AES 解密密钥。"
                            },
                            "md5": {
                              "type": "string",
                              "description": "文件 MD5 摘要。"
                            }
                          }
                        },
                        "flag": {
                          "type": "number",
                          "description": "消息标志位（内部）"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {
                    "id": 1003099,
                    "syncKey": 9548402,
                    "messageType": 1,
                    "fromUserId": 1688857970889847,
                    "toUserId": 0,
                    "roomId": "10758922947847562",
                    "contentType": 15,
                    "sendTime": 1788430207,
                    "senderName": "示例名称",
                    "content": {
                      "id": "<fileId 省略>",
                      "name": "测试.txt",
                      "url": "",
                      "size": 29,
                      "aesKey": "<省略>",
                      "md5": "<省略>"
                    },
                    "flag": 83886080
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/message/sendBigFile": {
      "post": {
        "tags": [
          "消息"
        ],
        "summary": "发送大文件",
        "description": "### 接口用途\n用于发送大文件。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；其他字段说明见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "message_sendBigFile",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "conversationId": {
                    "type": "integer",
                    "description": "会话唯一标识，可表示单聊或群聊会话。",
                    "example": "10758922947847562"
                  },
                  "content": {
                    "type": "object",
                    "description": "媒体内容对象：各字段通常来自文件上传接口的返回，请按示例结构整体填入；具体字段见下。",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "媒体文件 ID（fileId）：由文件上传接口返回。"
                      },
                      "name": {
                        "type": "string",
                        "description": "文件名（含扩展名）。"
                      },
                      "url": {
                        "type": "string",
                        "description": "文件直链（可留空）。"
                      },
                      "size": {
                        "type": "number",
                        "description": "文件大小（字节）。"
                      },
                      "aesKey": {
                        "type": "string",
                        "description": "文件解密密钥（AES）。"
                      },
                      "md5": {
                        "type": "string",
                        "description": "文件内容 MD5 校验值。"
                      }
                    }
                  }
                },
                "required": [
                  "instance_guid",
                  "conversationId"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "conversationId": "10758922947847562",
                "content": {
                  "id": "<fileId 省略>",
                  "name": "示例大文件.xapk",
                  "url": "",
                  "size": 84221417,
                  "aesKey": "",
                  "md5": "fa4e079e5e1a3e7c06473dc71184fbff"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "number",
                          "description": "发送成功后的消息内部标识。"
                        },
                        "syncKey": {
                          "type": "number",
                          "description": "增量同步游标，后续同步时应回传该值。"
                        },
                        "messageType": {
                          "type": "number",
                          "description": "会话类型：0=单聊，1=群聊；另有 3、4 等值为系统/通知等特定会话类型，具体以实际返回为准"
                        },
                        "fromUserId": {
                          "type": "number",
                          "description": "消息发送方用户标识。"
                        },
                        "toUserId": {
                          "type": "number",
                          "description": "消息接收方用户标识。"
                        },
                        "roomId": {
                          "type": "string",
                          "description": "群聊或客户群唯一标识。"
                        },
                        "contentType": {
                          "type": "number",
                          "description": "消息内容类型码（见「回调结构说明」类型总览）"
                        },
                        "sendTime": {
                          "type": "number",
                          "description": "发送时间（秒级时间戳）"
                        },
                        "senderName": {
                          "type": "string",
                          "description": "消息发送方名称。"
                        },
                        "content": {
                          "type": "object",
                          "description": "发送成功后返回的消息内容或内容片段。",
                          "properties": {
                            "id": {
                              "type": "string",
                              "description": "发送成功后的消息内部标识。"
                            },
                            "name": {
                              "type": "string",
                              "description": "消息内容中的文件名或展示名称。"
                            },
                            "url": {
                              "type": "string",
                              "description": "访问地址。"
                            },
                            "size": {
                              "type": "number",
                              "description": "数据或文件大小。"
                            },
                            "aesKey": {
                              "type": "string",
                              "description": "媒体 AES 解密密钥。"
                            },
                            "md5": {
                              "type": "string",
                              "description": "文件 MD5 摘要。"
                            }
                          }
                        },
                        "flag": {
                          "type": "number",
                          "description": "消息标志位（内部）"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {
                    "id": 1003733,
                    "syncKey": 11196810,
                    "messageType": 1,
                    "fromUserId": 1688857970889847,
                    "toUserId": 0,
                    "roomId": "10758922947847562",
                    "contentType": 20,
                    "sendTime": 1788158147,
                    "senderName": "示例名称",
                    "content": {
                      "id": "<fileId 省略>",
                      "name": "示例大文件.xapk",
                      "url": "",
                      "size": 84221417,
                      "aesKey": "",
                      "md5": "fa4e079e5e1a3e7c06473dc71184fbff"
                    },
                    "flag": 83886080
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/message/sendLink": {
      "post": {
        "tags": [
          "消息"
        ],
        "summary": "发送链接卡片消息（包含视频号）",
        "description": "### 接口用途\n用于发送链接卡片消息（包含视频号）。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；其他字段说明见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "message_sendLink",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "conversationId": {
                    "type": "number",
                    "description": "会话唯一标识，可表示单聊或群聊会话。",
                    "example": "10758922947847562"
                  },
                  "content": {
                    "type": "object",
                    "description": "链接卡片内容对象；字段见下。",
                    "properties": {
                      "linkUrl": {
                        "type": "string",
                        "description": "卡片点击后跳转的目标链接。"
                      },
                      "imageUrl": {
                        "type": "string",
                        "description": "卡片封面图地址。"
                      },
                      "title": {
                        "type": "string",
                        "description": "卡片标题。"
                      },
                      "description": {
                        "type": "string",
                        "description": "卡片描述（摘要）。"
                      }
                    }
                  }
                },
                "required": [
                  "instance_guid",
                  "conversationId",
                  "content"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "conversationId": "10758922947847562",
                "content": {
                  "linkUrl": "https://example.com/...",
                  "imageUrl": "https://example.com/...",
                  "title": "星云API 测试链接卡片",
                  "description": "这是一条测试链接卡片消息"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "number",
                          "description": "发送成功后的消息内部标识。"
                        },
                        "syncKey": {
                          "type": "number",
                          "description": "增量同步游标，后续同步时应回传该值。"
                        },
                        "messageType": {
                          "type": "number",
                          "description": "消息类型编号；具体枚举以消息协议为准。"
                        },
                        "fromUserId": {
                          "type": "number",
                          "description": "消息发送方用户标识。"
                        },
                        "toUserId": {
                          "type": "number",
                          "description": "消息接收方用户标识。"
                        },
                        "roomId": {
                          "type": "string",
                          "description": "群聊或客户群唯一标识。"
                        },
                        "contentType": {
                          "type": "number",
                          "description": "消息内容类型编号；具体枚举以消息协议为准。"
                        },
                        "sendTime": {
                          "type": "number",
                          "description": "消息发送时间戳。"
                        },
                        "senderName": {
                          "type": "string",
                          "description": "消息发送方名称。"
                        },
                        "content": {
                          "type": "object",
                          "description": "发送成功后返回的消息内容或内容片段。",
                          "properties": {
                            "imageUrl": {
                              "type": "string",
                              "description": "图片资源地址。"
                            },
                            "title": {
                              "type": "string",
                              "description": "标题。"
                            },
                            "description": {
                              "type": "string",
                              "description": "描述信息。"
                            }
                          }
                        },
                        "flag": {
                          "type": "number",
                          "description": "状态或能力标识；具体枚举以协议为准。"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {
                    "id": 1003089,
                    "syncKey": 9548397,
                    "messageType": 1,
                    "fromUserId": 1688857970889847,
                    "toUserId": 0,
                    "roomId": "10758922947847562",
                    "contentType": 13,
                    "sendTime": 1788430205,
                    "senderName": "示例名称",
                    "content": {
                      "imageUrl": "https://example.com/...",
                      "title": "星云API 测试链接卡片",
                      "description": "这是一条测试链接卡片消息"
                    },
                    "flag": 83886080
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/message/sendNameCard": {
      "post": {
        "tags": [
          "消息"
        ],
        "summary": "发送名片消息",
        "description": "### 接口用途\n用于发送名片消息。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；其他字段说明见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "message_sendNameCard",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "conversationId": {
                    "type": "number",
                    "description": "会话唯一标识，可表示单聊或群聊会话。",
                    "example": "10758922947847562"
                  },
                  "cardUserId": {
                    "type": "integer",
                    "description": "名片对应的用户标识。",
                    "example": 1688850000000000
                  }
                },
                "required": [
                  "instance_guid",
                  "conversationId",
                  "cardUserId"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "conversationId": "10758922947847562",
                "cardUserId": 1688850000000000
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "number",
                          "description": "发送成功后的消息内部标识。"
                        },
                        "syncKey": {
                          "type": "number",
                          "description": "增量同步游标，后续同步时应回传该值。"
                        },
                        "messageType": {
                          "type": "number",
                          "description": "消息类型编号；具体枚举以消息协议为准。"
                        },
                        "fromUserId": {
                          "type": "number",
                          "description": "消息发送方用户标识。"
                        },
                        "toUserId": {
                          "type": "number",
                          "description": "消息接收方用户标识。"
                        },
                        "roomId": {
                          "type": "string",
                          "description": "群聊或客户群唯一标识。"
                        },
                        "contentType": {
                          "type": "number",
                          "description": "消息内容类型编号；具体枚举以消息协议为准。"
                        },
                        "sendTime": {
                          "type": "number",
                          "description": "消息发送时间戳。"
                        },
                        "senderName": {
                          "type": "string",
                          "description": "消息发送方名称。"
                        },
                        "content": {
                          "type": "object",
                          "description": "发送成功后返回的消息内容或内容片段。",
                          "properties": {
                            "cardUserId": {
                              "type": "number",
                              "description": "名片对应的用户标识。"
                            },
                            "avatarUrl": {
                              "type": "string",
                              "description": "头像地址。"
                            },
                            "name": {
                              "type": "string",
                              "description": "消息内容中的文件名或展示名称。"
                            },
                            "corpName": {
                              "type": "string",
                              "description": "企业名称。"
                            },
                            "corpId": {
                              "type": "number",
                              "description": "企业或组织内部标识（协议字段），用于关联对应企业。"
                            },
                            "displayName": {
                              "type": "string",
                              "description": "展示名称。"
                            },
                            "cardToken": {
                              "type": "string",
                              "description": "卡片业务令牌。"
                            }
                          }
                        },
                        "flag": {
                          "type": "number",
                          "description": "状态或能力标识；具体枚举以协议为准。"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {
                    "id": 1003095,
                    "syncKey": 9548400,
                    "messageType": 1,
                    "fromUserId": 1688857970889847,
                    "toUserId": 0,
                    "roomId": "10758922947847562",
                    "contentType": 41,
                    "sendTime": 1788430206,
                    "senderName": "示例名称",
                    "content": {
                      "cardUserId": 1688850000000000,
                      "avatarUrl": "https://example.com/...",
                      "name": "示例名称",
                      "corpName": "示例企业",
                      "corpId": 1970320000000000,
                      "displayName": "示例名称",
                      "cardToken": "<省略>"
                    },
                    "flag": 83886080
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/message/sendGif": {
      "post": {
        "tags": [
          "消息"
        ],
        "summary": "发送GIF消息",
        "description": "### 接口用途\n用于发送GIF消息。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；其他字段说明见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "message_sendGif",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "conversationId": {
                    "type": "number",
                    "description": "会话唯一标识，可表示单聊或群聊会话。",
                    "example": "10758922947847562"
                  },
                  "content": {
                    "type": "object",
                    "description": "媒体内容对象：各字段通常来自文件上传接口的返回，请按示例结构整体填入；具体字段见下。",
                    "properties": {
                      "url": {
                        "type": "string",
                        "description": "GIF 图片直链地址。"
                      },
                      "thumbUrl": {
                        "type": "string",
                        "description": "缩略图直链地址。"
                      },
                      "md5": {
                        "type": "string",
                        "description": "文件内容 MD5 校验值。"
                      },
                      "size": {
                        "type": "number",
                        "description": "文件大小（字节）。"
                      },
                      "width": {
                        "type": "number",
                        "description": "宽度（像素）。"
                      },
                      "height": {
                        "type": "number",
                        "description": "高度（像素）。"
                      },
                      "name": {
                        "type": "string",
                        "description": "表情 / GIF 名称。"
                      }
                    }
                  }
                },
                "required": [
                  "instance_guid",
                  "conversationId",
                  "content"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "conversationId": "10758922947847562",
                "content": {
                  "url": "https://example.com/...",
                  "thumbUrl": "https://example.com/...",
                  "md5": "48BC89479099BDEB9965CB93C8884FB8",
                  "size": 45754,
                  "width": 240,
                  "height": 240,
                  "name": "辛苦了"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "number",
                          "description": "发送成功后的消息内部标识。"
                        },
                        "syncKey": {
                          "type": "number",
                          "description": "增量同步游标，后续同步时应回传该值。"
                        },
                        "messageType": {
                          "type": "number",
                          "description": "消息类型编号；具体枚举以消息协议为准。"
                        },
                        "fromUserId": {
                          "type": "number",
                          "description": "消息发送方用户标识。"
                        },
                        "toUserId": {
                          "type": "number",
                          "description": "消息接收方用户标识。"
                        },
                        "roomId": {
                          "type": "string",
                          "description": "群聊或客户群唯一标识。"
                        },
                        "contentType": {
                          "type": "number",
                          "description": "消息内容类型编号；具体枚举以消息协议为准。"
                        },
                        "sendTime": {
                          "type": "number",
                          "description": "消息发送时间戳。"
                        },
                        "senderName": {
                          "type": "string",
                          "description": "消息发送方名称。"
                        },
                        "content": {
                          "type": "object",
                          "description": "发送成功后返回的消息内容或内容片段。",
                          "properties": {
                            "url": {
                              "type": "string",
                              "description": "访问地址。"
                            },
                            "size": {
                              "type": "number",
                              "description": "数据或文件大小。"
                            },
                            "md5": {
                              "type": "string",
                              "description": "文件 MD5 摘要。"
                            },
                            "width": {
                              "type": "number",
                              "description": "媒体宽度，单位为像素。"
                            },
                            "height": {
                              "type": "number",
                              "description": "媒体高度，单位为像素。"
                            },
                            "name": {
                              "type": "string",
                              "description": "消息内容中的文件名或展示名称。"
                            },
                            "thumbUrl": {
                              "type": "string",
                              "description": "缩略图地址。"
                            }
                          }
                        },
                        "flag": {
                          "type": "number",
                          "description": "状态或能力标识；具体枚举以协议为准。"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {
                    "id": 1003739,
                    "syncKey": 11196813,
                    "messageType": 1,
                    "fromUserId": 1688857970889847,
                    "toUserId": 0,
                    "roomId": "10758922947847562",
                    "contentType": 29,
                    "sendTime": 1788158272,
                    "senderName": "示例名称",
                    "content": {
                      "url": "https://example.com/...",
                      "size": 45754,
                      "md5": "48BC89479099BDEB9965CB93C8884FB8",
                      "width": 240,
                      "height": 240,
                      "name": "辛苦了",
                      "thumbUrl": "https://example.com/..."
                    },
                    "flag": 83886080
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/message/sendLocation": {
      "post": {
        "tags": [
          "消息"
        ],
        "summary": "发送位置消息",
        "description": "### 接口用途\n用于发送位置消息。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；其他字段说明见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "message_sendLocation",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "conversationId": {
                    "type": "number",
                    "description": "会话唯一标识，可表示单聊或群聊会话。",
                    "example": "10758922947847562"
                  },
                  "content": {
                    "type": "object",
                    "description": "位置内容对象；字段见下。",
                    "properties": {
                      "longitude": {
                        "type": "number",
                        "description": "经度。"
                      },
                      "latitude": {
                        "type": "number",
                        "description": "纬度。"
                      },
                      "address": {
                        "type": "string",
                        "description": "详细地址。"
                      },
                      "title": {
                        "type": "string",
                        "description": "位置名称 / 标题。"
                      }
                    }
                  }
                },
                "required": [
                  "instance_guid",
                  "conversationId",
                  "content"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "conversationId": "10758922947847562",
                "content": {
                  "longitude": 121.12781,
                  "latitude": 31.148475,
                  "address": "示例地址",
                  "title": "示例位置"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "number",
                          "description": "发送成功后的消息内部标识。"
                        },
                        "syncKey": {
                          "type": "number",
                          "description": "增量同步游标，后续同步时应回传该值。"
                        },
                        "messageType": {
                          "type": "number",
                          "description": "消息类型编号；具体枚举以消息协议为准。"
                        },
                        "fromUserId": {
                          "type": "number",
                          "description": "消息发送方用户标识。"
                        },
                        "toUserId": {
                          "type": "number",
                          "description": "消息接收方用户标识。"
                        },
                        "roomId": {
                          "type": "string",
                          "description": "群聊或客户群唯一标识。"
                        },
                        "contentType": {
                          "type": "number",
                          "description": "消息内容类型编号；具体枚举以消息协议为准。"
                        },
                        "sendTime": {
                          "type": "number",
                          "description": "消息发送时间戳。"
                        },
                        "senderName": {
                          "type": "string",
                          "description": "消息发送方名称。"
                        },
                        "content": {
                          "type": "object",
                          "description": "发送成功后返回的消息内容或内容片段。",
                          "properties": {
                            "longitude": {
                              "type": "number",
                              "description": "经度。"
                            },
                            "latitude": {
                              "type": "number",
                              "description": "纬度。"
                            },
                            "address": {
                              "type": "string",
                              "description": "地址信息。"
                            },
                            "title": {
                              "type": "string",
                              "description": "标题。"
                            }
                          }
                        },
                        "flag": {
                          "type": "number",
                          "description": "状态或能力标识；具体枚举以协议为准。"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {
                    "id": 1003093,
                    "syncKey": 9548399,
                    "messageType": 1,
                    "fromUserId": 1688857970889847,
                    "toUserId": 0,
                    "roomId": "10758922947847562",
                    "contentType": 6,
                    "sendTime": 1788430205,
                    "senderName": "示例名称",
                    "content": {
                      "longitude": 121.12781,
                      "latitude": 31.148475,
                      "address": "示例地址",
                      "title": "示例位置"
                    },
                    "flag": 83886080
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/message/revoke": {
      "post": {
        "tags": [
          "消息"
        ],
        "summary": "撤回消息",
        "description": "### 接口用途\n用于撤回消息。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；其他字段说明见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "message_revoke",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "conversationId": {
                    "type": "number",
                    "description": "会话唯一标识，可表示单聊或群聊会话。",
                    "example": "10758922947847562"
                  },
                  "serverMsgId": {
                    "type": "integer",
                    "description": "服务端消息标识。",
                    "example": 1003741
                  }
                },
                "required": [
                  "instance_guid",
                  "conversationId",
                  "serverMsgId"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "conversationId": "10758922947847562",
                "serverMsgId": 1003741
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {}
                }
              }
            }
          }
        }
      }
    },
    "/api/message/sendMiniProgram": {
      "post": {
        "tags": [
          "消息"
        ],
        "summary": "发送小程序",
        "description": "### 接口用途\n发送小程序卡片消息。\n\n### 请求说明\n请求体使用 JSON 格式，通过 instance_guid 指定已登录的星云实例，conversationId 指定目标会话。小程序信息放在 content.weAppMessage 对象中，content.title 为卡片标题。\n\n字段名区分大小写：使用 weAppMessage、pagePath、thumbAESKey 和 thumbMD5，不使用 miniProgramDetails、path 或 cover* 字段。pagePath 中的查询参数按原始内容传入。\n\n缩略图文件标识、AES 密钥、MD5、大小和尺寸应来自同一张缩略图；示例里的尖括号内容为占位值，发送前替换为实际值。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "message_sendMiniProgram",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "conversationId": {
                    "type": "number",
                    "description": "会话唯一标识，可表示单聊或群聊会话。",
                    "example": "10758922947847562"
                  },
                  "content": {
                    "type": "object",
                    "description": "小程序卡片内容对象，包含 title 和 weAppMessage；在表单模式中作为完整 JSON 对象编辑。",
                    "properties": {
                      "title": {
                        "type": "string",
                        "description": "小程序卡片标题。",
                        "example": "示例小程序标题"
                      },
                      "weAppMessage": {
                        "type": "object",
                        "description": "小程序详情对象；具体字段见下方 content.weAppMessage.* 说明。",
                        "properties": {
                          "username": {
                            "type": "string",
                            "description": "小程序原始账号标识，例如 gh_xxxxxxxx@app；不是星云实例标识。",
                            "example": "gh_xxxxxxxx@app"
                          },
                          "pagePath": {
                            "type": "string",
                            "description": "小程序页面路径或携带查询参数的路径；保留原始内容、大小写及 & 分隔符，不要改成 path 字段。",
                            "example": "pages/index/index?scene=example&from=share"
                          },
                          "title": {
                            "type": "string",
                            "description": "小程序详情中的标题；示例与 content.title 使用相同标题。",
                            "example": "示例小程序标题"
                          },
                          "desc": {
                            "type": "string",
                            "description": "小程序描述，可以传空字符串。"
                          },
                          "weAppIconUrl": {
                            "type": "string",
                            "description": "小程序图标的 HTTP/HTTPS 地址；不是缩略图文件标识。",
                            "example": "https://example.com/miniprogram-icon.png"
                          },
                          "type": {
                            "type": "integer",
                            "description": "小程序类型值，示例为 2；按原始小程序信息填写。",
                            "example": 2
                          },
                          "version": {
                            "type": "integer",
                            "description": "小程序版本号，示例为 475；按实际小程序版本填写。",
                            "example": 475
                          },
                          "appServiceType": {
                            "type": "integer",
                            "description": "小程序服务类型值，示例为 4；按原始小程序信息填写。",
                            "example": 4
                          },
                          "pkginfoType": {
                            "type": "integer",
                            "description": "小程序包信息类型值，示例为 0；注意字段名中的大小写。",
                            "example": 0
                          },
                          "thumbFileId": {
                            "type": "string",
                            "description": "小程序卡片缩略图的文件标识；与下方 AES 密钥、MD5、大小及尺寸使用同一张缩略图的配套数据。",
                            "example": "<缩略图文件标识>"
                          },
                          "thumbAESKey": {
                            "type": "string",
                            "description": "缩略图 AES 密钥；字段名必须为 thumbAESKey，保留 AES 的大写。示例为占位值，发送前替换为与 thumbFileId 配套的实际值。",
                            "example": "<缩略图AES密钥>"
                          },
                          "thumbMD5": {
                            "type": "string",
                            "description": "缩略图文件的 MD5 校验值；字段名必须为 thumbMD5，保留 MD5 的大写。",
                            "example": "<缩略图MD5>"
                          },
                          "thumbSize": {
                            "type": "integer",
                            "description": "缩略图文件大小，单位为字节。",
                            "example": 43336
                          },
                          "thumbWidth": {
                            "type": "integer",
                            "description": "缩略图宽度，单位为像素。",
                            "example": 500
                          },
                          "thumbHeight": {
                            "type": "integer",
                            "description": "缩略图高度，单位为像素。",
                            "example": 400
                          },
                          "thumbFileIdRetransmitted": {
                            "type": "integer",
                            "description": "缩略图文件标识的转发标记，示例为 1；按原始小程序信息填写。",
                            "example": 1
                          }
                        }
                      }
                    }
                  }
                },
                "required": [
                  "instance_guid",
                  "conversationId"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "conversationId": "10758922947847562",
                "content": {
                  "title": "示例小程序标题",
                  "weAppMessage": {
                    "username": "gh_xxxxxxxx@app",
                    "pagePath": "pages/index/index?scene=example&from=share",
                    "title": "示例小程序标题",
                    "desc": "",
                    "weAppIconUrl": "https://example.com/miniprogram-icon.png",
                    "type": 2,
                    "version": 475,
                    "appServiceType": 4,
                    "pkginfoType": 0,
                    "thumbFileId": "<缩略图文件标识>",
                    "thumbAESKey": "<缩略图AES密钥>",
                    "thumbMD5": "<缩略图MD5>",
                    "thumbSize": 43336,
                    "thumbWidth": 500,
                    "thumbHeight": 400,
                    "thumbFileIdRetransmitted": 1
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "number",
                          "description": "发送成功后的消息内部标识。"
                        },
                        "syncKey": {
                          "type": "number",
                          "description": "增量同步游标，后续同步时应回传该值。"
                        },
                        "messageType": {
                          "type": "number",
                          "description": "会话类型：0=单聊，1=群聊；另有 3、4 等值为系统/通知等特定会话类型，具体以实际返回为准"
                        },
                        "fromUserId": {
                          "type": "number",
                          "description": "消息发送方用户标识。"
                        },
                        "toUserId": {
                          "type": "number",
                          "description": "消息接收方用户标识。"
                        },
                        "roomId": {
                          "type": "string",
                          "description": "群聊或客户群唯一标识。"
                        },
                        "contentType": {
                          "type": "number",
                          "description": "消息内容类型码（见「回调结构说明」类型总览）"
                        },
                        "sendTime": {
                          "type": "number",
                          "description": "发送时间（秒级时间戳）"
                        },
                        "senderName": {
                          "type": "string",
                          "description": "消息发送方名称。"
                        },
                        "content": {
                          "type": "object",
                          "description": "发送成功后返回的消息内容或内容片段。",
                          "properties": {
                            "title": {
                              "type": "string",
                              "description": "标题。"
                            },
                            "miniProgramDetails": {
                              "type": "object",
                              "description": "小程序卡片详细信息。"
                            }
                          }
                        },
                        "flag": {
                          "type": "number",
                          "description": "消息标志位（内部）"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {
                    "id": 1003112,
                    "syncKey": 9548408,
                    "messageType": 1,
                    "fromUserId": 1688857970889847,
                    "toUserId": 0,
                    "roomId": "10758922947847562",
                    "contentType": 78,
                    "sendTime": 1788431500,
                    "senderName": "示例名称",
                    "content": {
                      "title": "示例小程序标题",
                      "miniProgramDetails": {
                        "username": "gh_xxxxxxxx@app",
                        "path": "pages/index/index.html",
                        "coverUrl": "https://example.com/...",
                        "title": "示例小程序标题",
                        "appName": "示例小程序",
                        "coverFileId": "<fileId 省略>",
                        "coverMd5": "<省略>",
                        "coverAesKey": "<省略>",
                        "coverSize": 57102,
                        "coverWidth": 500,
                        "coverHeight": 400
                      }
                    },
                    "flag": 83886080
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/message/getMaterialList": {
      "post": {
        "tags": [
          "消息"
        ],
        "summary": "群发助手-获取素材库列表",
        "description": "### 接口用途\n用于群发助手-获取素材库列表。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；其他字段说明见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "message_getMaterialList",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "nextPageStr": {
                    "type": "string",
                    "description": "下一页分页游标或分页标识。"
                  }
                },
                "required": [
                  "instance_guid",
                  "nextPageStr"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "nextPageStr": ""
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "isEnd": {
                          "type": "boolean",
                          "description": "是否已到达本次分页或同步数据末尾。"
                        },
                        "list": {
                          "nullable": true,
                          "description": "素材数据列表。"
                        },
                        "nextPageStr": {
                          "type": "string",
                          "description": "下一页游标"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {
                    "isEnd": true,
                    "list": null,
                    "nextPageStr": "CAA="
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/message/groupSend": {
      "post": {
        "tags": [
          "消息"
        ],
        "summary": "群发助手-群发",
        "description": "### 接口用途\n用于群发助手-群发。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；其他字段说明见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "message_groupSend",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "customerGroup": {
                    "type": "boolean",
                    "description": "群发对象类型：true=按群群发（receiverList 填群 ID），false=按客户群发（receiverList 填客户 ID）。",
                    "example": true
                  },
                  "contentList": {
                    "type": "array",
                    "items": {},
                    "description": "消息或素材内容列表。"
                  },
                  "receiverList": {
                    "type": "array",
                    "items": {},
                    "description": "接收者列表；须与 customerGroup 对应——customerGroup=true 只能填群 ID，customerGroup=false 只能填客户 ID，两者不可混填。"
                  },
                  "materialId": {
                    "type": "number",
                    "description": "素材库素材 ID；若 contentList 不是取自素材库，则传 0。",
                    "example": "117159486110430465"
                  }
                },
                "required": [
                  "instance_guid",
                  "customerGroup",
                  "contentList",
                  "receiverList",
                  "materialId"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "customerGroup": true,
                "contentList": [
                  {
                    "contentType": 0,
                    "content": [
                      {
                        "type": 3,
                        "text": "[撇嘴]"
                      },
                      {
                        "type": 0,
                        "text": "企业"
                      }
                    ]
                  },
                  {
                    "contentType": 14,
                    "content": {
                      "id": "<fileId 省略>",
                      "size": 570260,
                      "width": 828,
                      "height": 1792,
                      "aesKey": "<省略>",
                      "md5": "f6e096cd0aa81c8c7204ba40054442a3"
                    }
                  },
                  {
                    "contentType": 22,
                    "content": {
                      "id": "<fileId 省略>",
                      "size": 285357,
                      "duration": 2,
                      "width": 1280,
                      "height": 720,
                      "thumbUrl": "https://example.com/...",
                      "md5": "991510539179cd7fe6460bf9bfeeefe8"
                    }
                  },
                  {
                    "contentType": 20,
                    "content": {}
                  }
                ],
                "receiverList": [
                  "10758922947847562"
                ],
                "materialId": "117159486110430465"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "msgId": {
                          "type": "string",
                          "description": "消息标识。"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {
                    "msgId": "117188871652474860"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/message/groupSendPending": {
      "post": {
        "tags": [
          "消息"
        ],
        "summary": "群发助手-发送（待发送消息）",
        "description": "### 接口用途\n用于群发助手-发送（待发送消息）。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；其他字段说明见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "message_groupSendPending",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "id": {
                    "type": "number",
                    "description": "业务对象标识。",
                    "example": "117159486110430465"
                  },
                  "contentList": {
                    "type": "array",
                    "items": {},
                    "description": "消息或素材内容列表。"
                  },
                  "conversationType": {
                    "type": "integer",
                    "description": "会话类型标识；具体枚举以会话协议为准。",
                    "example": 0
                  }
                },
                "required": [
                  "instance_guid",
                  "id",
                  "contentList",
                  "conversationType"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "id": "117159486110430465",
                "contentList": [
                  {
                    "contentType": 0,
                    "content": [
                      {
                        "type": 0,
                        "text": "坎坎坷坷"
                      }
                    ]
                  }
                ],
                "conversationType": 0
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "count": {
                          "type": "number",
                          "description": "数据总数。"
                        },
                        "isEnd": {
                          "type": "boolean",
                          "description": "是否已到达本次分页或同步数据末尾。"
                        },
                        "list": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "number",
                                "description": "业务记录或消息内部标识。"
                              },
                              "syncKey": {
                                "type": "number",
                                "description": "增量同步游标，后续同步时应回传该值。"
                              },
                              "roomType": {
                                "type": "boolean",
                                "description": "会话是否为群聊的标识；具体布尔含义以服务端返回为准。"
                              },
                              "fromUserId": {
                                "type": "number",
                                "description": "消息发送方用户标识。"
                              },
                              "toUserId": {
                                "type": "number",
                                "description": "消息接收方用户标识。"
                              },
                              "roomId": {
                                "type": "number",
                                "description": "群聊或客户群唯一标识。"
                              },
                              "msgType": {
                                "type": "number",
                                "description": "消息类型编号。"
                              },
                              "timestamp": {
                                "type": "number",
                                "description": "消息或事件时间戳。"
                              },
                              "content": {
                                "type": "object",
                                "description": "消息或业务内容对象；具体结构随内容类型而变化。"
                              }
                            }
                          },
                          "description": "业务数据列表。"
                        },
                        "syncKey": {
                          "type": "number",
                          "description": "增量同步游标，后续同步时应回传该值。"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {
                    "count": 9,
                    "isEnd": false,
                    "list": [
                      {
                        "id": 1005584,
                        "syncKey": 18185826,
                        "roomType": true,
                        "fromUserId": 10120,
                        "toUserId": 1688858348844282,
                        "roomId": 10120,
                        "msgType": 31,
                        "timestamp": 1783903816,
                        "content": {
                          "msgType": 31,
                          "contentBase64": "<base64 数据，示例省略>"
                        }
                      },
                      {
                        "id": 1005595,
                        "syncKey": 18185830,
                        "roomType": false,
                        "fromUserId": 1688858348844282,
                        "toUserId": 1688852792312821,
                        "msgType": 2001,
                        "timestamp": 1783908138,
                        "senderName": "示例名称",
                        "content": {
                          "msgType": 2001,
                          "contentBase64": "<base64 数据，示例省略>"
                        }
                      },
                      {
                        "id": 1005600,
                        "syncKey": 18185832,
                        "roomType": true,
                        "fromUserId": 10201,
                        "roomId": 10201,
                        "msgType": 2001,
                        "timestamp": 1783908325,
                        "senderName": "示例名称",
                        "content": {
                          "msgType": 2001,
                          "contentBase64": "<base64 数据，示例省略>"
                        }
                      },
                      {
                        "id": 1005602,
                        "syncKey": 18185833,
                        "roomType": true,
                        "fromUserId": 10120,
                        "roomId": 10120,
                        "msgType": 2001,
                        "timestamp": 1783908333,
                        "senderName": "示例名称",
                        "content": {
                          "msgType": 2001,
                          "contentBase64": "<base64 数据，示例省略>"
                        }
                      },
                      {
                        "id": 1005618,
                        "syncKey": 18185839,
                        "roomType": true,
                        "fromUserId": 10120,
                        "toUserId": 1688858348844282,
                        "roomId": 10120,
                        "msgType": 31,
                        "timestamp": 1783989306,
                        "content": {
                          "msgType": 31,
                          "contentBase64": "<base64 数据，示例省略>"
                        }
                      },
                      {
                        "id": 1005640,
                        "syncKey": 18185848,
                        "roomType": true,
                        "fromUserId": 10120,
                        "toUserId": 1688858348844282,
                        "roomId": 10120,
                        "msgType": 31,
                        "timestamp": 1784073685,
                        "content": {
                          "msgType": 31,
                          "contentBase64": "<base64 数据，示例省略>"
                        }
                      },
                      {
                        "id": 1005643,
                        "syncKey": 18185856,
                        "roomType": true,
                        "fromUserId": 10120,
                        "toUserId": 1688858348844282,
                        "roomId": 10120,
                        "msgType": 31,
                        "timestamp": 1784162270,
                        "content": {
                          "msgType": 31,
                          "contentBase64": "<base64 数据，示例省略>"
                        }
                      },
                      {
                        "id": 1005646,
                        "syncKey": 18185867,
                        "roomType": true,
                        "fromUserId": 10120,
                        "toUserId": 1688858348844282,
                        "roomId": 10120,
                        "msgType": 31,
                        "timestamp": 1784248068,
                        "content": {
                          "msgType": 31,
                          "contentBase64": "<base64 数据，示例省略>"
                        }
                      },
                      {
                        "id": 1005650,
                        "syncKey": 18185868,
                        "roomType": true,
                        "fromUserId": 10060,
                        "roomId": 10060,
                        "msgType": 105,
                        "timestamp": 1784286458,
                        "content": {
                          "msgType": 105,
                          "contentBase64": "<base64 数据，示例省略>"
                        }
                      }
                    ],
                    "syncKey": 18185868
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/message/voiceToTextGetId": {
      "post": {
        "tags": [
          "消息"
        ],
        "summary": "语音转文字·取任务ID",
        "description": "### 接口用途\n用于语音转文字·取任务ID。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定实例；大整数 ID（会话/群/成员/序号等）请以字符串传递，避免 JS 精度丢失。其他字段见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "message_voiceToTextGetId",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "msgId": {
                    "type": "number",
                    "description": "语音消息的服务端消息 ID（从 message/sync 的 list[].id 或消息回调取，语音消息 contentType=16）",
                    "example": "1001881"
                  }
                },
                "required": [
                  "instance_guid",
                  "msgId"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "msgId": 1001881
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "voiceId": {
                          "type": "string",
                          "description": "转写任务句柄（查询结果用）"
                        },
                        "queryIntervalMs": {
                          "type": "number",
                          "description": "建议轮询间隔（毫秒）"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {
                    "voiceId": "<voiceId 省略>",
                    "queryIntervalMs": 0
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/message/voiceToTextQuery": {
      "post": {
        "tags": [
          "消息"
        ],
        "summary": "语音转文字·查询结果",
        "description": "### 接口用途\n用于语音转文字·查询结果。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定实例；大整数 ID（会话/群/成员/序号等）请以字符串传递，避免 JS 精度丢失。其他字段见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "message_voiceToTextQuery",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "voiceId": {
                    "type": "string",
                    "description": "语音资源标识；取自「语音转文字·取任务ID」接口的响应。",
                    "example": "<voiceId 省略>"
                  },
                  "msgId": {
                    "type": "integer",
                    "description": "消息 ID。",
                    "example": "1001881"
                  },
                  "seqId": {
                    "type": "integer",
                    "description": "固定传 0，无需修改。",
                    "example": 0
                  },
                  "scene": {
                    "type": "integer",
                    "description": "固定传 2，无需修改。",
                    "example": 2
                  }
                },
                "required": [
                  "instance_guid",
                  "voiceId",
                  "msgId",
                  "seqId"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "voiceId": "<voiceId 省略>",
                "msgId": 1001881,
                "seqId": 0,
                "scene": 2
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "text": {
                          "type": "string",
                          "description": "文本内容。"
                        },
                        "isEnd": {
                          "type": "boolean",
                          "description": "是否已到达本次分页或同步数据末尾。"
                        },
                        "seqId": {
                          "type": "number",
                          "description": "序列标识，用于表示数据顺序或版本。"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {
                    "text": "转写出的文字内容",
                    "isEnd": true,
                    "seqId": 0
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/message/getPendingGroupSendList": {
      "post": {
        "tags": [
          "消息"
        ],
        "summary": "查询待发群发",
        "description": "### 接口用途\n用于查询待发群发。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定实例；大整数 ID（会话/群/成员/序号等）请以字符串传递，避免 JS 精度丢失。其他字段见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "message_getPendingGroupSendList",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  }
                },
                "required": [
                  "instance_guid"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "hasMore": {
                          "type": "boolean",
                          "description": "是否还有更多"
                        },
                        "list": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "number",
                                "description": "记录/消息服务端 id"
                              },
                              "seq": {
                                "type": "number",
                                "description": "分页/增量游标"
                              },
                              "timeStamp": {
                                "type": "number",
                                "description": "群发任务时间戳"
                              },
                              "totalCnt": {
                                "type": "number",
                                "description": "群发目标总数"
                              },
                              "nowCnt": {
                                "type": "number",
                                "description": "群发已处理数"
                              },
                              "contentList": {
                                "type": "array",
                                "items": {},
                                "description": "待发送内容列表"
                              }
                            }
                          },
                          "description": "结果列表"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {
                    "hasMore": false,
                    "list": [
                      {
                        "id": 123,
                        "seq": 1,
                        "timeStamp": 1788000000,
                        "totalCnt": 10,
                        "nowCnt": 0,
                        "contentList": [
                          {
                            "contentType": 0,
                            "content": [
                              {
                                "type": 0,
                                "text": "示例群发文案"
                              }
                            ]
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/message/getGroupSendRecord": {
      "post": {
        "tags": [
          "消息"
        ],
        "summary": "群发助手-获取群发记录（个人）",
        "description": "### 接口用途\n查询当前账号通过「群发助手」发出的群发记录：每次群发的发送时间、发给客户还是客户群、发送进度和发送内容。\n\n### 调用时机\n调用「群发助手-群发」或「群发助手-发送（待发送消息）」之后，用本接口查看群发是否已发出、发了多少个对象；也可用于对账。\n\n### 注意\n- 只需要传 instance_guid，没有分页参数，一次返回该账号的全部群发记录（data.isEnd=true 表示已全部返回）。\n- 只包含当前账号自己创建的群发（creator 为当前账号的用户 ID）。\n- contentList[].content 是企业微信内部格式的 Base64 编码数据，一般不需要解析；按 contentType 区分内容类型即可。\n- id、roomIds 等超长 ID 以字符串返回，避免 JS 精度丢失；creator 为数字。",
        "operationId": "message_getGroupSendRecord",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  }
                },
                "required": [
                  "instance_guid"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "isEnd": {
                          "type": "boolean",
                          "description": "是否已返回全部记录。true 表示没有更多数据。"
                        },
                        "list": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "群发任务 ID（大整数，以字符串返回），用于区分每一次群发。"
                              },
                              "seq": {
                                "type": "number",
                                "description": "记录序号。"
                              },
                              "timeStamp": {
                                "type": "number",
                                "description": "群发创建时间，Unix 时间戳（秒）。"
                              },
                              "execTime": {
                                "type": "number",
                                "description": "群发执行时间，Unix 时间戳（秒）；立即发送时与 timeStamp 相同。"
                              },
                              "totalCnt": {
                                "type": "number",
                                "description": "本次群发的目标总数（客户数或客户群数）。"
                              },
                              "nowCnt": {
                                "type": "number",
                                "description": "已发送的目标数；与 totalCnt 相等表示已全部发出。"
                              },
                              "conversationType": {
                                "type": "number",
                                "description": "群发对象类型：0 = 客户（单聊），1 = 客户群。"
                              },
                              "status": {
                                "type": "number",
                                "description": "群发状态（实测已发出的群发为 1）。"
                              },
                              "sendType": {
                                "type": "number",
                                "description": "发送方式（实测通过群发助手发送为 1）。"
                              },
                              "groupId": {
                                "type": "number",
                                "description": "所属分组 ID，0 表示未分组。"
                              },
                              "creator": {
                                "type": "number",
                                "description": "创建这次群发的成员用户 ID（即当前账号）。"
                              },
                              "sendModel": {
                                "type": "object",
                                "description": "发送范围设置。",
                                "properties": {
                                  "type": {
                                    "type": "number",
                                    "description": "发送范围类型（实测为 0：按指定对象发送）。"
                                  },
                                  "range": {
                                    "type": "object",
                                    "properties": {
                                      "roomIds": {
                                        "type": "array",
                                        "items": {},
                                        "description": "群发到的客户群 ID 列表（conversationType=1 时返回，元素为字符串）。"
                                      }
                                    }
                                  },
                                  "groupId": {
                                    "type": "number",
                                    "description": "发送范围所属分组 ID，0 表示未分组。"
                                  }
                                }
                              },
                              "extraInfo": {
                                "type": "object",
                                "description": "发送人统计信息（senderNums / senderTotalNums / serviceMember，企业微信内部统计字段，一般无需关注）。"
                              },
                              "contentList": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "contentType": {
                                      "type": "number",
                                      "description": "内容类型：0 = 文本，14 = 图片，22 = 视频，20 = 文件（与「群发助手-群发」的 contentType 一致）。"
                                    },
                                    "content": {
                                      "type": "string",
                                      "description": "内容数据（企业微信内部格式，Base64 编码）。文件类（contentType=20）可能为空。"
                                    },
                                    "appInfo": {
                                      "type": "string",
                                      "description": "这条内容的消息唯一标识。"
                                    }
                                  }
                                },
                                "description": "本次群发的内容列表，一次群发可包含多条内容。"
                              }
                            }
                          },
                          "description": "群发记录列表，每一项是一次群发。"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {
                    "isEnd": true,
                    "list": [
                      {
                        "id": "117469532305735383",
                        "seq": 11636818,
                        "timeStamp": 1792500000,
                        "execTime": 1792500000,
                        "totalCnt": 2,
                        "nowCnt": 2,
                        "conversationType": 1,
                        "status": 1,
                        "sendType": 1,
                        "groupId": 0,
                        "creator": 1688850000000001,
                        "sendModel": {
                          "type": 0,
                          "range": {
                            "roomIds": [
                              "10920000000000001",
                              "10920000000000002"
                            ]
                          },
                          "groupId": 0
                        },
                        "extraInfo": {
                          "senderNums": 0,
                          "senderTotalNums": 1,
                          "serviceMember": 1
                        },
                        "contentList": [
                          {
                            "contentType": 0,
                            "content": "CgYKBOS9oOWlvQ==",
                            "appInfo": "CAQQiaO51AYY4Y+oq5SAgAMg56GIsQQ="
                          },
                          {
                            "contentType": 14,
                            "content": "<Base64 编码数据，已省略>",
                            "appInfo": "CAQQiaO51AYY4Y+oq5SAgAMg56GIsQU="
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/message/roomMessageTopAdd": {
      "post": {
        "tags": [
          "消息"
        ],
        "summary": "群消息置顶",
        "description": "### 接口用途\n用于群消息置顶。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定实例；大整数 ID（会话/群/成员/序号等）请以字符串传递，避免 JS 精度丢失。其他字段见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "message_roomMessageTopAdd",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  }
                },
                "required": [
                  "instance_guid"
                ],
                "additionalProperties": true,
                "description": "要操作的完整消息对象：把 send* 接口返回或消息回调拿到的消息 data 原样放到 body 顶层（含 id/roomId/contentType/content 等）"
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "id": 1003044,
                "syncKey": 9548374,
                "messageType": 1,
                "fromUserId": 1688850000000000,
                "roomId": "10758922947847562",
                "contentType": 0,
                "sendTime": 1788429415,
                "content": [
                  {
                    "type": 0,
                    "text": "示例消息"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {}
                }
              }
            }
          }
        }
      }
    },
    "/api/message/roomMessageTopDel": {
      "post": {
        "tags": [
          "消息"
        ],
        "summary": "取消群消息置顶",
        "description": "### 接口用途\n用于取消群消息置顶。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定实例；大整数 ID（会话/群/成员/序号等）请以字符串传递，避免 JS 精度丢失。其他字段见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "message_roomMessageTopDel",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "roomId": {
                    "type": "number",
                    "description": "群聊或客户群唯一标识。",
                    "example": "10758922947847562"
                  },
                  "topId": {
                    "type": "integer",
                    "description": "置顶记录标识。",
                    "example": "3"
                  }
                },
                "required": [
                  "instance_guid",
                  "roomId",
                  "topId"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "roomId": "10758922947847562",
                "topId": 3
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {}
                }
              }
            }
          }
        }
      }
    },
    "/api/message/roomMessageTopGetList": {
      "post": {
        "tags": [
          "消息"
        ],
        "summary": "获取群置顶消息",
        "description": "### 接口用途\n用于获取群置顶消息。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定实例；大整数 ID（会话/群/成员/序号等）请以字符串传递，避免 JS 精度丢失。其他字段见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "message_roomMessageTopGetList",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "roomId": {
                    "type": "number",
                    "description": "群聊或客户群唯一标识。",
                    "example": "10758922947847562"
                  }
                },
                "required": [
                  "instance_guid",
                  "roomId"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "roomId": "10758922947847562"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "list": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "topId": {
                                "type": "number",
                                "description": "群置顶记录 id"
                              },
                              "roomId": {
                                "type": "string",
                                "description": "群/会话 id（群消息时有值；大整数以字符串返回）"
                              },
                              "messageId": {
                                "type": "number",
                                "description": "被置顶消息 id"
                              },
                              "operator": {
                                "type": "number",
                                "description": "操作人 id"
                              },
                              "topTime": {
                                "type": "number",
                                "description": "置顶时间戳"
                              }
                            }
                          },
                          "description": "结果列表"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {
                    "list": [
                      {
                        "topId": 3,
                        "roomId": "10758922947847562",
                        "messageId": 1003044,
                        "operator": 1688850000000000,
                        "topTime": 1788000000
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/contact/getSyncList": {
      "post": {
        "tags": [
          "联系人"
        ],
        "summary": "同步通讯录id",
        "description": "### 接口用途\n用于同步通讯录id。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；其他字段说明见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "contact_getSyncList",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "svrVersion": {
                    "type": "string",
                    "description": "服务端数据版本号。"
                  }
                },
                "required": [
                  "instance_guid",
                  "svrVersion"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "svrVersion": ""
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "change": {
                          "type": "boolean",
                          "description": "变更信息或变更类型；具体含义以接口返回为准。"
                        },
                        "needFullUpdate": {
                          "type": "boolean",
                          "description": "是否需要执行全量更新。"
                        },
                        "svrVersion": {
                          "type": "string",
                          "description": "服务端数据版本号。"
                        },
                        "nodeList": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "number",
                                "description": "通讯录节点类型标识；具体枚举以服务端协议为准。"
                              },
                              "partyId": {
                                "type": "number",
                                "description": "部门或组织节点标识。"
                              },
                              "seq": {
                                "type": "string",
                                "description": "数据序号或版本序列。"
                              }
                            }
                          },
                          "description": "组织或成员节点列表。"
                        },
                        "corpScale": {
                          "type": "number",
                          "description": "企业规模标识；具体枚举以服务端协议为准。"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {
                    "change": true,
                    "needFullUpdate": true,
                    "svrVersion": "<省略>",
                    "nodeList": [
                      {
                        "type": 2,
                        "partyId": 1688854675899380,
                        "seq": "7667025669699665921"
                      },
                      {
                        "type": 2,
                        "partyId": 1688854578848543,
                        "seq": "7667383498465869825"
                      }
                    ],
                    "corpScale": 1
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/contact/fetchUsersProfileBatch": {
      "post": {
        "tags": [
          "联系人"
        ],
        "summary": "批量获取通讯录详细信息",
        "description": "### 接口用途\n用于批量获取通讯录详细信息。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；其他字段说明见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "contact_fetchUsersProfileBatch",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "nodeList": {
                    "type": "array",
                    "items": {},
                    "description": "组织或成员节点列表。"
                  }
                },
                "required": [
                  "instance_guid",
                  "nodeList"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "nodeList": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "patchList": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "department": {
                                "type": "object",
                                "description": "部门信息。"
                              },
                              "nodeType": {
                                "type": "number",
                                "description": "节点类型标识；具体枚举以服务端协议为准。"
                              }
                            }
                          },
                          "description": "增量变更数据列表。"
                        },
                        "isTrimUserInfo": {
                          "type": "boolean",
                          "description": "是否精简用户信息返回。"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {
                    "patchList": [
                      {
                        "department": {
                          "partyId": 1688854675899380
                        },
                        "nodeType": 2
                      },
                      {
                        "department": {
                          "partyId": 1688854578848543
                        },
                        "nodeType": 2
                      }
                    ],
                    "isTrimUserInfo": false
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/contact/getUserProfileDetail": {
      "post": {
        "tags": [
          "联系人"
        ],
        "summary": "获取用户资料详情",
        "description": "### 接口用途\n用于获取用户资料详情。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；其他字段说明见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "contact_getUserProfileDetail",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "userIdList": {
                    "type": "array",
                    "items": {},
                    "description": "用户 ID 列表（数字数组，可批量查询多个用户）。ID 为数字，不带引号。"
                  }
                },
                "required": [
                  "instance_guid",
                  "userIdList"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "userIdList": [
                  1688850000000000
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "vid": {
                                "type": "number",
                                "description": "用户 vid（唯一标识）。"
                              },
                              "level": {
                                "type": "number",
                                "description": "关系 / 资料层级（以实际返回为准）。"
                              },
                              "info": {
                                "type": "object",
                                "description": "用户资料对象；字段见下。",
                                "properties": {
                                  "uin": {
                                    "type": "number",
                                    "description": "用户 uin（唯一标识）"
                                  },
                                  "name": {
                                    "type": "string",
                                    "description": "名称 / 昵称"
                                  },
                                  "emailAddr": {
                                    "type": "string",
                                    "description": "邮箱地址"
                                  },
                                  "birthday": {
                                    "type": "string",
                                    "description": "生日"
                                  },
                                  "phone": {
                                    "type": "string",
                                    "description": "电话"
                                  },
                                  "job": {
                                    "type": "string",
                                    "description": "职位"
                                  },
                                  "number": {
                                    "type": "string",
                                    "description": "编号"
                                  },
                                  "gender": {
                                    "type": "number",
                                    "description": "性别（0=未知，1=男，2=女）"
                                  },
                                  "iconUrl": {
                                    "type": "string",
                                    "description": "头像地址"
                                  },
                                  "corpId": {
                                    "type": "number",
                                    "description": "所属企业 ID"
                                  },
                                  "attr": {
                                    "type": "number",
                                    "description": "属性位（以实际返回为准）"
                                  },
                                  "dispOrder": {
                                    "type": "number",
                                    "description": "展示排序（以实际返回为准）"
                                  },
                                  "bizUin": {
                                    "type": "number",
                                    "description": "业务 uin（以实际返回为准）"
                                  },
                                  "position": {
                                    "type": "string",
                                    "description": "职务"
                                  },
                                  "alias": {
                                    "type": "string",
                                    "description": "别名"
                                  },
                                  "mainPartyId": {
                                    "type": "number",
                                    "description": "主部门 ID"
                                  },
                                  "gid": {
                                    "type": "number",
                                    "description": "全局 ID（以实际返回为准）"
                                  },
                                  "isNameVerified": {
                                    "type": "boolean",
                                    "description": "是否已实名认证"
                                  },
                                  "internationCode": {
                                    "type": "string",
                                    "description": "手机号国际区号"
                                  },
                                  "bindEmailStatus": {
                                    "type": "number",
                                    "description": "邮箱绑定状态（以实际返回为准）"
                                  },
                                  "englishName": {
                                    "type": "string",
                                    "description": "英文名 / 拼音名"
                                  },
                                  "customInfo": {
                                    "type": "object",
                                    "description": "自定义信息对象"
                                  },
                                  "nameVerifyStatus": {
                                    "type": "number",
                                    "description": "名称认证状态（以实际返回为准）"
                                  },
                                  "realName": {
                                    "type": "string",
                                    "description": "实名"
                                  },
                                  "vCorpUseStatus": {
                                    "type": "number",
                                    "description": "企业使用状态（以实际返回为准）"
                                  },
                                  "inviteVid": {
                                    "type": "number",
                                    "description": "邀请人 vid"
                                  },
                                  "holidayInfo": {
                                    "type": "object",
                                    "description": "假期信息对象"
                                  },
                                  "xcxStyle": {
                                    "type": "number",
                                    "description": "小程序样式（以实际返回为准）"
                                  },
                                  "attr2": {
                                    "type": "number",
                                    "description": "属性位 2（以实际返回为准）"
                                  },
                                  "tencentInfo": {
                                    "type": "object",
                                    "description": "扩展信息对象"
                                  },
                                  "isSyncInnerPosition": {
                                    "type": "boolean",
                                    "description": "是否同步内部职务"
                                  },
                                  "unionId": {
                                    "type": "string",
                                    "description": "微信 unionId"
                                  },
                                  "vCode": {
                                    "type": "string",
                                    "description": "校验码 vCode"
                                  },
                                  "personalWorkType": {
                                    "type": "number",
                                    "description": "个人工作类型（以实际返回为准）"
                                  },
                                  "bizMail": {
                                    "type": "string",
                                    "description": "企业邮箱"
                                  },
                                  "attr3": {
                                    "type": "number",
                                    "description": "属性位 3（以实际返回为准）"
                                  },
                                  "mobileAreaCode": {
                                    "type": "number",
                                    "description": "手机号归属区号（以实际返回为准）"
                                  }
                                }
                              }
                            }
                          }
                        }
                      },
                      "description": "用户资料列表（每个元素对应一个查询到的用户）。"
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": [
                    {
                      "vid": 1688850000000000,
                      "info": {
                        "uin": 1688850000000000,
                        "name": "星云API",
                        "emailAddr": "",
                        "birthday": "2000-01-01 00:00:00",
                        "phone": "",
                        "job": "",
                        "number": "",
                        "gender": 1,
                        "iconUrl": "https://example.com/...",
                        "corpId": 1970320000000000,
                        "attr": 134285632,
                        "dispOrder": 0,
                        "bizUin": 0,
                        "position": "",
                        "alias": "",
                        "mainPartyId": 1688850000000001,
                        "gid": 2251800000000000,
                        "isNameVerified": true,
                        "internationCode": "86",
                        "bindEmailStatus": 2,
                        "englishName": "XingYunAPI",
                        "customInfo": {},
                        "nameVerifyStatus": 1,
                        "realName": "星云API",
                        "vCorpUseStatus": 1000,
                        "inviteVid": 1688850000000002,
                        "holidayInfo": {
                          "holidayStatus": 0,
                          "holidayDesc": "",
                          "oldHolidayIconIndex": 0,
                          "createTime": 0,
                          "holidayInfoId": 0,
                          "holidayIconIndex": 0,
                          "holidayGenerateSrc": 0,
                          "holidayStatusNew": 0,
                          "vacationSyncType": 0
                        },
                        "xcxStyle": 0,
                        "attr2": 240779404,
                        "tencentInfo": {},
                        "isSyncInnerPosition": true,
                        "unionId": "oXXXXXXXXXXXXXXXXXXXX",
                        "vCode": "vcXXXXXXXXXXXXXXXX",
                        "personalWorkType": 0,
                        "bizMail": "noname@example.com",
                        "attr3": 0,
                        "mobileAreaCode": 0
                      },
                      "level": 3
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/contact/phoneNumberSearch": {
      "post": {
        "tags": [
          "联系人"
        ],
        "summary": "手机号搜索",
        "description": "### 接口用途\n用于手机号搜索。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；其他字段说明见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "contact_phoneNumberSearch",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "phone": {
                    "type": "string",
                    "description": "手机号码。",
                    "example": "138****8888"
                  }
                },
                "required": [
                  "instance_guid",
                  "phone"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "phone": "138****8888"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "array",
                      "items": {},
                      "description": "结果列表，元素结构如下"
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": [
                    {
                      "contactInfo": {
                        "uin": 1688857970889847,
                        "name": "星云API",
                        "mobile": "",
                        "gender": 1,
                        "iconUrl": "https://example.com/...",
                        "corpId": 1970324952577074,
                        "attr": 134285632,
                        "alias": "",
                        "mainPartyId": 1688854675899380,
                        "gid": 2251801625003765,
                        "isNameVerified": true,
                        "englishName": "示例名称",
                        "customInfo": {},
                        "nameVerifyStatus": 1,
                        "realName": "示例名称",
                        "attr2": 1046085764,
                        "externalCustomInfo": {},
                        "isSyncInnerPosition": true,
                        "unionId": "oXXXXXXXXXXXXXXXXXXXXXXXX",
                        "vCode": "vcXXXXXXXXXXXXXXXX",
                        "schoolUserType": 1,
                        "attr3": 0,
                        "corpDescInfo": {}
                      },
                      "corpInfo": {
                        "corpId": 1970324952577074,
                        "vid": 1688857970889847,
                        "corpName": "示例企业",
                        "createTime": 1785116462,
                        "ownerName": "星云API",
                        "staffNum": 0,
                        "trust": true,
                        "corpLogo": "https://example.com/...",
                        "corpDesc": "",
                        "staffInfo": {
                          "name": "星云API",
                          "phone": "",
                          "mail": "",
                          "headImage": "https://example.com/...",
                          "internationCode": "86",
                          "alias": ""
                        },
                        "isAccepted": true,
                        "corpStat": 2,
                        "corpFullName": "星云API",
                        "modUserInfo": {
                          "vid": 0,
                          "name": ""
                        },
                        "isInitModUser": false,
                        "authTime": 0,
                        "cmSubmitTime": 0,
                        "createSourceInfo": "",
                        "verifyMsg": "",
                        "hasInfoCorp": false,
                        "virtualCreateDomainName": "",
                        "language": 1,
                        "corpCardUrl": "https://example.com/...",
                        "authedDomain": "",
                        "bAuthedLicence": true,
                        "joinNeedVerify": false,
                        "pstnOfficePhoneState": 0,
                        "corpType": 15,
                        "authExpireTime": 1816654520,
                        "authLicenceStatus": 3,
                        "authCorpStatus": 1,
                        "sCorpId": "wwxxxxxxxxxxxxxxxx",
                        "corpAppWxaInfo": {
                          "userName": "gh_303bdfa3334c@app",
                          "instance_guid": "inst_xxxxxxxx",
                          "enterPath": "/pages/index/index.html",
                          "versionType": 0,
                          "version": 0
                        }
                      },
                      "searchStatus": 1,
                      "flag": 0,
                      "relation": 0,
                      "wxTicket": "<省略>",
                      "contactInfoWx": {
                        "uin": 7881303246306300,
                        "name": "星云API",
                        "gender": 0,
                        "iconUrl": "https://example.com/..."
                      },
                      "openid": "orFrbsgZntC8xzDrLShcnr1nx1pA",
                      "resultType": 1
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/contact/phoneNumberAddWechat": {
      "post": {
        "tags": [
          "联系人"
        ],
        "summary": "通过手机号添加个微",
        "description": "### 接口用途\n用于通过手机号添加个微。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；其他字段说明见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "contact_phoneNumberAddWechat",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "ticket": {
                    "type": "string",
                    "description": "业务票据或临时凭证。",
                    "example": "<省略>"
                  },
                  "openid": {
                    "type": "string",
                    "description": "用户 OpenID 标识。",
                    "example": "orFrbsgZntC8xzDrLShcnr1nx1pA"
                  },
                  "verifyMessage": {
                    "type": "string",
                    "description": "验证消息或验证说明。",
                    "example": "我是帅哥，添加你方便沟通一下"
                  },
                  "remarkPhone": {
                    "type": "array",
                    "items": {},
                    "description": "备注手机号列表。"
                  }
                },
                "required": [
                  "instance_guid",
                  "ticket",
                  "openid",
                  "verifyMessage",
                  "remarkPhone"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "ticket": "<省略>",
                "openid": "orFrbsgZntC8xzDrLShcnr1nx1pA",
                "verifyMessage": "我是帅哥，添加你方便沟通一下",
                "remarkPhone": [
                  {
                    "phone": "138****8888"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {}
                }
              }
            }
          }
        }
      }
    },
    "/api/contact/phoneNumberAddWework": {
      "post": {
        "tags": [
          "联系人"
        ],
        "summary": "通过手机号添加企微",
        "description": "### 接口用途\n用于通过手机号添加企微。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；其他字段说明见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "contact_phoneNumberAddWework",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "userid": {
                    "type": "number",
                    "description": "用户标识；取自「手机号搜索」响应的 data.weworkUserInfo.uin。",
                    "example": "312768100000000000"
                  },
                  "corpId": {
                    "type": "integer",
                    "description": "企业内部标识；取自「手机号搜索」响应的 data.weworkUserInfo.corpId。",
                    "example": 1970320000000000
                  },
                  "ticket": {
                    "type": "string",
                    "description": "业务票据；取自「手机号搜索」响应的 data.ticket。",
                    "example": "<省略>"
                  },
                  "verifyMessage": {
                    "type": "string",
                    "description": "验证消息或验证说明。",
                    "example": "你好，我是某某，很高兴认识你"
                  },
                  "remarkPhone": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "phone": {
                          "type": "string",
                          "description": "手机号。"
                        }
                      },
                      "required": [
                        "phone"
                      ]
                    },
                    "description": "手机号列表（数组，每个元素含 phone 字段）。"
                  }
                },
                "required": [
                  "instance_guid",
                  "userid",
                  "corpId",
                  "ticket",
                  "verifyMessage",
                  "remarkPhone"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "userid": "312768100000000000",
                "corpId": 1970320000000000,
                "ticket": "<省略>",
                "verifyMessage": "你好，我是某某，很高兴认识你",
                "remarkPhone": [
                  {
                    "phone": "138****8888"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {}
                }
              }
            }
          }
        }
      }
    },
    "/api/contact/agreeToNewCustomer": {
      "post": {
        "tags": [
          "联系人"
        ],
        "summary": "同意新客户",
        "description": "### 接口用途\n用于同意新客户。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；其他字段说明见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "contact_agreeToNewCustomer",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "userId": {
                    "type": "integer",
                    "description": "用户唯一标识。",
                    "example": 7881303246306300
                  }
                },
                "required": [
                  "instance_guid",
                  "userId"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "userId": 7881303246306300
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {}
                }
              }
            }
          }
        }
      }
    },
    "/api/contact/updateExternalContactInfo": {
      "post": {
        "tags": [
          "联系人"
        ],
        "summary": "更新外部联系人信息",
        "description": "### 接口用途\n用于更新外部联系人信息。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；其他字段说明见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "contact_updateExternalContactInfo",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "userId": {
                    "type": "integer",
                    "description": "用户 ID。",
                    "example": 1688850000000000
                  },
                  "remark": {
                    "type": "string",
                    "description": "描述。",
                    "example": "星云API"
                  },
                  "realRemark": {
                    "type": "string",
                    "description": "真实用户备注。",
                    "example": "星云API"
                  },
                  "remarkPhone": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "phone": {
                          "type": "string",
                          "description": "手机号。"
                        }
                      },
                      "required": [
                        "phone"
                      ]
                    },
                    "description": "备注手机号（数组，每个元素含 phone 字段）。"
                  },
                  "companyRemark": {
                    "type": "string",
                    "description": "企业备注（公司备注）。",
                    "example": "示例企业"
                  },
                  "remarkUrl": {
                    "type": "string",
                    "description": "描述内的备注 URL。"
                  }
                },
                "required": [
                  "instance_guid",
                  "userId",
                  "remark",
                  "realRemark",
                  "remarkPhone",
                  "companyRemark",
                  "remarkUrl"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "userId": 1688850000000000,
                "remark": "星云API",
                "realRemark": "星云API",
                "remarkPhone": [
                  {
                    "phone": "138****8888"
                  }
                ],
                "companyRemark": "示例企业",
                "remarkUrl": ""
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {}
                }
              }
            }
          }
        }
      }
    },
    "/api/contact/delete": {
      "post": {
        "tags": [
          "联系人"
        ],
        "summary": "删除联系人",
        "description": "### 接口用途\n用于删除联系人。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；其他字段说明见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "contact_delete",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "userid": {
                    "type": "integer",
                    "example": 7881302241438345
                  }
                },
                "required": [
                  "instance_guid"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "userid": 7881302241438345
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {}
                }
              }
            }
          }
        }
      }
    },
    "/api/contact/setColleagueRemark": {
      "post": {
        "tags": [
          "联系人"
        ],
        "summary": "设置同事备注",
        "description": "### 接口用途\n用于设置同事备注。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；其他字段说明见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "contact_setColleagueRemark",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "userId": {
                    "type": "integer",
                    "description": "用户唯一标识。",
                    "example": 1688857970889847
                  },
                  "remark": {
                    "type": "string",
                    "description": "联系人备注名称。",
                    "example": "星云API"
                  },
                  "description": {
                    "type": "string",
                    "description": "描述信息。",
                    "example": "帅哥"
                  }
                },
                "required": [
                  "instance_guid",
                  "userId",
                  "remark",
                  "description"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "userId": 1688857970889847,
                "remark": "星云API",
                "description": "帅哥"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {}
                }
              }
            }
          }
        }
      }
    },
    "/api/contact/addCard": {
      "post": {
        "tags": [
          "联系人"
        ],
        "summary": "添加名片",
        "description": "### 接口用途\n用于添加名片。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；其他字段说明见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "contact_addCard",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "userId": {
                    "type": "integer",
                    "description": "名片的 ID。"
                  },
                  "ticket": {
                    "type": "string",
                    "description": "业务票据或临时凭证。"
                  },
                  "verifyMessage": {
                    "type": "string",
                    "description": "验证消息或验证说明。",
                    "example": "你好"
                  },
                  "cardSourceUserId": {
                    "type": "integer",
                    "description": "该名片的发放来源（发放此名片的用户）。"
                  }
                },
                "required": [
                  "instance_guid",
                  "userId",
                  "ticket",
                  "verifyMessage",
                  "cardSourceUserId"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "userId": 1688850000000001,
                "ticket": "",
                "verifyMessage": "你好",
                "cardSourceUserId": 1688850000000000
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {}
                }
              }
            }
          }
        }
      }
    },
    "/api/contact/addRoomMember": {
      "post": {
        "tags": [
          "联系人"
        ],
        "summary": "添加群成员为好友",
        "description": "### 接口用途\n用于添加群成员为好友。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；其他字段说明见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "contact_addRoomMember",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "userId": {
                    "type": "integer",
                    "description": "用户唯一标识。",
                    "example": 7881301010986135
                  },
                  "roomId": {
                    "type": "number",
                    "description": "群聊或客户群唯一标识。",
                    "example": "10758922947847562"
                  }
                },
                "required": [
                  "instance_guid",
                  "userId",
                  "roomId"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "userId": 7881301010986135,
                "roomId": "10758922947847562"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {}
                }
              }
            }
          }
        }
      }
    },
    "/api/contact/syncExternal": {
      "post": {
        "tags": [
          "联系人"
        ],
        "summary": "同步外部数据（非企业）",
        "description": "### 接口用途\n同步当前账号的**客户（外部联系人）**数据：客户基本信息、备注、备注手机号、添加时间、来源、客户身上的标签 ID 等。也可同步「添加客户的申请记录」。\n\n### 请求说明\n- `businessId` 指定数据类型：**1 = 客户列表**（最常用）；2 = 添加客户的申请记录。\n- `limit` 为每次最多返回条数，取 1~1000。**不传或传 0 时平台默认 100**。\n- `seq` 为增量游标：首次传 0。\n\n### 翻页 / 增量同步\n1. 首次传 `seq: 0` 拉第一批；\n2. 取本次 `list` 里最大的 `seq`，作为下一次请求的 `seq` 继续拉；\n3. 返回的 `list` 为空（或条数小于 `limit`）即表示已拉完；\n4. 保存最后的 `seq`，之后再用它调用，只会返回**有变化**的客户（新增、改备注、打/去标签等），适合定时增量同步。\n\n### 注意事项\n- 客户身上的标签在 `list[].content.extraInfo.labelId[]`（没有标签时无此字段），标签名称请用「同步标签」接口按 ID 对应。打/去标签后约 5~10 秒才会同步到这里。\n- 返回 `-2003`：表示 `businessId` 或 `limit` 没传、或传了 0。平台已自动补默认值（businessId=1、limit=100），正常不会再出现。\n- `seq`、`limit`、`businessId` 都是整数。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "contact_syncExternal",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "seq": {
                    "type": "integer",
                    "description": "增量游标：首次传 0；翻页或增量同步时传上一次返回 list 里最大的 seq",
                    "example": 0
                  },
                  "businessId": {
                    "type": "integer",
                    "description": "数据类型：1=客户（外部联系人）列表；2=添加客户的申请记录。不传默认 1（建议显式传）",
                    "example": 1
                  },
                  "limit": {
                    "type": "integer",
                    "description": "每次最多返回条数，取 1~1000。不传或传 0 时默认 100（建议显式传）",
                    "example": 100
                  }
                },
                "required": [
                  "instance_guid"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "seq": 0,
                "businessId": 1,
                "limit": 100
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "businessId": {
                          "type": "number",
                          "description": "业务对象标识。"
                        },
                        "list": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "number",
                                "description": "业务记录或消息内部标识。"
                              },
                              "itemFlag": {
                                "type": "number",
                                "description": "数据项状态或属性标识；具体含义以服务端协议为准。"
                              },
                              "seq": {
                                "type": "number",
                                "description": "数据序号或版本序列。"
                              },
                              "createTime": {
                                "type": "number",
                                "description": "创建时间戳。"
                              },
                              "updateTime": {
                                "type": "number",
                                "description": "更新时间戳。"
                              },
                              "content": {
                                "type": "object",
                                "description": "消息或业务内容对象；具体结构随内容类型而变化。"
                              },
                              "createSeq": {
                                "type": "number",
                                "description": "创建序列号，用于标识数据创建顺序或版本。"
                              },
                              "dataType": {
                                "type": "number",
                                "description": "外部数据业务类型"
                              }
                            }
                          },
                          "description": "同步返回的外部数据列表。"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {
                    "businessId": 1,
                    "list": [
                      {
                        "id": 7881303246306300,
                        "itemFlag": 0,
                        "seq": 9546976,
                        "createTime": 1785231369,
                        "updateTime": 1785231370,
                        "content": {
                          "userInfo": {
                            "uin": 7881303246306300,
                            "name": "示例名称",
                            "gender": 0,
                            "iconUrl": "https://example.com/...",
                            "corpId": 1970325134026788,
                            "unionId": "oXXXXXXXXXXXXXXXXXXXXXXXX"
                          },
                          "corpInfo": {},
                          "flag": 2057,
                          "applyReason": "",
                          "extraInfo": {
                            "remarks": "",
                            "wxTicket": "",
                            "applySource": {
                              "source": 4
                            },
                            "remarkUrl": "",
                            "remarkPhone": [
                              {
                                "phone": "138****8888"
                              }
                            ],
                            "addCustomerTime": 1785231370,
                            "companyRemark": "",
                            "remarkTime": 1
                          },
                          "sourceInfo": {
                            "sourceType": 2,
                            "applyMode": 1
                          }
                        },
                        "createSeq": 9546974,
                        "dataType": 0
                      },
                      {
                        "id": 7881301010986135,
                        "itemFlag": 0,
                        "seq": 9546980,
                        "createTime": 1786949742,
                        "updateTime": 1787047376,
                        "content": {
                          "userInfo": {
                            "uin": 7881301010986135,
                            "name": "示例名称",
                            "gender": 1,
                            "iconUrl": "https://example.com/...",
                            "corpId": 1970325134026788,
                            "unionId": "oXXXXXXXXXXXXXXXXXXXXXXXX"
                          },
                          "corpInfo": {},
                          "flag": 2057,
                          "applyReason": "",
                          "extraInfo": {
                            "remarks": "",
                            "wxTicket": "",
                            "applySource": {
                              "source": 4
                            },
                            "remarkUrl": "",
                            "remarkPhone": [
                              {
                                "phone": "138****8888"
                              }
                            ],
                            "addCustomerTime": 1786949744,
                            "companyRemark": "",
                            "isFirstChat": true,
                            "remarkTime": 1
                          },
                          "sourceInfo": {
                            "sourceType": 2,
                            "applyMode": 1
                          }
                        },
                        "createSeq": 9546977,
                        "dataType": 0
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/contact/updateLabel": {
      "post": {
        "tags": [
          "联系人"
        ],
        "summary": "更新用户标签",
        "description": "### 接口用途\n用于更新用户标签。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；其他字段说明见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。\n\n### 注意事项\n- op=1（新增）：label.id 与 label.createTime 传 0。\n- op=2（删除）：需完整提交 label 对象，其余参数无需单独更新；个人标签组不在删除范围。\n- op=3（修改）：仅可变更 label.name，其余 label 字段按原值完整提交。\n- 个人标签不支持添加标签组，仅企业标签组支持该操作。",
        "operationId": "contact_updateLabel",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "userId": {
                    "type": "integer",
                    "description": "用户唯一标识。",
                    "example": 1688857990821417
                  },
                  "operItems": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "op": {
                          "type": "number",
                          "description": "操作类型：1=新增、2=删除、3=修改。"
                        },
                        "opScene": {
                          "type": "number",
                          "description": "操作场景：新增企业标签组时传 1；其余操作固定传 2。"
                        },
                        "label": {
                          "type": "object",
                          "description": "标签对象；子字段见下。其余属性（bDeleted/businessType/order/serviceGroupId 等）为标签固有属性，op=3 修改时按原值完整提交。",
                          "properties": {
                            "id": {
                              "type": "string",
                              "description": "标签 ID；新增（op=1）时传 0。"
                            },
                            "name": {
                              "type": "string",
                              "description": "标签名称；op=3 修改时仅此字段可变更。"
                            },
                            "labelType": {
                              "type": "number",
                              "description": "标签类型：1=企业标签，2=个人标签。"
                            },
                            "dataType": {
                              "type": "number",
                              "description": "数据类型：1=标签，2=标签组（与 labelType 组合：labelType=1+dataType=1 企业标签、1+2 企业标签组、2+1 个人标签、2+2 个人标签组）。"
                            },
                            "labelGroupId": {
                              "type": "string",
                              "description": "标签组 ID；新增标签组时传 0。"
                            },
                            "createTime": {
                              "type": "number",
                              "description": "创建时间（秒级时间戳）；新增（op=1）时传 0。"
                            }
                          }
                        }
                      },
                      "required": [
                        "op",
                        "label"
                      ]
                    },
                    "description": "操作项列表；每个元素是一次标签操作（可批量），字段见下。"
                  }
                },
                "required": [
                  "instance_guid",
                  "userId",
                  "operItems"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "userId": 1688857990821417,
                "operItems": [
                  {
                    "op": 3,
                    "opScene": 2,
                    "label": {
                      "id": "14073750445976458",
                      "name": "测试",
                      "dataType": 1,
                      "bDeleted": 0,
                      "labelGroupId": "14073751857989781",
                      "createTime": 1787872137,
                      "labelType": 2,
                      "businessType": 0,
                      "order": 0,
                      "serviceGroupId": 0
                    }
                  },
                  {
                    "op": 3,
                    "opScene": 2,
                    "label": {
                      "id": "14073750445976459",
                      "name": "测试1",
                      "dataType": 1,
                      "bDeleted": 0,
                      "labelGroupId": "14073751857989781",
                      "createTime": 1787872147,
                      "labelType": 2,
                      "businessType": 0,
                      "order": 0,
                      "serviceGroupId": 0
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "businessId": {
                          "type": "number",
                          "description": "业务对象标识。"
                        },
                        "list": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "number",
                                "description": "业务记录或消息内部标识。"
                              },
                              "itemFlag": {
                                "type": "number",
                                "description": "数据项状态或属性标识；具体含义以服务端协议为准。"
                              },
                              "seq": {
                                "type": "number",
                                "description": "数据序号或版本序列。"
                              },
                              "createTime": {
                                "type": "number",
                                "description": "创建时间戳。"
                              },
                              "updateTime": {
                                "type": "number",
                                "description": "更新时间戳。"
                              },
                              "content": {
                                "type": "object",
                                "description": "消息或业务内容对象；具体结构随内容类型而变化。"
                              },
                              "createSeq": {
                                "type": "number",
                                "description": "创建序列号，用于标识数据创建顺序或版本。"
                              },
                              "DataType": {
                                "type": "number",
                                "description": "数据类型标识；具体枚举以服务端协议为准。"
                              }
                            }
                          },
                          "description": "标签相关数据列表。"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {
                    "businessId": 1,
                    "list": [
                      {
                        "id": 7881303340347828,
                        "itemFlag": 0,
                        "seq": 11195327,
                        "createTime": 1785303705,
                        "updateTime": 1785382492,
                        "content": {
                          "userInfo": {
                            "uin": 7881303340347828,
                            "name": "星云API",
                            "gender": 0,
                            "iconUrl": "https://example.com/...",
                            "corpId": 1970325134026788,
                            "unionId": "oXXXXXXXXXXXXXXXXXXXXXXXX"
                          },
                          "corpInfo": {},
                          "flag": 2057,
                          "applyReason": "我是企微    支持",
                          "extraInfo": {
                            "reason": "我是企微    支持",
                            "remarks": "",
                            "wxTicket": "",
                            "openimAddContactRspTicket": "<省略>",
                            "realRemark": "",
                            "applySource": {
                              "source": 51
                            },
                            "remarkUrl": "",
                            "addCustomerTime": 1785303706,
                            "companyRemark": "",
                            "remarkTime": 1
                          },
                          "sourceInfo": {
                            "sourceType": 1,
                            "applyMode": 2
                          }
                        },
                        "createSeq": 11195320,
                        "DataType": 0
                      },
                      {
                        "id": 7881302241438345,
                        "itemFlag": 0,
                        "seq": 11195356,
                        "createTime": 1785290402,
                        "updateTime": 1787909237,
                        "content": {
                          "userInfo": {
                            "uin": 7881302241438345,
                            "name": "星云API技术支持",
                            "gender": 1,
                            "iconUrl": "https://example.com/...",
                            "corpId": 1970325134026788,
                            "unionId": "oXXXXXXXXXXXXXXXXXXXXXXXX"
                          },
                          "corpInfo": {},
                          "flag": 2057,
                          "applyReason": "",
                          "extraInfo": {
                            "remarks": "",
                            "wxTicket": "",
                            "realRemark": "星云API技术服务",
                            "applySource": {
                              "source": 103
                            },
                            "remarkUrl": "",
                            "remarkPhone": [
                              {
                                "phone": "138****8888"
                              }
                            ],
                            "addCustomerTime": 1787542586,
                            "companyRemark": "",
                            "labelId": [
                              {
                                "labelId": "14073752403975683",
                                "corpOrVid": 1688850000000000,
                                "groupId": "14073752507970986",
                                "businessType": 0,
                                "serviceGroupId": 0
                              },
                              {
                                "labelId": "14073752410971742",
                                "corpOrVid": 1688850000000000,
                                "groupId": "14073752507970986",
                                "businessType": 0,
                                "serviceGroupId": 0
                              },
                              {
                                "labelId": "14073752507970989",
                                "corpOrVid": 1970324952577074,
                                "groupId": "14073752507970987",
                                "businessType": 0,
                                "serviceGroupId": 0
                              }
                            ],
                            "isFirstChat": true,
                            "remarkTime": 1787630130
                          },
                          "sourceInfo": {
                            "sourceType": 1,
                            "applyMode": 1
                          }
                        },
                        "createSeq": 11195340,
                        "DataType": 0
                      },
                      {
                        "id": 7881303246306300,
                        "itemFlag": 0,
                        "seq": 11195358,
                        "createTime": 1785202065,
                        "updateTime": 1787910936,
                        "content": {
                          "userInfo": {
                            "uin": 7881303246306300,
                            "name": "星云API",
                            "gender": 0,
                            "iconUrl": "https://example.com/...",
                            "corpId": 1970325134026788,
                            "unionId": "oXXXXXXXXXXXXXXXXXXXXXXXX"
                          },
                          "corpInfo": {},
                          "flag": 2057,
                          "applyReason": "我是示例企业的示例名称，添加我的企业微信与我联系吧。",
                          "extraInfo": {
                            "reason": "我是示例企业的示例名称，添加我的企业微信与我联系吧。",
                            "remarks": "",
                            "wxTicket": "",
                            "realRemark": "星云API",
                            "applySource": {
                              "source": 4
                            },
                            "remarkUrl": "",
                            "addCustomerTime": 1785747896,
                            "companyRemark": "",
                            "labelId": [
                              {
                                "labelId": "14073752410971742",
                                "corpOrVid": 1688850000000000,
                                "groupId": "14073752507970986",
                                "businessType": 0,
                                "serviceGroupId": 0
                              },
                              {
                                "labelId": "14073752507970988",
                                "corpOrVid": 1970324952577074,
                                "groupId": "14073752507970987",
                                "businessType": 0,
                                "serviceGroupId": 0
                              }
                            ],
                            "isFirstChat": true,
                            "remarkTime": 1787629654
                          },
                          "sourceInfo": {
                            "sourceType": 2,
                            "applyMode": 1
                          }
                        },
                        "createSeq": 11195329,
                        "DataType": 0
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/contact/getCorpBriefInfoList": {
      "post": {
        "tags": [
          "联系人"
        ],
        "summary": "获取企业简要信息",
        "description": "### 接口用途\n用于获取企业简要信息。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定实例；大整数 ID（会话/群/成员/序号等）请以字符串传递，避免 JS 精度丢失。其他字段见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "contact_getCorpBriefInfoList",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "corpIds": {
                    "type": "array",
                    "items": {},
                    "description": "企业 id 数组，不能为空；corpId 可从联系人资料 / 名片回调取",
                    "example": [
                      "1970320000000000"
                    ]
                  }
                },
                "required": [
                  "instance_guid",
                  "corpIds"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "corpIds": [
                  "1970320000000000"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "list": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "corpId": {
                                "type": "number",
                                "description": "企业 id"
                              },
                              "corpName": {
                                "type": "string",
                                "description": "企业名称"
                              },
                              "corpLogo": {
                                "type": "string",
                                "description": "企业 logo URL"
                              }
                            }
                          },
                          "description": "企业简要信息数据列表。"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {
                    "list": [
                      {
                        "corpId": 1970320000000000,
                        "corpName": "示例企业",
                        "corpLogo": "https://example.com/..."
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/room/getInfo": {
      "post": {
        "tags": [
          "群聊"
        ],
        "summary": "获取群资料",
        "description": "### 接口用途\n用于获取群资料。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；其他字段说明见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "room_getInfo",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "roomId": {
                    "type": "integer",
                    "description": "群聊或客户群唯一标识。",
                    "example": "10758922947847562"
                  }
                },
                "required": [
                  "instance_guid",
                  "roomId"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "roomId": "10758922947847562"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "roomInfo": {
                          "type": "object",
                          "description": "群聊信息对象。",
                          "properties": {
                            "roomId": {
                              "type": "string",
                              "description": "群聊或客户群唯一标识。"
                            },
                            "roomName": {
                              "type": "string",
                              "description": "群聊名称。"
                            },
                            "ownerVid": {
                              "type": "number",
                              "description": "群主或负责人用户标识。"
                            },
                            "createTime": {
                              "type": "number",
                              "description": "创建时间戳。"
                            },
                            "oldOwnerVid": {
                              "type": "number",
                              "description": "原群主或原负责人用户标识。"
                            },
                            "oprNewFlag": {
                              "type": "number",
                              "description": "群资料变更状态标志位（内部）"
                            }
                          }
                        },
                        "members": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "vid": {
                                "type": "number",
                                "description": "用户内部标识（协议字段），用于关联对应成员或联系人。"
                              },
                              "joinTime": {
                                "type": "number",
                                "description": "加入时间戳。"
                              },
                              "inviteVid": {
                                "type": "number",
                                "description": "邀请人用户标识。"
                              },
                              "memberType": {
                                "type": "number",
                                "description": "成员类型标识；具体枚举以服务端协议为准。"
                              },
                              "status": {
                                "type": "number",
                                "description": "状态"
                              },
                              "remark": {
                                "type": "string",
                                "description": "联系人备注名称。"
                              },
                              "flag": {
                                "type": "number",
                                "description": "状态或能力标识；具体枚举以协议为准。"
                              },
                              "source": {
                                "type": "number",
                                "description": "数据来源类型或来源标识。"
                              }
                            }
                          },
                          "description": "成员列表。"
                        }
                      },
                      "description": "业务数据，具体结构随接口而变化。"
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {
                    "roomInfo": {
                      "roomId": "10793346394103770",
                      "roomName": "696969",
                      "ownerVid": 1688857583861640,
                      "createTime": 1787542316,
                      "oldOwnerVid": 1688854523824302,
                      "oprNewFlag": 6
                    },
                    "members": [
                      {
                        "vid": 1688854523824302,
                        "joinTime": 1788343543,
                        "inviteVid": 1688854675899373,
                        "memberType": 2,
                        "status": 0,
                        "remark": "",
                        "flag": 0,
                        "source": 1
                      },
                      {
                        "vid": 1688854675899373,
                        "joinTime": 1787542316,
                        "inviteVid": 1688854675899373,
                        "memberType": 0,
                        "remark": "示例名称",
                        "flag": 0,
                        "source": 1
                      }
                    ],
                    "data": {}
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/room/delMember": {
      "post": {
        "tags": [
          "群聊"
        ],
        "summary": "移除群成员",
        "description": "### 接口用途\n用于移除群成员。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；其他字段说明见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "room_delMember",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "roomId": {
                    "type": "number",
                    "description": "群聊或客户群唯一标识。",
                    "example": "10758922947847562"
                  },
                  "userId": {
                    "type": "integer",
                    "description": "用户唯一标识。",
                    "example": 7881301010986135
                  }
                },
                "required": [
                  "instance_guid",
                  "roomId",
                  "userId"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "roomId": "10758922947847562",
                "userId": 7881301010986135
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {}
                }
              }
            }
          }
        }
      }
    },
    "/api/room/addMember": {
      "post": {
        "tags": [
          "群聊"
        ],
        "summary": "添加群成员",
        "description": "### 接口用途\n将指定成员添加到群聊。\n\n### 请求说明\n- 通过 instance_guid 指定执行操作的实例，roomId 指定群聊。\n- 成员字段为 memberId（数字数组），不是 userId；添加一个成员也必须传数组，例如 memberId: [1234567890]。\n- memberId 数组元素必须是数字，不要加引号。在线调试支持表单和 JSON 模式，表单输入会自动转成数字数组。\n- 群 ID 建议用纯数字字符串传入，避免浏览器处理大整数时丢失精度。\n\n### 使用条件与排查\n- 请先核对完整群编号和执行账号的群内权限。群编号被浏览器舍入后，会请求到错误的群，可能返回“暂无权限”。\n- 数字数组格式通过，只代表参数格式正确；实际加人还受群设置、成员关系及企业微信限制影响。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示接口返回成功。实际添加结果还取决于群权限及平台限制。",
        "operationId": "room_addMember",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "roomId": {
                    "type": "string",
                    "description": "群聊唯一标识。请保留完整编号，JSON模式建议加双引号作为字符串传入，避免长群号被浏览器舍入。",
                    "example": "12345678901234567"
                  },
                  "memberId": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "description": "数组中的每个成员ID，必须为数字。"
                    },
                    "description": "待添加的成员ID数字数组（uint64），单个成员也要使用数组。表单中多个编号用英文逗号分隔；接口请求必须为数字数组。",
                    "example": [
                      1234567890
                    ]
                  }
                },
                "required": [
                  "instance_guid",
                  "roomId",
                  "memberId"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "roomId": "12345678901234567",
                "memberId": [
                  1234567890
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {}
                }
              }
            }
          }
        }
      }
    },
    "/api/room/setName": {
      "post": {
        "tags": [
          "群聊"
        ],
        "summary": "设置群名",
        "description": "### 接口用途\n用于设置群名。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；其他字段说明见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "room_setName",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "roomId": {
                    "type": "number",
                    "description": "群聊或客户群唯一标识。",
                    "example": "10758922947847562"
                  },
                  "roomName": {
                    "type": "string",
                    "description": "群聊名称。",
                    "example": "星云API"
                  }
                },
                "required": [
                  "instance_guid",
                  "roomId",
                  "roomName"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "roomId": "10758922947847562",
                "roomName": "星云API"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {}
                }
              }
            }
          }
        }
      }
    },
    "/api/room/getQrCode": {
      "post": {
        "tags": [
          "群聊"
        ],
        "summary": "获取群二维码",
        "description": "### 接口用途\n用于获取群二维码。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；其他字段说明见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "room_getQrCode",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "roomId": {
                    "type": "integer",
                    "description": "群聊或客户群唯一标识。",
                    "example": "10758922947847562"
                  }
                },
                "required": [
                  "instance_guid",
                  "roomId"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "roomId": "10758922947847562"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "qrcodeUrl": {
                          "type": "string",
                          "description": "二维码链接地址。"
                        },
                        "qrcodeImage": {
                          "type": "string",
                          "description": "二维码图片内容或地址。"
                        },
                        "roomId": {
                          "type": "string",
                          "description": "群聊或客户群唯一标识。"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {
                    "qrcodeUrl": "https://example.com/...",
                    "qrcodeImage": "<省略>",
                    "roomId": "10793346394103770"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/room/setNotice": {
      "post": {
        "tags": [
          "群聊"
        ],
        "summary": "修改群公告",
        "description": "### 接口用途\n用于修改群公告。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；其他字段说明见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "room_setNotice",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "roomId": {
                    "type": "number",
                    "description": "群聊或客户群唯一标识。",
                    "example": "10758922947847562"
                  },
                  "notice": {
                    "type": "string",
                    "description": "群公告或通知内容。",
                    "example": "凭颜值进群"
                  }
                },
                "required": [
                  "instance_guid",
                  "roomId",
                  "notice"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "roomId": "10758922947847562",
                "notice": "凭颜值进群"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {}
                }
              }
            }
          }
        }
      }
    },
    "/api/room/setAdmin": {
      "post": {
        "tags": [
          "群聊"
        ],
        "summary": "设置管理员",
        "description": "### 接口用途\n用于设置管理员。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；其他字段说明见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "room_setAdmin",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "roomId": {
                    "type": "number",
                    "description": "群聊或客户群唯一标识。",
                    "example": "10758922947847562"
                  },
                  "userId": {
                    "type": "integer",
                    "description": "用户唯一标识。",
                    "example": 7881303246306300
                  },
                  "enable": {
                    "type": "boolean",
                    "description": "是否将该群聊保存到通讯录。 true 表示开启，false 表示关闭。",
                    "example": false
                  }
                },
                "required": [
                  "instance_guid",
                  "roomId",
                  "userId",
                  "enable"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "roomId": "10758922947847562",
                "userId": 7881303246306300,
                "enable": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {}
                }
              }
            }
          }
        }
      }
    },
    "/api/room/changeOwner": {
      "post": {
        "tags": [
          "群聊"
        ],
        "summary": "转让群主",
        "description": "### 接口用途\n将群主转让给指定的群成员。\n\n### 请求说明\n- instance_guid 指定执行转让的实例，roomId 为该账号所在群的编号，建议传纯数字字符串以保留精度。\n- 新群主字段为 memberId，是单个成员编号（uint64数字），不是 userId 或 newOwnerId，也不是数组。\n- memberId 必须是目标新群主的成员编号，不要把多个成员放进数组。\n- 执行账号需要具有转让群主的权限；字段正确不代表一定满足群管理或企业微信限制。\n\n### 使用条件与排查\n- 执行账号应是该群当前群主，并具备转让权限。\n- 目标新群主必须已经在同一个群内。请先通过“获取群资料”核对群主和成员名单；目标尚未进群时，应先让目标加入该群，再转让。\n- 不要仅凭 -3004 判断具体原因；没有详细错误文案时，应核对群编号、群主身份和目标成员是否在群内。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示接口返回成功。",
        "operationId": "room_changeOwner",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "roomId": {
                    "type": "string",
                    "description": "群聊唯一标识。请保留完整编号，JSON模式建议加双引号作为字符串传入，避免长群号被浏览器舍入。",
                    "example": "12345678901234567"
                  },
                  "memberId": {
                    "type": "integer",
                    "description": "目标新群主的单个成员ID（uint64数字）；必须是该群已有成员，不是数组，也不是userId。",
                    "example": 1234567890
                  }
                },
                "required": [
                  "instance_guid",
                  "roomId",
                  "memberId"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "roomId": "12345678901234567",
                "memberId": 1234567890
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {}
                }
              }
            }
          }
        }
      }
    },
    "/api/room/create": {
      "post": {
        "tags": [
          "群聊"
        ],
        "summary": "创建客户群",
        "description": "### 接口用途\n用于创建客户群。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；其他字段说明见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "room_create",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  }
                },
                "required": [
                  "instance_guid"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "inviteUrl": {
                          "type": "string",
                          "description": "邀请链接地址。"
                        },
                        "title": {
                          "type": "string",
                          "description": "标题。"
                        },
                        "desc": {
                          "type": "string",
                          "description": "描述信息。"
                        },
                        "avatarUrl": {
                          "type": "string",
                          "description": "头像地址。"
                        },
                        "roomId": {
                          "type": "string",
                          "description": "群聊或客户群唯一标识。"
                        },
                        "extra": {
                          "type": "object",
                          "description": "扩展信息对象；具体结构以服务端返回为准。",
                          "properties": {
                            "roomId": {
                              "type": "string",
                              "description": "群聊或客户群唯一标识。"
                            },
                            "operatorVid": {
                              "type": "number",
                              "description": "操作人用户标识。"
                            },
                            "createTime": {
                              "type": "number",
                              "description": "创建时间戳。"
                            },
                            "roomKey": {
                              "type": "string",
                              "description": "群聊或会话关联键。"
                            },
                            "type": {
                              "type": "number",
                              "description": "类型编号或类型标识；具体枚举以所在对象为准。"
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {
                    "inviteUrl": "https://example.com/...",
                    "title": "邀请你加入企业微信群聊",
                    "desc": "示例名称在企业微信中邀请你加入群聊，用正式的名片聊工作",
                    "avatarUrl": "https://example.com/...",
                    "roomId": "10970360667706810",
                    "extra": {
                      "roomId": "10970360667706810",
                      "operatorVid": 1688857970889847,
                      "createTime": 1788429415,
                      "roomKey": "xxxxxxxxxxxxxxxx",
                      "type": 2
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/room/setMyNickname": {
      "post": {
        "tags": [
          "群聊"
        ],
        "summary": "变更本群名称",
        "description": "### 接口用途\n用于变更本群名称。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；其他字段说明见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "room_setMyNickname",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "roomId": {
                    "type": "number",
                    "description": "群聊或客户群唯一标识。",
                    "example": "10758922947847562"
                  },
                  "nickname": {
                    "type": "string",
                    "description": "昵称。",
                    "example": "示例名称"
                  }
                },
                "required": [
                  "instance_guid",
                  "roomId",
                  "nickname"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "roomId": "10758922947847562",
                "nickname": "示例名称"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {}
                }
              }
            }
          }
        }
      }
    },
    "/api/room/saveToContact": {
      "post": {
        "tags": [
          "群聊"
        ],
        "summary": "保存通讯录（仅限群）",
        "description": "### 接口用途\n用于保存通讯录（仅限群）。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；其他字段说明见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "room_saveToContact",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "roomId": {
                    "type": "integer",
                    "description": "群聊或客户群唯一标识。",
                    "example": "10731662017557252"
                  },
                  "enable": {
                    "type": "boolean",
                    "description": "是否将该群聊保存到通讯录。 true 表示开启，false 表示关闭。",
                    "example": true
                  }
                },
                "required": [
                  "instance_guid",
                  "roomId",
                  "enable"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "roomId": "10731662017557252",
                "enable": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {}
                }
              }
            }
          }
        }
      }
    },
    "/api/room/getMyCustomerGroupList": {
      "post": {
        "tags": [
          "群聊"
        ],
        "summary": "获取我的客户群列表",
        "description": "### 接口用途\n分页获取当前账号作为群主（或管理）的客户群列表：群 ID、群名、成员数、创建时间等。\n\n### 翻页方法\n- 首页 startIndex 传 0，limit 建议 2000 或更小。\n- 用返回的 data.nextStart 作为下一页的 startIndex，循环调用。\n- **data.nextStart = -1 表示已全部取完，停止翻页。**\n- data.totalCount 为客户群总数，可用来核对是否取全。\n\n示例（共 4500 个群、每页 2000）：startIndex 依次传 0 → 2000 → 4000，第 3 次返回 nextStart=-1，结束。\n\n### 注意\n- **不要把 -1 当作 startIndex 传入**：实测传 -1 会返回 0 条且 nextStart 变回 0，程序若不判断 -1 会从头重新翻页、陷入死循环。\n- startIndex 超过总数时返回 0 条、nextStart=-1。\n- 单页上限未公开：实测 limit 传 0 或不传会一次返回全部（群少时）；群多的账号请按上面的方式循环，不要依赖单页上限。\n- 翻页期间若有新建 / 解散群，顺序可能变化，个别群可能重复或遗漏，请按 roomId 去重，最后可与 totalCount 核对。\n- roomId 等超长 ID 以字符串返回，避免 JS 精度丢失；请求时 ID 传字符串或数字均可。",
        "operationId": "room_getMyCustomerGroupList",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "limit": {
                    "type": "integer",
                    "description": "每页返回数量，建议 2000 或更小。不传或传 0 时实测返回全部（群少时）。",
                    "example": 2000
                  },
                  "startIndex": {
                    "type": "integer",
                    "description": "从第几个开始取（偏移量）。首页传 0，之后传上一页返回的 nextStart；nextStart=-1 表示已取完，不要再传 -1。",
                    "example": 0
                  }
                },
                "required": [
                  "instance_guid"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "limit": 2000,
                "startIndex": 0
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "nextStart": {
                          "type": "number",
                          "description": "下一页的 startIndex。-1 表示已全部取完，停止翻页（不要把 -1 再传入）。"
                        },
                        "totalCount": {
                          "type": "number",
                          "description": "客户群总数。"
                        },
                        "roomData": {
                          "type": "object",
                          "description": "本页数据。",
                          "properties": {
                            "list": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "roomId": {
                                    "type": "string",
                                    "description": "群 ID，可作为发消息接口的 conversationId、群相关接口的 roomId 使用。"
                                  },
                                  "roomName": {
                                    "type": "string",
                                    "description": "群名称。"
                                  },
                                  "memberCount": {
                                    "type": "number",
                                    "description": "群成员数。"
                                  },
                                  "ownerId": {
                                    "type": "number",
                                    "description": "群主的用户 ID。"
                                  },
                                  "createTime": {
                                    "type": "number",
                                    "description": "建群时间，Unix 时间戳（秒）。"
                                  },
                                  "updateTime": {
                                    "type": "number",
                                    "description": "群信息最近更新时间，Unix 时间戳（秒）。"
                                  },
                                  "id": {
                                    "type": "string",
                                    "description": "列表记录 ID（内部编号），一般无需使用。"
                                  },
                                  "roomUrl": {
                                    "type": "string",
                                    "description": "群头像地址。"
                                  },
                                  "ticket": {
                                    "type": "string",
                                    "description": "群相关票据（内部使用），一般无需关注。"
                                  },
                                  "flag": {
                                    "type": "number",
                                    "description": "群标志位（内部字段），一般无需关注。"
                                  },
                                  "oldOwnerId": {
                                    "type": "number",
                                    "description": "群主转移前的原群主 ID，没有转移过为 0。"
                                  },
                                  "shiftTime": {
                                    "type": "number",
                                    "description": "群主转移时间（秒），没有转移过为 0。"
                                  },
                                  "cannotOnJobSucceed": {
                                    "type": "boolean",
                                    "description": "是否不能进行在职继承（企业微信字段），一般无需关注。"
                                  }
                                }
                              },
                              "description": "本页的客户群列表。"
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {
                    "roomData": {
                      "list": [
                        {
                          "id": "1129800000000000001",
                          "roomId": "10920000000000001",
                          "ownerId": 1688850000000001,
                          "roomName": "示例客户群",
                          "memberCount": 8,
                          "createTime": 1790000000,
                          "updateTime": 1792500000,
                          "flag": 0,
                          "roomUrl": "https://example.com/room-avatar",
                          "ticket": "<群相关票据，已省略>",
                          "shiftTime": 0,
                          "oldOwnerId": 0,
                          "cannotOnJobSucceed": false
                        }
                      ]
                    },
                    "nextStart": 2000,
                    "totalCount": 4500
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/room/top": {
      "post": {
        "tags": [
          "群聊"
        ],
        "summary": "设置房间置顶/取消",
        "description": "### 接口用途\n用于设置房间置顶/取消。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；其他字段说明见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "room_top",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "roomId": {
                    "type": "number",
                    "description": "群聊或客户群唯一标识。",
                    "example": "10758922947847562"
                  },
                  "enable": {
                    "type": "boolean",
                    "description": "是否将该群聊保存到通讯录。 true 表示开启，false 表示关闭。",
                    "example": true
                  }
                },
                "required": [
                  "instance_guid",
                  "roomId",
                  "enable"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "roomId": "10758922947847562",
                "enable": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {}
                }
              }
            }
          }
        }
      }
    },
    "/api/room/quit": {
      "post": {
        "tags": [
          "群聊"
        ],
        "summary": "退出群聊",
        "description": "### 接口用途\n用于退出群聊。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；其他字段说明见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "room_quit",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "roomId": {
                    "type": "number",
                    "description": "群聊或客户群唯一标识。",
                    "example": "10793346394103770"
                  }
                },
                "required": [
                  "instance_guid",
                  "roomId"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "roomId": "10793346394103770"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {}
                }
              }
            }
          }
        }
      }
    },
    "/api/room/inviteConfirm": {
      "post": {
        "tags": [
          "群聊"
        ],
        "summary": "设置房间邀请确认",
        "description": "### 接口用途\n用于设置房间邀请确认。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；其他字段说明见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "room_inviteConfirm",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "roomId": {
                    "type": "integer",
                    "description": "群聊或客户群唯一标识。",
                    "example": "10758922947847562"
                  },
                  "enable": {
                    "type": "boolean",
                    "description": "是否开启入群邀请确认。 true 表示开启，false 表示关闭。",
                    "example": false
                  }
                },
                "required": [
                  "instance_guid",
                  "roomId",
                  "enable"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "roomId": "10758922947847562",
                "enable": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {}
                }
              }
            }
          }
        }
      }
    },
    "/api/room/forbidRename": {
      "post": {
        "tags": [
          "群聊"
        ],
        "summary": "设置禁止改群名（群管理）",
        "description": "### 接口用途\n用于设置禁止改群名（群管理）。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；其他字段说明见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。\n\n### 注意\n当前请求示例使用 imageUrl 字段，与接口名称的语义存在差异；已保留原字段并补充说明，建议联调时确认服务端真实参数。",
        "operationId": "room_forbidRename",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "roomId": {
                    "type": "number",
                    "description": "群聊或客户群唯一标识。",
                    "example": "10758922947847562"
                  },
                  "enable": {
                    "type": "boolean",
                    "description": "是否将该群聊保存到通讯录。 true 表示开启，false 表示关闭。",
                    "example": false
                  }
                },
                "required": [
                  "instance_guid",
                  "roomId",
                  "enable"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "roomId": "10758922947847562",
                "enable": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {}
                }
              }
            }
          }
        }
      }
    },
    "/api/room/forbidMutualAdd": {
      "post": {
        "tags": [
          "群聊"
        ],
        "summary": "禁止添加群成员(群管理)",
        "description": "### 接口用途\n用于禁止添加群成员(群管理)。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；其他字段说明见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "room_forbidMutualAdd",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "roomId": {
                    "type": "number",
                    "description": "群聊或客户群唯一标识。",
                    "example": "10758922947847562"
                  },
                  "enable": {
                    "type": "boolean",
                    "description": "是否将该群聊保存到通讯录。 true 表示开启，false 表示关闭。",
                    "example": false
                  }
                },
                "required": [
                  "instance_guid",
                  "roomId",
                  "enable"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "roomId": "10758922947847562",
                "enable": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {}
                }
              }
            }
          }
        }
      }
    },
    "/api/room/disband": {
      "post": {
        "tags": [
          "群聊"
        ],
        "summary": "解散群聊（群主）",
        "description": "### 接口用途\n用于解散群聊（群主）。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；其他字段说明见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "room_disband",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "roomid": {
                    "type": "string",
                    "example": "10731662017557252"
                  }
                },
                "required": [
                  "instance_guid"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "roomid": "10731662017557252"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": null
                }
              }
            }
          }
        }
      }
    },
    "/api/room/setRemark": {
      "post": {
        "tags": [
          "群聊"
        ],
        "summary": "设置群备注",
        "description": "### 接口用途\n用于设置群备注。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；其他字段说明见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "room_setRemark",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "roomId": {
                    "type": "number",
                    "description": "群聊或客户群唯一标识。",
                    "example": "10758922947847562"
                  },
                  "remark": {
                    "type": "string",
                    "description": "联系人备注名称。",
                    "example": "星云API"
                  }
                },
                "required": [
                  "instance_guid",
                  "roomId",
                  "remark"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "roomId": "10758922947847562",
                "remark": "星云API"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {}
                }
              }
            }
          }
        }
      }
    },
    "/api/room/confirmInvitedMemberList": {
      "post": {
        "tags": [
          "群聊"
        ],
        "summary": "确认受邀入群成员",
        "description": "### 接口用途\n用于确认受邀入群成员。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定实例；大整数 ID（会话/群/成员/序号等）请以字符串传递，避免 JS 精度丢失。其他字段见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "room_confirmInvitedMemberList",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "msgId": {
                    "type": "number",
                    "description": "入群邀请通知的消息 id",
                    "example": "1003044"
                  },
                  "roomId": {
                    "type": "number",
                    "description": "群聊或客户群唯一标识。",
                    "example": "10758922947847562"
                  },
                  "fromVid": {
                    "type": "number",
                    "description": "邀请人 id",
                    "example": "1688850000000000"
                  },
                  "ticket": {
                    "type": "string",
                    "description": "入群邀请票据（来自入群邀请回调）",
                    "example": "<ticket 省略>"
                  },
                  "newMembers": {
                    "type": "array",
                    "items": {},
                    "description": "待确认成员 id 列表",
                    "example": [
                      "7881000000000001"
                    ]
                  }
                },
                "required": [
                  "instance_guid",
                  "msgId",
                  "roomId",
                  "fromVid",
                  "ticket",
                  "newMembers"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "msgId": 1003044,
                "roomId": "10758922947847562",
                "fromVid": 1688850000000000,
                "ticket": "<ticket 省略>",
                "newMembers": [
                  "7881000000000001"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {}
                }
              }
            }
          }
        }
      }
    },
    "/api/room/getInfoBatch": {
      "post": {
        "tags": [
          "群聊"
        ],
        "summary": "批量获取群资料",
        "description": "### 接口用途\n用于批量获取群资料。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定实例；大整数 ID（会话/群/成员/序号等）请以字符串传递，避免 JS 精度丢失。其他字段见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "room_getInfoBatch",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "roomIds": {
                    "type": "array",
                    "items": {},
                    "description": "群聊标识列表。",
                    "example": [
                      "10758922947847562"
                    ]
                  }
                },
                "required": [
                  "instance_guid",
                  "roomIds"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "roomIds": [
                  "10758922947847562"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "list": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "roomId": {
                                "type": "string",
                                "description": "群/会话 id（群消息时有值；大整数以字符串返回）"
                              },
                              "name": {
                                "type": "string",
                                "description": "名称"
                              },
                              "owner": {
                                "type": "number",
                                "description": "群主 id"
                              },
                              "memberCount": {
                                "type": "number",
                                "description": "成员数"
                              }
                            }
                          },
                          "description": "结果列表"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {
                    "list": [
                      {
                        "roomId": "10758922947847562",
                        "name": "示例群",
                        "owner": 1688850000000000,
                        "memberCount": 3
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/room/groupMemberChange": {
      "post": {
        "tags": [
          "群聊"
        ],
        "summary": "同步群成员变更",
        "description": "### 接口用途\n同步指定群的资料与成员列表，支持增量同步。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定实例；大整数 ID（会话/群/成员/序号等）请以字符串传递，避免 JS 精度丢失。\n- **首次同步**：`ver` 传空字符串 `\"\"`（或不传），返回群资料、全部成员和最新游标 `ver`。\n- **增量同步**：把上次返回的 `ver` 原样传回，只返回有变化的成员；没有变化时 `members` 为空数组、`ver` 不变。\n- `ver` 是 base64 游标，**不要传 `0`**（会报错）。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data.roomInfos。",
        "operationId": "room_groupMemberChange",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "roomId": {
                    "type": "number",
                    "description": "群聊或客户群唯一标识（可传数字或纯数字字符串，网关自动转换）。",
                    "example": "10758922947847562"
                  },
                  "ver": {
                    "type": "string",
                    "description": "增量游标（base64 字符串）。首次同步传空字符串 \"\" 或不传；之后传上次返回的 roomInfos[0].ver，只拿变化。不要传 0。"
                  },
                  "memberCount": {
                    "type": "number",
                    "description": "群成员总数（可选）。实测传与不传返回结果一致，一般无需填写。"
                  }
                },
                "required": [
                  "instance_guid",
                  "roomId"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "roomId": "10758922947847562",
                "ver": ""
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "roomInfos": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "info": {
                                "type": "object",
                                "description": "群资料。",
                                "properties": {
                                  "roomId": {
                                    "type": "string",
                                    "description": "群 ID（超出 JS 安全整数范围，以字符串返回）。"
                                  },
                                  "roomName": {
                                    "type": "string",
                                    "description": "群名称。"
                                  },
                                  "createUin": {
                                    "type": "number",
                                    "description": "群创建者 userId。"
                                  },
                                  "createTime": {
                                    "type": "number",
                                    "description": "建群时间（秒级时间戳）。"
                                  },
                                  "notice": {
                                    "type": "object",
                                    "description": "群公告：content 公告内容、time 发布时间（秒级时间戳）、sendervid 发布人 userId。"
                                  },
                                  "admins": {
                                    "type": "array",
                                    "items": {},
                                    "description": "群管理员列表，每项 {vid: 管理员 userId}。"
                                  }
                                }
                              },
                              "members": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "uin": {
                                      "type": "number",
                                      "description": "成员 userId。"
                                    },
                                    "nickName": {
                                      "type": "string",
                                      "description": "成员昵称。"
                                    },
                                    "jointime": {
                                      "type": "number",
                                      "description": "入群时间（秒级时间戳）。"
                                    }
                                  }
                                },
                                "description": "群成员列表。首次同步返回全部成员；增量同步只返回有变化的成员，无变化时为空数组。"
                              },
                              "ver": {
                                "type": "string",
                                "description": "最新增量游标（base64）。下次调用原样传回 ver，只拿变化。其余未列出的字段为企业微信内部状态值，一般无需处理。"
                              }
                            }
                          },
                          "description": "群信息列表（通常 1 条，对应请求的群）。"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {
                    "roomInfos": [
                      {
                        "info": {
                          "roomId": "10000000000000002",
                          "roomName": "示例群",
                          "createUin": 1688850000000001,
                          "createTime": 1780000000,
                          "notice": {
                            "content": "群公告内容",
                            "time": 1780000000,
                            "sendervid": 1688850000000001
                          },
                          "admins": [
                            {
                              "vid": 1688850000000001
                            }
                          ]
                        },
                        "members": [
                          {
                            "uin": 1688850000000001,
                            "nickName": "成员昵称",
                            "jointime": 1780000000
                          }
                        ],
                        "ver": "<增量游标，base64，下次原样传回>"
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/room/sessionSync": {
      "post": {
        "tags": [
          "群聊"
        ],
        "summary": "同步会话列表",
        "description": "### 接口用途\n获取当前账号**最近有消息往来**的会话列表（相当于企业微信「消息」页顶部的最近会话）：每个会话的类型、未读数和最后一条消息，同时返回免打扰会话和「保存到通讯录」的群。\n\n### 调用时机\n需要展示最近会话、统计未读数时调用；实时收消息请用消息回调，不需要轮询本接口。\n\n### 注意\n- **不保证返回全部历史会话**：实测只返回最近约 6000 条消息范围内有往来的会话（范围起点为 data.minSequence，终点为 data.syncKey）。发消息很多的账号，较早的会话会被挤出列表；免打扰列表 shieldList 里的会话也可能不在 sessionList 中。\n- 需要完整清单时请组合使用：客户群用「获取我的客户群列表」，联系人用「同步通讯录 id」「同步外部数据（非企业）」，新会话以消息回调为准。\n- limit、sync 目前不影响返回结果（limit 传 1 也会返回窗口内全部会话；sync 传 0/1/不传结果相同）。建议 limit 传 2000、sync 传 0，data.isEnd=true 表示本次已返回完整。\n- 会话类型看 sessionList[].conversationType：0 = 单聊，1 = 群聊，3 = 系统会话；其它值（如 7、103、107）为企业微信特殊会话，原样返回。\n- 超过 JS 安全整数范围的 ID（如 17 位群 ID）以字符串返回，较短的 ID（如 16 位用户 ID、5 位系统会话 ID）仍为数字；对接时 ID 建议统一按字符串处理。",
        "operationId": "room_sessionSync",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "limit": {
                    "type": "integer",
                    "description": "希望返回的会话数量，建议传 2000。实测当前版本会忽略该值（返回窗口内全部会话）；不能传负数。",
                    "example": 2000
                  },
                  "sync": {
                    "type": "integer",
                    "description": "同步起点，建议传 0。实测当前版本传 0、1 或不传结果相同。",
                    "example": 0
                  }
                },
                "required": [
                  "instance_guid"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "limit": 2000,
                "sync": 0
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "isEnd": {
                          "type": "boolean",
                          "description": "是否已返回本次范围内的全部会话。true 表示已完整返回（不代表包含所有历史会话，见 minSequence）。"
                        },
                        "syncKey": {
                          "type": "number",
                          "description": "账号当前最新的消息序号（返回范围的终点）。"
                        },
                        "minSequence": {
                          "type": "number",
                          "description": "本次返回范围的起点序号：只返回最后一条消息序号在 minSequence～syncKey 之间的会话（实测两者相差约 6000）。消息很少的账号可能为 0，表示从头返回。"
                        },
                        "sessionList": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "remoteId": {
                                "description": "会话对象 ID：单聊为对方的用户 ID，群聊为群 ID（roomId），系统会话为较短的系统 ID。可直接作为发消息接口的 conversationId 使用。（类型：string / number）"
                              },
                              "conversationType": {
                                "type": "number",
                                "description": "会话类型：0 = 单聊，1 = 群聊，3 = 系统会话；其它值（如 103、107）为企业微信特殊会话。"
                              },
                              "unreadCount": {
                                "type": "number",
                                "description": "该会话的未读消息数。"
                              },
                              "lastReadMessageId": {
                                "type": "number",
                                "description": "该会话中最后一条已读消息的 ID，0 表示没有已读记录。"
                              },
                              "message": {
                                "type": "object",
                                "description": "该会话的最后一条消息，字段含义与消息回调相同（见「回调结构说明」）。",
                                "properties": {
                                  "id": {
                                    "type": "number",
                                    "description": "消息 ID。"
                                  },
                                  "messageType": {
                                    "type": "number",
                                    "description": "会话类型，与 conversationType 一致（0 单聊 / 1 群聊 / 3 系统）。"
                                  },
                                  "contentType": {
                                    "type": "number",
                                    "description": "消息内容类型（如 0/2 文本、14 图片），完整对照见「回调结构说明」。"
                                  },
                                  "fromUserId": {
                                    "type": "number",
                                    "description": "发送人用户 ID。"
                                  },
                                  "roomId": {
                                    "description": "所在群 ID；单聊为 0。（类型：string / number）"
                                  },
                                  "sendTime": {
                                    "type": "number",
                                    "description": "发送时间，Unix 时间戳（秒）。"
                                  },
                                  "senderName": {
                                    "type": "string",
                                    "description": "发送人名称。"
                                  },
                                  "appInfo": {
                                    "type": "string",
                                    "description": "消息唯一标识（撤回等操作会用到）。"
                                  },
                                  "content": {
                                    "type": "string",
                                    "description": "消息内容，企业微信内部格式（Base64 编码），不能直接显示；需要原文时以消息回调里的内容为准。"
                                  },
                                  "extraData": {
                                    "type": "string",
                                    "description": "消息附加数据（Base64 编码，部分消息才有），一般无需关注。"
                                  }
                                }
                              }
                            }
                          },
                          "description": "会话列表，每一项是一个会话。"
                        },
                        "shieldList": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "remoteId": {
                                "description": "免打扰会话的对象 ID（同 sessionList[].remoteId）。（类型：string / number）"
                              },
                              "conversationType": {
                                "type": "number",
                                "description": "免打扰会话的类型（取值同 conversationType，可能出现 7 等特殊类型）。"
                              },
                              "remainTime": {
                                "type": "number",
                                "description": "免打扰剩余时长，-1 表示一直免打扰。"
                              },
                              "forwardId": {
                                "type": "number",
                                "description": "内部字段，一般为 0，无需关注。"
                              },
                              "foldState": {
                                "type": "number",
                                "description": "是否折叠该会话：1 = 已折叠，0 = 未折叠。"
                              }
                            }
                          },
                          "description": "设置了「消息免打扰」的会话列表。"
                        },
                        "collectionList": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "remoteId": {
                                "description": "群 ID（roomId）。（类型：string / number）"
                              },
                              "conversationType": {
                                "type": "number",
                                "description": "会话类型，群为 1。"
                              }
                            }
                          },
                          "description": "已「保存到通讯录」的群（实测：调用「保存通讯录（仅限群）」开启后出现在这里，关闭后移除）。"
                        },
                        "field5": {
                          "type": "array",
                          "items": {},
                          "description": "企业微信内部字段（数字数组），无需关注。"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {
                    "isEnd": true,
                    "syncKey": 15875656,
                    "minSequence": 14140053,
                    "sessionList": [
                      {
                        "remoteId": "10920000000000001",
                        "conversationType": 1,
                        "unreadCount": 2,
                        "lastReadMessageId": 1005139,
                        "message": {
                          "id": 1005141,
                          "syncKey": 15875656,
                          "messageType": 1,
                          "fromUserId": 7881300000000002,
                          "toUserId": 0,
                          "roomId": "10920000000000001",
                          "contentType": 2,
                          "sendTime": 1792500000,
                          "senderName": "示例客户",
                          "appInfo": "CAQQiaO51AYY4Y+oq5SAgAMg56GIsQQ=",
                          "imageUrl": "",
                          "unreadUserCount": 0,
                          "flag": 0,
                          "referenceId": 0,
                          "deviceInfo": 123456,
                          "content": "Cl0IABJZClfmjqXlj6PogZTosIPvvIzmraPlnKjov5vooYzpmo/mnLrpl7TpmpTlj5HpgIHmtYvor5XjgIIgWzIwMjYtMTAtMjIgMDk6NDA6NTcgLyA4NTM1YzY5OF0=",
                          "extraData": "<Base64 编码数据，已省略>"
                        }
                      }
                    ],
                    "shieldList": [
                      {
                        "conversationType": 3,
                        "remoteId": 10031,
                        "remainTime": -1,
                        "forwardId": 0,
                        "foldState": 0
                      },
                      {
                        "conversationType": 7,
                        "remoteId": 10059,
                        "remainTime": -1,
                        "forwardId": 0,
                        "foldState": 1
                      }
                    ],
                    "collectionList": [
                      {
                        "conversationType": 1,
                        "remoteId": "10920000000000002",
                        "forwardId": 0
                      }
                    ],
                    "field5": [
                      131075,
                      65537,
                      131073
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/friend/sendSns": {
      "post": {
        "tags": [
          "好友/朋友圈"
        ],
        "summary": "发布朋友圈",
        "description": "### 接口用途\n用于发布朋友圈。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；媒体需先经「朋友圈媒体上传」得到 fileId；其他字段说明见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，data 为发布结果（含 postInfo 朋友圈详情）。",
        "operationId": "friend_sendSns",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "xid": {
                    "type": "array",
                    "items": {},
                    "description": "指定可见/相关用户的 xid 列表；不指定传空数组 []。"
                  },
                  "content": {
                    "type": "string",
                    "description": "朋友圈文字内容。"
                  },
                  "mediaList": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "number",
                          "description": "媒体类型（取自「朋友圈媒体上传」返回）。"
                        },
                        "fileId": {
                          "type": "string",
                          "description": "媒体文件 ID（「朋友圈媒体上传」返回）。"
                        },
                        "videoLen": {
                          "type": "number",
                          "description": "视频时长（秒）；视频媒体时填写。"
                        },
                        "md5": {
                          "type": "string",
                          "description": "媒体文件 MD5。"
                        },
                        "size": {
                          "type": "number",
                          "description": "媒体文件大小（字节）。"
                        },
                        "storeType": {
                          "type": "number",
                          "description": "存储类型（取自上传返回）。"
                        }
                      }
                    },
                    "description": "媒体列表（图片/视频，取自「朋友圈媒体上传」）；纯文字传空数组 []。"
                  },
                  "poiInfo": {
                    "type": "object",
                    "description": "位置信息；不带位置传经纬度 -180、其余留空。",
                    "properties": {
                      "city": {
                        "type": "string",
                        "description": "城市。"
                      },
                      "latitude": {
                        "type": "string",
                        "description": "纬度（不带位置传 -180）。"
                      },
                      "longitude": {
                        "type": "string",
                        "description": "经度（不带位置传 -180）。"
                      },
                      "poiAddress": {
                        "type": "string",
                        "description": "POI 地址。"
                      },
                      "poiClassifyId": {
                        "type": "string",
                        "description": "POI 分类 ID。"
                      },
                      "poiClassifyType": {
                        "type": "string",
                        "description": "POI 分类类型。"
                      }
                    }
                  },
                  "linkInfo": {
                    "type": "object",
                    "description": "链接信息（发布链接类朋友圈时填写；无则传空对象 {}）。"
                  },
                  "visibleType": {
                    "type": "boolean",
                    "description": "可见性类型（配合 xid 控制可见范围）。"
                  },
                  "isGroupSend": {
                    "type": "boolean",
                    "description": "是否群发。"
                  }
                },
                "required": [
                  "instance_guid",
                  "content",
                  "visibleType",
                  "isGroupSend"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "xid": [],
                "content": "这是一条来自星云API的朋友圈测试内容",
                "mediaList": [
                  {
                    "type": 2,
                    "fileId": "<fileId 省略>",
                    "videoLen": 1,
                    "md5": "<省略>",
                    "size": 369520,
                    "storeType": 0
                  },
                  {
                    "type": 3,
                    "fileId": "<fileId 省略>",
                    "md5": "<省略>",
                    "size": 10782,
                    "storeType": 0
                  }
                ],
                "poiInfo": {
                  "city": "",
                  "latitude": "-180",
                  "longitude": "-180",
                  "poiAddress": "",
                  "poiClassifyId": "",
                  "poiClassifyType": ""
                },
                "linkInfo": {},
                "visibleType": false,
                "isGroupSend": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "object",
                          "properties": {
                            "baseRsp": {
                              "type": "object",
                              "properties": {
                                "retCode": {
                                  "type": "number",
                                  "description": "基础返回码（0 成功）。"
                                }
                              }
                            },
                            "postInfo": {
                              "type": "object",
                              "description": "发布成功的朋友圈信息。",
                              "properties": {
                                "sid": {
                                  "type": "number",
                                  "description": "朋友圈 sid（唯一标识）。"
                                },
                                "authorVid": {
                                  "type": "number",
                                  "description": "作者 vid。"
                                },
                                "seq": {
                                  "type": "number",
                                  "description": "序列号。"
                                },
                                "time": {
                                  "type": "number",
                                  "description": "发布时间（秒级时间戳）。"
                                },
                                "content": {
                                  "type": "string",
                                  "description": "文字内容。"
                                },
                                "mediaList": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "number",
                                        "description": "媒体类型。"
                                      },
                                      "fileId": {
                                        "type": "string",
                                        "description": "媒体文件 ID。"
                                      },
                                      "videoLen": {
                                        "type": "number",
                                        "description": "视频时长（秒）。"
                                      },
                                      "md5": {
                                        "type": "string",
                                        "description": "媒体文件 MD5。"
                                      },
                                      "size": {
                                        "type": "number",
                                        "description": "媒体文件大小（字节）。"
                                      },
                                      "storeType": {
                                        "type": "number",
                                        "description": "存储类型。"
                                      }
                                    }
                                  },
                                  "description": "媒体列表。"
                                },
                                "postId": {
                                  "type": "string",
                                  "description": "朋友圈 postId。"
                                },
                                "flag": {
                                  "type": "number",
                                  "description": "标记位（以实际返回为准）。"
                                },
                                "updateTime": {
                                  "type": "number",
                                  "description": "更新时间（毫秒）。"
                                },
                                "type": {
                                  "type": "number",
                                  "description": "朋友圈类型（以实际返回为准）。"
                                },
                                "taskSid": {
                                  "type": "number",
                                  "description": "任务 sid（以实际返回为准）。"
                                },
                                "linkInfo": {
                                  "type": "object",
                                  "description": "链接信息。"
                                },
                                "poiInfo": {
                                  "type": "object",
                                  "description": "位置信息。",
                                  "properties": {
                                    "city": {
                                      "type": "string",
                                      "description": "城市。"
                                    },
                                    "latitude": {
                                      "type": "string",
                                      "description": "纬度（不带位置传 -180）。"
                                    },
                                    "longitude": {
                                      "type": "string",
                                      "description": "经度（不带位置传 -180）。"
                                    },
                                    "poiAddress": {
                                      "type": "string",
                                      "description": "POI 地址。"
                                    },
                                    "poiClassifyId": {
                                      "type": "string",
                                      "description": "POI 分类 ID。"
                                    },
                                    "poiClassifyType": {
                                      "type": "string",
                                      "description": "POI 分类类型。"
                                    }
                                  }
                                },
                                "visibleType": {
                                  "type": "number",
                                  "description": "可见性类型。"
                                },
                                "notifyTime": {
                                  "type": "number",
                                  "description": "提醒时间（以实际返回为准）。"
                                },
                                "notifyVid": {
                                  "type": "number",
                                  "description": "提醒 vid（以实际返回为准）。"
                                }
                              }
                            },
                            "limtLine": {
                              "type": "object",
                              "properties": {
                                "validTime": {
                                  "type": "number",
                                  "description": "限制信息有效时间（秒，以实际返回为准）。"
                                }
                              }
                            },
                            "corpLimtLine": {
                              "type": "object",
                              "properties": {
                                "validTime": {
                                  "type": "number",
                                  "description": "企业限制信息有效时间（秒，以实际返回为准）。"
                                }
                              }
                            },
                            "totalSendCnt": {
                              "type": "number",
                              "description": "累计发布次数。"
                            }
                          }
                        }
                      },
                      "description": "业务数据（发布结果）。"
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {
                    "baseRsp": {
                      "retCode": 0
                    },
                    "postInfo": {
                      "sid": 7683860000000000000,
                      "authorVid": 1688850000000000,
                      "seq": 1789039368445,
                      "time": 1789039368,
                      "content": "这是一条来自星云API的朋友圈测试内容",
                      "mediaList": [
                        {
                          "type": 2,
                          "fileId": "<fileId 省略>",
                          "videoLen": 1,
                          "md5": "<省略>",
                          "size": 369520,
                          "storeType": 0
                        },
                        {
                          "type": 3,
                          "fileId": "<fileId 省略>",
                          "md5": "<省略>",
                          "size": 10782,
                          "storeType": 0
                        }
                      ],
                      "postId": "<postId 省略>",
                      "flag": 0,
                      "updateTime": 1789039368445,
                      "type": 0,
                      "taskSid": 0,
                      "linkInfo": {},
                      "poiInfo": {
                        "city": "",
                        "latitude": "-180",
                        "longitude": "-180",
                        "poiAddress": "",
                        "poiClassifyId": "",
                        "poiClassifyType": ""
                      },
                      "visibleType": 0,
                      "notifyTime": 0,
                      "notifyVid": 0
                    },
                    "limtLine": {
                      "validTime": 16632
                    },
                    "corpLimtLine": {
                      "validTime": 16632
                    },
                    "totalSendCnt": 1
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/friend/getSnsList": {
      "post": {
        "tags": [
          "好友/朋友圈"
        ],
        "summary": "获取朋友圈列表",
        "description": "### 接口用途\n用于获取朋友圈列表。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；其他字段说明见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "friend_getSnsList",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "maxId": {
                    "type": "integer",
                    "description": "分页游标或上一页最后一条朋友圈标识；首次查询通常传 0。",
                    "example": 0
                  },
                  "limit": {
                    "type": "integer",
                    "description": "单次返回数量上限。",
                    "example": 5
                  }
                },
                "required": [
                  "instance_guid"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "maxId": 0,
                "limit": 5
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "array",
                      "items": {},
                      "description": "结果列表，元素结构如下"
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": [
                    {
                      "sid": "7667160465557328100",
                      "authorVid": 1688858348844282,
                      "seq": 1785149906806,
                      "time": 1785149906,
                      "content": "测下1008",
                      "postId": "CAQQ0vOc0wYY+unVz5+AgAMg3e/1zwg=",
                      "isDelete": false,
                      "updateTime": 1785149906806,
                      "taskSid": 0,
                      "visibleType": 0,
                      "poiInfo": {
                        "poiName": "",
                        "longitude": "0",
                        "latitude": "0",
                        "poiId": "",
                        "city": "",
                        "address": "",
                        "country": ""
                      },
                      "type": 1,
                      "notifyTime": 0,
                      "notifyVid": 0
                    },
                    {
                      "sid": "7664927572370492494",
                      "authorVid": 1688858348844282,
                      "seq": 1784630020901,
                      "time": 1784630020,
                      "content": "测下1",
                      "likeList": [
                        {
                          "vid": 1688858348844282,
                          "time": 1010666574
                        }
                      ],
                      "postId": "CAQQhJb90gYY+unVz5+AgAMg06zJ1Qw=",
                      "isDelete": false,
                      "updateTime": 1784633023291,
                      "deleteCommentList": [
                        {
                          "commentid": 3,
                          "fromId": 1688858348844282,
                          "sid": "7664927572370492494",
                          "time": 1784630322,
                          "postid": "CAQQsZj90gYY+unVz5+AgAMgl9vM7gg=",
                          "comment": "评论内容1",
                          "flag": 3
                        }
                      ],
                      "taskSid": 0,
                      "visibleType": 0,
                      "poiInfo": {
                        "poiName": "",
                        "longitude": "0",
                        "latitude": "0",
                        "poiId": "",
                        "city": "",
                        "address": "",
                        "country": ""
                      },
                      "type": 1,
                      "notifyTime": 0,
                      "notifyVid": 0
                    },
                    {
                      "sid": "7660061829184441038",
                      "authorVid": 1688858348844282,
                      "seq": 1783497126421,
                      "time": 1783497126,
                      "content": "测下1",
                      "postId": "CAQQpYO40gYY+unVz5+AgAMgh7HY6wg=",
                      "isDelete": false,
                      "updateTime": 1783497126421,
                      "taskSid": 0,
                      "visibleType": 0,
                      "poiInfo": {
                        "poiName": "",
                        "longitude": "0",
                        "latitude": "0",
                        "poiId": "",
                        "city": "",
                        "address": "",
                        "country": ""
                      },
                      "type": 1,
                      "notifyTime": 0,
                      "notifyVid": 0
                    },
                    {
                      "sid": "7658115100604424498",
                      "authorVid": 1688858348844282,
                      "seq": 1783043868822,
                      "time": 1783043868,
                      "content": "测下1",
                      "postId": "CAQQnK6c0gYY+unVz5+AgAMg3eaL7A8=",
                      "isDelete": false,
                      "updateTime": 1783043868822,
                      "taskSid": 0,
                      "visibleType": 0,
                      "poiInfo": {
                        "poiName": "",
                        "longitude": "0",
                        "latitude": "0",
                        "poiId": "",
                        "city": "",
                        "address": "",
                        "country": ""
                      },
                      "type": 1,
                      "notifyTime": 0,
                      "notifyVid": 0
                    },
                    {
                      "sid": "7658106842289935926",
                      "authorVid": 1688858348844282,
                      "seq": 1783041945014,
                      "time": 1783041945,
                      "content": "测下1",
                      "postId": "CAQQmJ+c0gYY+unVz5+AgAMgq/Tunws=",
                      "isDelete": false,
                      "updateTime": 1783041945014,
                      "taskSid": 0,
                      "visibleType": 0,
                      "poiInfo": {
                        "poiName": "",
                        "longitude": "0",
                        "latitude": "0",
                        "poiId": "",
                        "city": "",
                        "address": "",
                        "country": ""
                      },
                      "type": 1,
                      "notifyTime": 0,
                      "notifyVid": 0
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/friend/setSnsSignature": {
      "post": {
        "tags": [
          "好友/朋友圈"
        ],
        "summary": "设置朋友圈签名",
        "description": "### 接口用途\n用于设置朋友圈签名。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；其他字段说明见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "friend_setSnsSignature",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "sign": {
                    "type": "string",
                    "description": "签名或校验签名。",
                    "example": "每天都有好心情"
                  }
                },
                "required": [
                  "instance_guid",
                  "sign"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "sign": "每天都有好心情"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {}
                }
              }
            }
          }
        }
      }
    },
    "/api/friend/likeSns": {
      "post": {
        "tags": [
          "好友/朋友圈"
        ],
        "summary": "朋友圈点赞",
        "description": "### 接口用途\n用于朋友圈点赞。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；其他字段说明见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "friend_likeSns",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "sid": {
                    "type": "number",
                    "description": "朋友圈 ID（要点赞/取消的那条朋友圈动态）。",
                    "example": "7680120000000000000"
                  },
                  "cancel": {
                    "type": "boolean",
                    "description": "是否取消点赞：false=点赞，true=取消点赞。",
                    "example": true
                  }
                },
                "required": [
                  "instance_guid",
                  "sid",
                  "cancel"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "sid": "7680120000000000000",
                "cancel": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "baseRsp": {
                          "type": "object",
                          "description": "基础响应结果（含结果码 ret / 错误信息 errMsg）",
                          "properties": {
                            "retCode": {
                              "type": "number",
                              "description": "结果码"
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {
                    "baseRsp": {
                      "retCode": 0
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/friend/getSnsDetails": {
      "post": {
        "tags": [
          "好友/朋友圈"
        ],
        "summary": "获取朋友圈的详情",
        "description": "### 接口用途\n用于获取朋友圈的详情。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；其他字段说明见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "friend_getSnsDetails",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "sid": {
                    "type": "integer",
                    "description": "朋友圈动态唯一标识。",
                    "example": "7667160465557328100"
                  }
                },
                "required": [
                  "instance_guid",
                  "sid"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "sid": "7667160465557328100"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "sid": {
                          "type": "string",
                          "description": "朋友圈动态唯一标识。"
                        },
                        "authorVid": {
                          "type": "number",
                          "description": "朋友圈作者用户标识。"
                        },
                        "seq": {
                          "type": "number",
                          "description": "数据序号或版本序列。"
                        },
                        "time": {
                          "type": "number",
                          "description": "服务端响应时间。"
                        },
                        "content": {
                          "type": "string",
                          "description": "朋友圈正文或媒体内容。"
                        },
                        "likeList": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "vid": {
                                "type": "number",
                                "description": "用户内部标识（协议字段），用于关联对应成员或联系人。"
                              },
                              "time": {
                                "type": "number",
                                "description": "服务端响应时间。"
                              }
                            }
                          },
                          "description": "点赞记录列表。"
                        },
                        "postId": {
                          "type": "string",
                          "description": "朋友圈发布记录标识。"
                        },
                        "isDelete": {
                          "type": "boolean",
                          "description": "动态是否已删除。"
                        },
                        "updateTime": {
                          "type": "number",
                          "description": "更新时间戳。"
                        },
                        "xid": {
                          "type": "array",
                          "items": {},
                          "description": "出参字段 xid；当前协议未提供更详细的公开说明，请以实际联调结果为准。"
                        },
                        "taskSid": {
                          "type": "number",
                          "description": "朋友圈任务标识。"
                        },
                        "visibleType": {
                          "type": "number",
                          "description": "可见范围类型。"
                        },
                        "poiInfo": {
                          "type": "object",
                          "description": "地理位置信息。",
                          "properties": {
                            "poiName": {
                              "type": "string",
                              "description": "地点名称。"
                            },
                            "longitude": {
                              "type": "string",
                              "description": "经度。"
                            },
                            "latitude": {
                              "type": "string",
                              "description": "纬度。"
                            },
                            "poiId": {
                              "type": "string",
                              "description": "地点标识。"
                            },
                            "city": {
                              "type": "string",
                              "description": "城市名称。"
                            },
                            "address": {
                              "type": "string",
                              "description": "详细地址。"
                            },
                            "country": {
                              "type": "string",
                              "description": "国家或地区名称。"
                            }
                          }
                        },
                        "type": {
                          "type": "number",
                          "description": "类型编号或类型标识；具体枚举以所在对象为准。"
                        },
                        "notifyTime": {
                          "type": "number",
                          "description": "通知时间戳。"
                        },
                        "notifyVid": {
                          "type": "number",
                          "description": "通知对象用户标识。"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {
                    "sid": "7667160465557328100",
                    "authorVid": 1688858348844282,
                    "seq": 1785149906806,
                    "time": 1785149906,
                    "content": "测下1008",
                    "likeList": [
                      {
                        "vid": 1688858348844282,
                        "time": 829853924
                      }
                    ],
                    "postId": "CAQQ0vOc0wYY+unVz5+AgAMg3e/1zwg=",
                    "isDelete": false,
                    "updateTime": 1785150075653,
                    "xid": [
                      7881299752089744,
                      7881303197908577,
                      7881302842920640,
                      7881303246306300
                    ],
                    "taskSid": 0,
                    "visibleType": 0,
                    "poiInfo": {
                      "poiName": "",
                      "longitude": "0",
                      "latitude": "0",
                      "poiId": "",
                      "city": "",
                      "address": "",
                      "country": ""
                    },
                    "type": 1,
                    "notifyTime": 0,
                    "notifyVid": 0
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/friend/commentSns": {
      "post": {
        "tags": [
          "好友/朋友圈"
        ],
        "summary": "发布朋友圈评论",
        "description": "### 接口用途\n用于发布朋友圈评论。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；其他字段说明见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "friend_commentSns",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "sid": {
                    "type": "number",
                    "description": "朋友圈动态唯一标识。",
                    "example": "7667160000000000000"
                  },
                  "content": {
                    "type": "string",
                    "description": "评论正文内容。",
                    "example": "评论内容1223"
                  },
                  "refCommentId": {
                    "type": "integer",
                    "description": "被回复评论的 commentId：追评（回复某条评论）时传该评论的 commentId；非追评（直接评论朋友圈）时传 0。",
                    "example": 0
                  }
                },
                "required": [
                  "instance_guid",
                  "sid",
                  "content",
                  "refCommentId"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "sid": "7667160000000000000",
                "content": "评论内容1223",
                "refCommentId": 0
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "baseRsp": {
                          "type": "object",
                          "description": "底层协议通用响应。",
                          "properties": {
                            "ret": {
                              "type": "number",
                              "description": "底层协议返回码；0 通常表示成功。"
                            }
                          }
                        },
                        "commentId": {
                          "type": "number",
                          "description": "朋友圈评论唯一标识。"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {
                    "baseRsp": {
                      "ret": 0
                    },
                    "commentId": 0
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/friend/deleteSnsComment": {
      "post": {
        "tags": [
          "好友/朋友圈"
        ],
        "summary": "删除朋友圈评论",
        "description": "### 接口用途\n用于删除朋友圈评论。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；其他字段说明见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "friend_deleteSnsComment",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "sid": {
                    "type": "integer",
                    "description": "朋友圈动态唯一标识。",
                    "example": "7667160465557328100"
                  },
                  "commentId": {
                    "type": "integer",
                    "description": "朋友圈评论唯一标识。",
                    "example": 3
                  }
                },
                "required": [
                  "instance_guid",
                  "sid",
                  "commentId"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "sid": "7667160465557328100",
                "commentId": 3
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "baseRsp": {
                          "type": "object",
                          "description": "底层协议通用响应。",
                          "properties": {
                            "ret": {
                              "type": "number",
                              "description": "底层协议返回码；0 通常表示成功。"
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {
                    "baseRsp": {
                      "ret": 0
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/friend/deleteSns": {
      "post": {
        "tags": [
          "好友/朋友圈"
        ],
        "summary": "删除朋友圈",
        "description": "### 接口用途\n用于删除朋友圈。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；其他字段说明见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "friend_deleteSns",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "sid": {
                    "type": "number",
                    "description": "朋友圈动态唯一标识。",
                    "example": "7680127698539590076"
                  }
                },
                "required": [
                  "instance_guid",
                  "sid"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "sid": "7680127698539590076"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "baseRsp": {
                          "type": "object",
                          "description": "底层协议通用响应。",
                          "properties": {
                            "retCode": {
                              "type": "number",
                              "description": "返回状态码；具体枚举以服务端协议为准。"
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {
                    "baseRsp": {
                      "retCode": 0
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/cdn/uploadVideo": {
      "post": {
        "tags": [
          "文件"
        ],
        "summary": "上传CDN视频",
        "description": "### 接口用途\n上传视频到企业微信 CDN。返回的 `data` 可**整体**作为「发送视频消息」`/api/message/sendVideo` 的 `content` 发出。\n\n### 请求说明\n请求体使用 JSON 格式，通过 instance_guid 指定设备实例。`base64` 为视频文件的 Base64（不含 Data URI 前缀）；`thumbBase64` 为视频封面图的 Base64（建议取视频某一帧存为 JPG，宽度 480 像素以内）。\n\n### 耗时说明\n服务端需把文件转存到企业微信 CDN，文件越大耗时越长（实测 15.6MB 视频约 1 分钟）。请把 HTTP 客户端超时设为 **≥ 300 秒**，服务端最长等待 300 秒。请求体上限 50MB（Base64 编码后约膨胀 1/3，即原文件约 35MB 以内）。\n\n同一账号**最多同时进行 2 个**上传/下载（本类接口共用名额），多出的请求自动排队，前面完成即执行；排队最长 60 秒，仍未轮到返回 `42901`（HTTP 429）。排队时间计入 300 秒总等待。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功。`data` = {id, size, duration, width, height, thumbUrl, aesKey, md5}，其中 `id` 即媒体文件 ID（fileId），时长/宽高已自动识别，无需自己计算。",
        "operationId": "cdn_uploadVideo",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "base64": {
                    "type": "string",
                    "description": "文件 Base64 编码内容，不包含 Data URI 前缀。",
                    "example": "<base64 数据，示例省略>"
                  },
                  "fileName": {
                    "type": "string",
                    "description": "文件名称，建议包含正确的文件扩展名。",
                    "example": "123123.MP4"
                  },
                  "thumbBase64": {
                    "type": "string",
                    "description": "缩略图 Base64 编码内容，不包含 Data URI 前缀。",
                    "example": "<base64 数据，示例省略>"
                  }
                },
                "required": [
                  "instance_guid",
                  "base64",
                  "fileName",
                  "thumbBase64"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "base64": "<base64 数据，示例省略>",
                "fileName": "123123.MP4",
                "thumbBase64": "<base64 数据，示例省略>"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "媒体文件 ID（fileId）；发送视频时即 content.id。"
                        },
                        "size": {
                          "type": "number",
                          "description": "文件大小（字节）。"
                        },
                        "duration": {
                          "type": "number",
                          "description": "视频时长（秒），已自动识别。"
                        },
                        "width": {
                          "type": "number",
                          "description": "视频宽度（像素），已自动识别。"
                        },
                        "height": {
                          "type": "number",
                          "description": "视频高度（像素），已自动识别。"
                        },
                        "thumbUrl": {
                          "type": "string",
                          "description": "视频封面（缩略图）直链地址。"
                        },
                        "aesKey": {
                          "type": "string",
                          "description": "文件解密密钥（AES）。"
                        },
                        "md5": {
                          "type": "string",
                          "description": "文件内容 MD5 校验值。"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {
                    "id": "<fileId 省略>",
                    "size": 346390,
                    "duration": 3,
                    "width": 1280,
                    "height": 720,
                    "thumbUrl": "https://example.com/...",
                    "aesKey": "<省略>",
                    "md5": "da922726e2822017143cf73bfa453baa"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/cdn/uploadImage": {
      "post": {
        "tags": [
          "文件"
        ],
        "summary": "上传CDN图片",
        "description": "### 接口用途\n用于上传CDN图片。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；其他字段说明见参数表。\n\n### 耗时说明\n服务端需把文件转存到企业微信 CDN，文件越大耗时越长（实测 15.6MB 视频约 1 分钟）。请把 HTTP 客户端超时设为 **≥ 300 秒**，服务端最长等待 300 秒。请求体上限 50MB（Base64 编码后约膨胀 1/3，即原文件约 35MB 以内）。\n\n同一账号**最多同时进行 2 个**上传/下载（本类接口共用名额），多出的请求自动排队，前面完成即执行；排队最长 60 秒，仍未轮到返回 `42901`（HTTP 429）。排队时间计入 300 秒总等待。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "cdn_uploadImage",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "fileName": {
                    "type": "string",
                    "description": "文件名称，建议包含正确的文件扩展名。",
                    "example": "示例.png"
                  },
                  "base64": {
                    "type": "string",
                    "description": "文件 Base64 编码内容，不包含 Data URI 前缀。",
                    "example": "<base64 数据，示例省略>"
                  }
                },
                "required": [
                  "instance_guid",
                  "fileName",
                  "base64"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "fileName": "示例.png",
                "base64": "<base64 数据，示例省略>"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "记录/消息服务端 id"
                        },
                        "size": {
                          "type": "number",
                          "description": "文件大小（字节）"
                        },
                        "width": {
                          "type": "number",
                          "description": "媒体宽度，单位为像素。"
                        },
                        "height": {
                          "type": "number",
                          "description": "媒体高度，单位为像素。"
                        },
                        "aesKey": {
                          "type": "string",
                          "description": "媒体 AES 解密密钥。"
                        },
                        "md5": {
                          "type": "string",
                          "description": "文件 MD5 校验"
                        },
                        "midImageFileSize": {
                          "type": "number",
                          "description": "中等图大小（字节）"
                        },
                        "thumbFileSize": {
                          "type": "number",
                          "description": "缩略图大小（字节）"
                        },
                        "thumbWidth": {
                          "type": "number",
                          "description": "缩略图宽度，单位为像素。"
                        },
                        "thumbHeight": {
                          "type": "number",
                          "description": "缩略图高度，单位为像素。"
                        },
                        "thumbMd5": {
                          "type": "string",
                          "description": "缩略图 MD5 摘要。"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {
                    "id": "<fileId 省略>",
                    "size": 360,
                    "width": 180,
                    "height": 120,
                    "aesKey": "<省略>",
                    "md5": "0b25a971709495c37d44d7af5c6cd1af",
                    "midImageFileSize": 979,
                    "thumbFileSize": 979,
                    "thumbWidth": 180,
                    "thumbHeight": 120,
                    "thumbMd5": "e9c7edd3cb93606a9c615f99807523f7"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/cdn/uploadFile": {
      "post": {
        "tags": [
          "文件"
        ],
        "summary": "上传CDN文件",
        "description": "### 接口用途\n用于上传CDN文件。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；其他字段说明见参数表。\n\n### 耗时说明\n服务端需把文件转存到企业微信 CDN，文件越大耗时越长（实测 15.6MB 视频约 1 分钟）。请把 HTTP 客户端超时设为 **≥ 300 秒**，服务端最长等待 300 秒。请求体上限 50MB（Base64 编码后约膨胀 1/3，即原文件约 35MB 以内）。\n\n同一账号**最多同时进行 2 个**上传/下载（本类接口共用名额），多出的请求自动排队，前面完成即执行；排队最长 60 秒，仍未轮到返回 `42901`（HTTP 429）。排队时间计入 300 秒总等待。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "cdn_uploadFile",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "fileName": {
                    "type": "string",
                    "description": "文件名称，建议包含正确的文件扩展名。",
                    "example": "测试.txt"
                  },
                  "base64": {
                    "type": "string",
                    "description": "文件 Base64 编码内容，不包含 Data URI 前缀。",
                    "example": "<base64 数据，示例省略>"
                  }
                },
                "required": [
                  "instance_guid",
                  "fileName",
                  "base64"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "fileName": "测试.txt",
                "base64": "<base64 数据，示例省略>"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "发送成功后的消息内部标识。"
                        },
                        "name": {
                          "type": "string",
                          "description": "文件或资源名称。"
                        },
                        "url": {
                          "type": "string",
                          "description": "访问地址。"
                        },
                        "size": {
                          "type": "number",
                          "description": "数据或文件大小。"
                        },
                        "aesKey": {
                          "type": "string",
                          "description": "媒体 AES 解密密钥。"
                        },
                        "md5": {
                          "type": "string",
                          "description": "文件 MD5 摘要。"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {
                    "id": "<fileId 省略>",
                    "name": "测试.txt",
                    "url": "",
                    "size": 29,
                    "aesKey": "<省略>",
                    "md5": "c3a8f00f345fba80ca3bd053e4c7ea72"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/cdn/download": {
      "post": {
        "tags": [
          "文件"
        ],
        "summary": "CDN下载",
        "description": "### 接口用途\n用于CDN下载。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；其他字段说明见参数表。\n\n### 并发说明\n同一账号**最多同时进行 2 个**上传/下载（本类接口共用名额），多出的请求自动排队，前面完成即执行；排队最长 60 秒，仍未轮到返回 `42901`（HTTP 429）。排队时间计入 300 秒总等待。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。\n\n### 注意\n当前项目中该接口路径与“发送链接卡片消息”相同，且请求字段更接近文件类消息；本次仅补充文档，不修改路径和业务字段。",
        "operationId": "cdn_download",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "fileId": {
                    "type": "string",
                    "description": "文件 ID（媒体文件标识，由对应上传接口返回）。",
                    "example": "<fileId 省略>"
                  },
                  "fileType": {
                    "type": "integer",
                    "description": "文件类型：1=原图片，2=压缩图，3=封面图，4=视频，5=文件。",
                    "example": 4
                  },
                  "aesKey": {
                    "type": "string",
                    "description": "文件 AES 密钥（解密用）。",
                    "example": "<省略>"
                  }
                },
                "required": [
                  "instance_guid",
                  "fileId",
                  "fileType"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "fileId": "<fileId 省略>",
                "fileType": 4,
                "aesKey": "<省略>"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {}
                }
              }
            }
          }
        }
      }
    },
    "/api/cdn/uploadBigFile": {
      "post": {
        "tags": [
          "文件"
        ],
        "summary": "上传CDN大文件",
        "description": "### 接口用途\n用于上传CDN大文件。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；其他字段说明见参数表。\n\n### 并发说明\n同一账号**最多同时进行 2 个**上传/下载（本类接口共用名额），多出的请求自动排队，前面完成即执行；排队最长 60 秒，仍未轮到返回 `42901`（HTTP 429）。排队时间计入 300 秒总等待。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "cdn_uploadBigFile",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "fileUrl": {
                    "type": "string",
                    "description": "文件资源地址。",
                    "example": "https://example.com/..."
                  }
                },
                "required": [
                  "instance_guid",
                  "fileUrl"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "fileUrl": "https://example.com/..."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "fileName": {
                          "type": "string",
                          "description": "文件名称。"
                        },
                        "fileMd5": {
                          "type": "string",
                          "description": "文件 MD5 摘要。"
                        },
                        "fileSize": {
                          "type": "number",
                          "description": "文件大小，单位为字节。"
                        },
                        "status": {
                          "type": "string",
                          "description": "二维码登录状态码；用于判断等待扫码、等待确认、需要验证码或登录成功等状态，具体枚举以服务端为准。"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {
                    "fileName": "d71c7a7090695920fafaffcc184006ac_raw.mp4",
                    "fileMd5": "5a384333b56f6a893906e81351d153fe",
                    "fileSize": 1290660,
                    "status": "uploading"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/cdn/getBigFileDownloadUrl": {
      "post": {
        "tags": [
          "文件"
        ],
        "summary": "获取大文件下载url",
        "description": "### 接口用途\n用于获取大文件下载url。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；其他字段说明见参数表。\n\n### 并发说明\n同一账号**最多同时进行 2 个**上传/下载（本类接口共用名额），多出的请求自动排队，前面完成即执行；排队最长 60 秒，仍未轮到返回 `42901`（HTTP 429）。排队时间计入 300 秒总等待。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "cdn_getBigFileDownloadUrl",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "fileId": {
                    "type": "string",
                    "description": "媒体文件标识，由对应上传接口返回。",
                    "example": "<fileId 省略>"
                  },
                  "fileName": {
                    "type": "string",
                    "description": "文件名称，建议包含正确的文件扩展名。",
                    "example": "random_20mb_20260727.txt"
                  }
                },
                "required": [
                  "instance_guid",
                  "fileId",
                  "fileName"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "fileId": "<fileId 省略>",
                "fileName": "random_20mb_20260727.txt"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "description": "大文件下载地址（该接口 data 直接返回下载 URL 字符串）"
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": "https://example.com/..."
                }
              }
            }
          }
        }
      }
    },
    "/api/cdn/urlDownload": {
      "post": {
        "tags": [
          "文件"
        ],
        "summary": "个微 URL 下载",
        "description": "### 接口用途\n通过媒体下载地址 + 解密密钥下载文件内容（个人微信媒体），返回 Base64 编码的文件数据。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；url / aesKey / wechatAuthKey 通常来自消息回调中的媒体信息，其他字段说明见参数表。\n\n### 并发说明\n同一账号**最多同时进行 2 个**上传/下载（本类接口共用名额），多出的请求自动排队，前面完成即执行；排队最长 60 秒，仍未轮到返回 `42901`（HTTP 429）。排队时间计入 300 秒总等待。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，data 为下载文件的 Base64 内容。",
        "operationId": "cdn_urlDownload",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "url": {
                    "type": "string",
                    "description": "媒体文件下载地址（来自消息回调中的媒体链接）。",
                    "example": "https://example.com/download?param=<媒体下载票据>"
                  },
                  "aesKey": {
                    "type": "string",
                    "description": "媒体文件解密密钥（AES）。",
                    "example": "<省略>"
                  },
                  "wechatAuthKey": {
                    "type": "string",
                    "description": "下载鉴权票据；与媒体链接一并下发，用于校验下载权限。",
                    "example": "v1_xxxxxxxx"
                  }
                },
                "required": [
                  "instance_guid",
                  "url",
                  "aesKey",
                  "wechatAuthKey"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "url": "https://example.com/download?param=<媒体下载票据>",
                "aesKey": "<省略>",
                "wechatAuthKey": "v1_xxxxxxxx"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object",
                      "description": "下载到的文件内容（Base64 编码）。"
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": "<Base64 文件内容，已省略>"
                }
              }
            }
          }
        }
      }
    },
    "/api/personal/getQrcode": {
      "post": {
        "tags": [
          "个人"
        ],
        "summary": "获取个人二维码",
        "description": "### 接口用途\n用于获取个人二维码。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；其他字段说明见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "personal_getQrcode",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  }
                },
                "required": [
                  "instance_guid"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "base64": {
                          "type": "string",
                          "description": "图片或文件的 Base64 编码内容。"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {
                    "base64": "<省略>"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/personal/getInfo": {
      "post": {
        "tags": [
          "个人"
        ],
        "summary": "获取个人信息",
        "description": "### 接口用途\n获取当前登录账号的资料，也是判断账号是否真正在线的推荐方式：code=0 且 uin 非 0 表示在线。\n\n### 调用时机\n登录流程中用到两次：\n- 第 2 步（登录前）：检查是否已登录。新设备返回 no account is currently logged in on this device 属正常，继续获取二维码；uin 非 0 说明已在线。\n- 第 7 步（登录后）：检测二维码返回 status=2 后调用，code=0 且 uin 非 0 即登录成功（未就绪时每 0.5–1 秒再查，最多约 10 秒）。完整步骤见左侧「开始使用 › 登录流程（新版）」。\n\n### 注意\n- 设备上没有登录账号时返回失败（no account is currently logged in on this device）。\n- 提交验证码后立刻调用也会返回上面这个提示：登录还没完成，先回到「检测二维码」查到 status=2 再调用。",
        "operationId": "personal_getInfo",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "实例标识（inst_xxxx），由「创建设备」返回。",
                    "example": "inst_xxxxxxxx"
                  }
                },
                "required": [
                  "instance_guid"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "uin": {
                          "type": "number",
                          "description": "当前登录账号的用户 ID，非 0 表示账号在线。"
                        },
                        "name": {
                          "type": "string",
                          "description": "账号在企业微信中显示的名字。"
                        },
                        "emailAddr": {
                          "type": "string",
                          "description": "账号绑定的邮箱地址，未绑定时为空字符串。"
                        },
                        "birthday": {
                          "type": "string",
                          "description": "生日，格式如 2000-01-01 00:00:00；未设置时可能为空，以实际返回为准。"
                        },
                        "mobile": {
                          "type": "string",
                          "description": "手机号，未填写或未公开时为空字符串。"
                        },
                        "phone": {
                          "type": "string",
                          "description": "电话号码（与 mobile 手机号分开，一般为座机/办公电话），未填写时为空字符串；以实际返回为准。"
                        },
                        "job": {
                          "type": "string",
                          "description": "职务（个人资料中的职务），未设置时为空字符串。"
                        },
                        "number": {
                          "type": "string",
                          "description": "成员编号（如企业设置的工号），未设置时为空字符串；具体以实际返回为准。"
                        },
                        "gender": {
                          "type": "number",
                          "description": "性别：1 通常为男，2 为女，0 为未设置/未知。"
                        },
                        "iconUrl": {
                          "type": "string",
                          "description": "头像图片地址（URL），可直接用于展示头像。"
                        },
                        "corpId": {
                          "type": "number",
                          "description": "账号所属企业的企业 ID（数字）。"
                        },
                        "attr": {
                          "type": "number",
                          "description": "账号属性标志位，内部字段，无需处理。"
                        },
                        "dispOrder": {
                          "type": "number",
                          "description": "在通讯录中的显示排序值，一般无需处理。"
                        },
                        "bizUin": {
                          "type": "number",
                          "description": "内部字段，无需处理。"
                        },
                        "position": {
                          "type": "string",
                          "description": "企业通讯录中的职位名称，未设置时为空字符串。"
                        },
                        "alias": {
                          "type": "string",
                          "description": "账号别名，未设置时为空字符串。"
                        },
                        "mainPartyId": {
                          "type": "number",
                          "description": "账号所在主部门的部门 ID（数字）。"
                        },
                        "gid": {
                          "type": "number",
                          "description": "内部字段，无需处理。"
                        },
                        "isNameVerified": {
                          "type": "boolean",
                          "description": "姓名是否已通过实名认证：true 是，false 否。"
                        },
                        "internationCode": {
                          "type": "string",
                          "description": "手机号的国际区号，如 \"86\"（中国大陆）。"
                        },
                        "bindEmailStatus": {
                          "type": "number",
                          "description": "邮箱绑定状态，取值以实际返回为准。"
                        },
                        "englishName": {
                          "type": "string",
                          "description": "英文名，未设置时可能为空。"
                        },
                        "customInfo": {
                          "type": "object",
                          "description": "企业自定义的扩展资料，没有内容时为空对象 {}。"
                        },
                        "nameVerifyStatus": {
                          "type": "number",
                          "description": "实名认证状态，取值以实际返回为准。"
                        },
                        "realName": {
                          "type": "string",
                          "description": "实名认证的真实姓名，未认证时可能为空。"
                        },
                        "vCorpUseStatus": {
                          "type": "number",
                          "description": "企业使用状态标识，取值以实际返回为准，一般无需处理。"
                        },
                        "inviteVid": {
                          "type": "number",
                          "description": "邀请该账号加入企业的成员 ID，没有时可能为 0；以实际返回为准。"
                        },
                        "holidayInfo": {
                          "type": "object",
                          "description": "假期状态信息（账号资料里设置的休假/请假状态）。",
                          "properties": {
                            "holidayStatus": {
                              "type": "number",
                              "description": "假期状态，取值以实际返回为准（未设置时通常为 0）。"
                            },
                            "holidayDesc": {
                              "type": "string",
                              "description": "假期状态的说明文字，未设置时为空字符串。"
                            },
                            "oldHolidayIconIndex": {
                              "type": "number",
                              "description": "旧版假期图标序号，内部字段，无需处理。"
                            },
                            "createTime": {
                              "type": "number",
                              "description": "假期状态的设置时间（时间戳），未设置时为 0。"
                            },
                            "holidayInfoId": {
                              "type": "number",
                              "description": "假期信息记录 ID，内部字段，无需处理。"
                            },
                            "holidayIconIndex": {
                              "type": "number",
                              "description": "假期状态图标序号，内部字段，无需处理。"
                            },
                            "holidayGenerateSrc": {
                              "type": "number",
                              "description": "假期信息来源标识，内部字段，无需处理。"
                            },
                            "holidayStatusNew": {
                              "type": "number",
                              "description": "新版假期状态，取值以实际返回为准。"
                            },
                            "vacationSyncType": {
                              "type": "number",
                              "description": "假期同步方式，内部字段，无需处理。"
                            }
                          }
                        },
                        "xcxStyle": {
                          "type": "number",
                          "description": "内部字段，无需处理。"
                        },
                        "attr2": {
                          "type": "number",
                          "description": "账号属性标志位 2，内部字段，无需处理。"
                        },
                        "tencentInfo": {
                          "type": "object",
                          "description": "扩展信息对象，一般为空对象 {}；内部字段，无需处理。"
                        },
                        "isSyncInnerPosition": {
                          "type": "boolean",
                          "description": "是否同步企业内部职位信息，以实际返回为准。"
                        },
                        "unionId": {
                          "type": "string",
                          "description": "账号的统一身份标识（unionId），可能为空；部分账号才返回。"
                        },
                        "vCode": {
                          "type": "string",
                          "description": "内部字段，无需处理；部分账号才返回。"
                        },
                        "personalWorkType": {
                          "type": "number",
                          "description": "个人/工作身份类型，取值以实际返回为准；部分账号才返回。"
                        },
                        "superiors": {
                          "type": "array",
                          "items": {},
                          "description": "上级成员列表（数组），没有上级时为空数组，元素结构以实际返回为准；部分账号才返回。"
                        },
                        "bizMail": {
                          "type": "string",
                          "description": "企业邮箱地址，未开通时为空；部分账号才返回。"
                        },
                        "attr3": {
                          "type": "number",
                          "description": "账号属性标志位 3，内部字段，无需处理；部分账号才返回。"
                        },
                        "collegeIdentity": {
                          "type": "number",
                          "description": "校园身份类型，取值以实际返回为准；部分账号才返回。"
                        },
                        "mobileAreaCode": {
                          "type": "number",
                          "description": "手机号区号（数字形式），取值以实际返回为准；部分账号才返回。"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {
                    "uin": 1688850000000001,
                    "name": "示例用户",
                    "emailAddr": "user@example.com",
                    "birthday": "2000-01-01 00:00:00",
                    "mobile": "",
                    "phone": "",
                    "job": "",
                    "number": "",
                    "gender": 1,
                    "iconUrl": "https://example.com/avatar.png",
                    "corpId": 1970320000000001,
                    "attr": 0,
                    "dispOrder": 0,
                    "bizUin": 1,
                    "position": "",
                    "alias": "",
                    "mainPartyId": 1688850000000002,
                    "gid": 2251800000000001,
                    "isNameVerified": true,
                    "internationCode": "86",
                    "bindEmailStatus": 1,
                    "englishName": "Example User",
                    "customInfo": {},
                    "nameVerifyStatus": 1,
                    "realName": "示例用户",
                    "vCorpUseStatus": 1000,
                    "inviteVid": 1688850000000003,
                    "holidayInfo": {
                      "holidayStatus": 0,
                      "holidayDesc": "",
                      "oldHolidayIconIndex": 0,
                      "createTime": 0,
                      "holidayInfoId": 0,
                      "holidayIconIndex": 0,
                      "holidayGenerateSrc": 0,
                      "holidayStatusNew": 0,
                      "vacationSyncType": 0
                    },
                    "xcxStyle": 0,
                    "attr2": 0,
                    "tencentInfo": {},
                    "isSyncInnerPosition": true,
                    "unionId": "oXXXXXXXXXXXXXXXXXXXXXXXX",
                    "vCode": "vcXXXXXXXXXXXXXXXX",
                    "personalWorkType": 0,
                    "superiors": [],
                    "bizMail": "user@example.com",
                    "attr3": 0,
                    "collegeIdentity": 0,
                    "mobileAreaCode": 0
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/personal/updateInfo": {
      "post": {
        "tags": [
          "个人"
        ],
        "summary": "更新个人信息",
        "description": "### 接口用途\n用于更新个人信息。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；其他字段说明见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "personal_updateInfo",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "gender": {
                    "type": "integer",
                    "description": "性别：1=男，2=女。",
                    "example": 1
                  },
                  "name": {
                    "type": "string",
                    "description": "姓名。",
                    "example": "示例姓名"
                  },
                  "alias": {
                    "type": "string",
                    "description": "别名。",
                    "example": "示例别名"
                  },
                  "phone": {
                    "type": "string",
                    "description": "电话 / 手机号。",
                    "example": "13800138000"
                  },
                  "xcxCorpAddress": {
                    "type": "string",
                    "description": "小程序企业地址。",
                    "example": "示例企业地址"
                  },
                  "email": {
                    "type": "string",
                    "description": "邮箱。",
                    "example": "user@example.com"
                  }
                },
                "required": [
                  "instance_guid",
                  "gender",
                  "name",
                  "alias"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "gender": 1,
                "name": "示例姓名",
                "alias": "示例别名",
                "phone": "13800138000",
                "xcxCorpAddress": "示例企业地址",
                "email": "user@example.com"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {}
                }
              }
            }
          }
        }
      }
    },
    "/api/label/sync": {
      "post": {
        "tags": [
          "标签"
        ],
        "summary": "同步标签（个/企）",
        "description": "### 接口用途\n用于同步标签（个/企）。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；其他字段说明见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。",
        "operationId": "label_sync",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "seq": {
                    "type": "integer",
                    "description": "同步游标。首次同步传 0，获取初始标签数据集；后续分页拉取或增量同步时，传上一次响应返回的最新 seq 值，即可获取更新的标签数据。",
                    "example": 0
                  },
                  "syncType": {
                    "type": "integer",
                    "description": "标签类型：1=企业标签，2=个人标签。",
                    "example": 1
                  }
                },
                "required": [
                  "instance_guid",
                  "seq",
                  "syncType"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "seq": 0,
                "syncType": 1
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "seq": {
                          "type": "number",
                          "description": "分页/增量游标"
                        },
                        "labelItems": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "op": {
                                "type": "number",
                                "description": "标签同步操作类型（新增/更新/删除等）"
                              },
                              "label": {
                                "type": "object",
                                "description": "标签详情对象（id/名称等）"
                              }
                            }
                          },
                          "description": "标签项列表"
                        },
                        "hasNext": {
                          "type": "boolean",
                          "description": "是否还有可拉取的数据：true=存在新的标签数据，可用返回的 seq 继续拉取；false=已无最新标签更新，本次同步完成。"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {
                    "seq": 13028332,
                    "labelItems": [
                      {
                        "op": 3,
                        "label": {
                          "id": "14073752507970987",
                          "name": "示例名称",
                          "dataType": 2,
                          "bDeleted": 0,
                          "labelGroupId": 0,
                          "createTime": 1785201799,
                          "labelType": 1,
                          "businessType": 0,
                          "order": 0,
                          "serviceGroupId": 0
                        }
                      },
                      {
                        "op": 3,
                        "label": {
                          "id": "14073752507970988",
                          "name": "示例名称",
                          "dataType": 1,
                          "bDeleted": 0,
                          "labelGroupId": "14073752507970987",
                          "createTime": 1785201799,
                          "labelType": 1,
                          "businessType": 0,
                          "order": 0,
                          "serviceGroupId": 0
                        }
                      }
                    ],
                    "hasNext": false
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/label/operate": {
      "post": {
        "tags": [
          "标签"
        ],
        "summary": "操作标签/标签组（个/企）",
        "description": "### 接口用途\n用于操作标签/标签组（个/企）。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；其他字段说明见参数表。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，业务数据在 data 字段。\n\n### 注意事项\n- op=1（新增）：label.id 与 label.createTime 传 0。\n- op=2（删除）：需完整提交 label 对象，其余参数无需单独更新；个人标签组不在删除范围。\n- op=3（修改）：仅可变更 label.name，其余 label 字段按原值完整提交。\n- 个人标签不支持添加标签组，仅企业标签组支持该操作。",
        "operationId": "label_operate",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "opScene": {
                    "type": "integer",
                    "description": "操作场景：新增企业标签组时传 1，其余操作固定传 2。",
                    "example": 2
                  },
                  "labelType": {
                    "type": "integer",
                    "description": "标签类型：1=企业标签，2=个人标签。",
                    "example": 1
                  },
                  "operItems": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "op": {
                          "type": "number",
                          "description": "操作类型：1=新增、2=删除、3=修改。"
                        },
                        "label": {
                          "type": "object",
                          "description": "标签对象；子字段见下。其余属性（bDeleted/businessType/order/serviceGroupId 等）op=3 修改时按原值提交。",
                          "properties": {
                            "id": {
                              "type": "string",
                              "description": "标签 ID；新增（op=1）时传 0。"
                            },
                            "name": {
                              "type": "string",
                              "description": "标签名称；op=3 修改时仅此字段可变更。"
                            },
                            "labelType": {
                              "type": "number",
                              "description": "标签类型：1=企业标签，2=个人标签。"
                            },
                            "dataType": {
                              "type": "number",
                              "description": "数据类型：1=标签，2=标签组（与 labelType 组合：labelType=1+dataType=1 企业标签、1+2 企业标签组、2+1 个人标签、2+2 个人标签组）。"
                            },
                            "labelGroupId": {
                              "type": "string",
                              "description": "标签组 ID；新增标签组时传 0。"
                            },
                            "createTime": {
                              "type": "number",
                              "description": "创建时间（秒级时间戳）；新增（op=1）时传 0。"
                            }
                          }
                        }
                      },
                      "required": [
                        "op",
                        "label"
                      ]
                    },
                    "description": "操作项列表；每个元素是一次标签操作（可批量），字段见下。"
                  }
                },
                "required": [
                  "instance_guid",
                  "opScene",
                  "labelType",
                  "operItems"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "opScene": 2,
                "labelType": 1,
                "operItems": [
                  {
                    "op": 2,
                    "label": {
                      "id": "14073752025997020",
                      "name": "星云API",
                      "dataType": 1,
                      "bDeleted": 0,
                      "labelGroupId": "14073751126007793",
                      "createTime": 1787907966,
                      "labelType": 1,
                      "businessType": 0,
                      "order": 0,
                      "serviceGroupId": 0
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {}
                }
              }
            }
          }
        }
      }
    },
    "/api/collection/add": {
      "post": {
        "tags": [
          "收藏"
        ],
        "summary": "添加收藏",
        "description": "### 接口用途\n用于添加收藏（把一条消息加入收藏）。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；请求体为要收藏的目标消息对象，字段取自「同步消息」或回调中的消息记录。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功。",
        "operationId": "collection_add",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "id": {
                    "type": "number",
                    "description": "消息 ID。"
                  },
                  "syncKey": {
                    "type": "number",
                    "description": "消息同步键。"
                  },
                  "messageType": {
                    "type": "number",
                    "description": "消息类型。"
                  },
                  "fromUserId": {
                    "type": "number",
                    "description": "发送者用户 ID。"
                  },
                  "toUserId": {
                    "type": "number",
                    "description": "接收者用户 ID。"
                  },
                  "roomId": {
                    "type": "number",
                    "description": "会话 / 群 ID。"
                  },
                  "contentType": {
                    "type": "number",
                    "description": "内容类型码（见「回调结构说明」类型总览）。"
                  },
                  "sendTime": {
                    "type": "number",
                    "description": "发送时间（秒级时间戳）。"
                  },
                  "appInfo": {
                    "type": "string",
                    "description": "消息附加信息（以实际返回为准）。"
                  },
                  "senderName": {
                    "type": "string",
                    "description": "发送者名称。"
                  },
                  "content": {
                    "type": "object",
                    "description": "消息内容对象（媒体 / 文件描述）。",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "媒体文件 ID。"
                      },
                      "name": {
                        "type": "string",
                        "description": "文件名。"
                      },
                      "url": {
                        "type": "string",
                        "description": "文件直链（可留空）。"
                      },
                      "size": {
                        "type": "number",
                        "description": "文件大小（字节）。"
                      },
                      "aesKey": {
                        "type": "string",
                        "description": "文件解密密钥（AES）。"
                      },
                      "md5": {
                        "type": "string",
                        "description": "文件 MD5。"
                      }
                    }
                  },
                  "extraData": {
                    "type": "string",
                    "description": "扩展数据（以实际返回为准）。"
                  },
                  "flag": {
                    "type": "number",
                    "description": "标记位（以实际返回为准）。"
                  },
                  "devInfo": {
                    "type": "number",
                    "description": "设备信息（以实际返回为准）。"
                  },
                  "summary": {
                    "type": "string",
                    "description": "摘要说明。"
                  }
                },
                "required": [
                  "instance_guid",
                  "id",
                  "syncKey",
                  "messageType",
                  "fromUserId",
                  "toUserId",
                  "roomId",
                  "contentType",
                  "sendTime",
                  "content"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "id": 1005141,
                "syncKey": 15875656,
                "messageType": 1,
                "fromUserId": 1688850000000000,
                "toUserId": 1688850000000001,
                "roomId": 1970320000000000,
                "contentType": 15,
                "sendTime": 1788325751,
                "appInfo": "<省略>",
                "senderName": "",
                "content": {
                  "id": "<fileId 省略>",
                  "name": "message.txt",
                  "url": "",
                  "size": 14146922,
                  "aesKey": "<省略>",
                  "md5": "<省略>"
                },
                "extraData": "<省略>",
                "flag": 131074,
                "devInfo": 0,
                "summary": "备注 : [message.txt]"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "object",
                          "properties": {
                            "ack": {
                              "type": "object",
                              "description": "收藏结果确认对象。",
                              "properties": {
                                "field1": {
                                  "type": "number",
                                  "description": "确认字段 1（以实际返回为准）。"
                                },
                                "field2": {
                                  "type": "number",
                                  "description": "确认字段 2（以实际返回为准）。"
                                }
                              }
                            }
                          }
                        }
                      },
                      "description": "业务数据。"
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": {
                    "ack": {
                      "field1": 4294967296,
                      "field2": 0
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/collection/sync": {
      "post": {
        "tags": [
          "收藏"
        ],
        "summary": "同步收藏",
        "description": "### 接口用途\n用于同步收藏（增量拉取收藏列表）。\n\n### 请求说明\n请求体使用 JSON 格式。设备相关接口通过 instance_guid 指定设备实例；seq 为增量游标，首次传 0。\n\n### 返回说明\n统一响应信封 {ok, code, message, request_id, data}；code=0 表示成功，data 为收藏列表。",
        "operationId": "collection_sync",
        "security": [
          {
            "NebulaKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instance_guid": {
                    "type": "string",
                    "description": "星云实例标识（inst_xxxx），标识本次操作的账号",
                    "example": "inst_xxxxxxxx"
                  },
                  "seq": {
                    "type": "integer",
                    "description": "同步游标；首次传 0，后续传上次返回的最大 updateSeq 继续增量同步。",
                    "example": 0
                  },
                  "limit": {
                    "type": "integer",
                    "description": "单次返回数量上限。",
                    "example": 1000
                  }
                },
                "required": [
                  "instance_guid",
                  "seq",
                  "limit"
                ]
              },
              "example": {
                "instance_guid": "inst_xxxxxxxx",
                "seq": 0,
                "limit": 1000
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "统一响应信封（code=0 为成功）",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "code",
                    "message",
                    "request_id"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "是否成功"
                    },
                    "code": {
                      "type": "integer",
                      "description": "0 = 成功；非 0 见错误码"
                    },
                    "message": {
                      "type": "string",
                      "description": "结果说明"
                    },
                    "request_id": {
                      "type": "string",
                      "description": "请求追踪 ID（nb_ 前缀），排查问题时提供"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "number",
                                "description": "收藏项 ID。"
                              },
                              "businessId": {
                                "type": "number",
                                "description": "业务 ID。"
                              },
                              "itemFlag": {
                                "type": "number",
                                "description": "收藏项标记（以实际返回为准）。"
                              },
                              "createSeq": {
                                "type": "number",
                                "description": "创建序列号（增量游标）。"
                              },
                              "updateSeq": {
                                "type": "number",
                                "description": "更新序列号（增量游标；下次同步传最大值）。"
                              },
                              "createTime": {
                                "type": "number",
                                "description": "创建时间（秒级时间戳）。"
                              },
                              "updateTime": {
                                "type": "number",
                                "description": "更新时间（秒级时间戳）。"
                              },
                              "appInfo": {
                                "type": "string",
                                "description": "来源应用信息（以实际返回为准）。"
                              },
                              "senderName": {
                                "type": "string",
                                "description": "发送者名称。"
                              },
                              "content": {
                                "type": "object",
                                "description": "收藏内容对象。",
                                "properties": {
                                  "opType": {
                                    "type": "number",
                                    "description": "操作类型（以实际返回为准）。"
                                  },
                                  "data": {
                                    "type": "object",
                                    "description": "收藏的消息内容对象（结构与消息记录一致：发送人/会话/正文/媒体等）。"
                                  },
                                  "favMap": {
                                    "type": "object",
                                    "description": "收藏媒体映射对象。",
                                    "properties": {
                                      "orgMailId": {
                                        "type": "string",
                                        "description": "原始媒体标识。"
                                      },
                                      "newMailId": {
                                        "type": "string",
                                        "description": "转存后媒体标识。"
                                      },
                                      "orgPicUrl": {
                                        "type": "string",
                                        "description": "原图地址。"
                                      },
                                      "newPicUrl": {
                                        "type": "string",
                                        "description": "转存后图片地址。"
                                      },
                                      "msgContentType": {
                                        "type": "number",
                                        "description": "消息内容类型（以实际返回为准）。"
                                      },
                                      "saveRet": {
                                        "type": "number",
                                        "description": "转存结果（以实际返回为准）。"
                                      },
                                      "collectionPicType": {
                                        "type": "number",
                                        "description": "收藏图片类型（以实际返回为准）。"
                                      },
                                      "coverPicUrl": {
                                        "type": "string",
                                        "description": "封面图地址。"
                                      },
                                      "emotionPiCmd5": {
                                        "type": "string",
                                        "description": "表情图 MD5。"
                                      },
                                      "wxauthKey": {
                                        "type": "string",
                                        "description": "下载鉴权票据。"
                                      },
                                      "newFileSize": {
                                        "type": "number",
                                        "description": "转存后文件大小（字节）。"
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      },
                      "description": "收藏列表（每个元素一条收藏）。"
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "code": 0,
                  "message": "success",
                  "request_id": "nb_xxxxxxxx",
                  "data": [
                    {
                      "id": 2,
                      "businessId": 10002,
                      "itemFlag": 4,
                      "createSeq": 11195321,
                      "updateSeq": 11195323,
                      "createTime": 1789042048,
                      "updateTime": 1789042048,
                      "appInfo": "<省略>",
                      "senderName": "",
                      "content": {
                        "opType": 1,
                        "data": {
                          "senderId": 1688850000000000,
                          "conversationId": 1970320000000000,
                          "time": 1789042047,
                          "fromType": 0,
                          "contentType": 5,
                          "content": {
                            "id": 0,
                            "syncKey": 15875656,
                            "messageType": 1,
                            "fromUserId": 1688850000000000,
                            "toUserId": 1688850000000001,
                            "roomId": 1970320000000000,
                            "contentType": 15,
                            "sendTime": 1788325751,
                            "appInfo": "<省略>",
                            "senderName": "",
                            "content": {
                              "id": "<fileId 省略>",
                              "name": "message.txt",
                              "url": "",
                              "size": 14146922,
                              "aesKey": "<省略>",
                              "md5": "<省略>"
                            },
                            "extraData": "<省略>",
                            "flag": 131074,
                            "devInfo": 0,
                            "summary": ""
                          },
                          "origMsgIds": 1005141,
                          "filterType": 0,
                          "extraSearchData": {
                            "userBriefInfos": [
                              {
                                "userId": 1688850000000000,
                                "userEngName": ""
                              }
                            ],
                            "convBriefInfos": [
                              {
                                "convId": 1970320000000000,
                                "convName": ""
                              }
                            ],
                            "fullSearchText": [
                              "message.txt"
                            ]
                          },
                          "dataVersion": 3,
                          "senderInfo": {
                            "senderName": ""
                          },
                          "emotionSortTime": 1789042047,
                          "conversationType": 0,
                          "conversationFwId": 0,
                          "mixMsgSubId": null,
                          "mixMsgContent": null
                        },
                        "favMap": {
                          "orgMailId": "<省略>",
                          "newMailId": "<省略>",
                          "orgPicUrl": "",
                          "newPicUrl": "",
                          "msgContentType": 20,
                          "saveRet": 0,
                          "collectionPicType": 0,
                          "coverPicUrl": "",
                          "emotionPiCmd5": "",
                          "thirdEncrypy": 0,
                          "wxauthKey": "",
                          "height": 0,
                          "weight": 0,
                          "newFileSize": 0
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "NebulaKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Nebula-Key",
        "description": "在开发者控制台「API Key」页创建"
      }
    }
  }
}