{
  "openapi": "3.1.0",
  "info": {
    "title": "实时语音开放平台 — SDK 与 SIP",
    "version": "2026.10.31",
    "description": "服务端语音会话与电话控制；音频传输独立接入。国际站语音尚受限，AI 电话媒体当前仅支持控制台出呼试通，最长 120 秒。API 拨号不代表 AI 媒体已接通。应用、PBX 与会议最佳实践见 /developers/voice#best-practices；会议适配器仍是参考方案，不是已实现操作。 接口文本按文本接待套餐计费；语音按语音套餐或已开通的实时语音计价结算。SDK、兼容协议和接口试听均适用。套餐包含对应 Token 消耗，不重复扣费。余额不足拒绝调用；同一幂等键重试不重复计费。"
  },
  "x-yunfu-billing-policy": "接口文本按文本接待套餐计费；语音按语音套餐或已开通的实时语音计价结算。SDK、兼容协议和接口试听均适用。套餐包含对应 Token 消耗，不重复扣费。余额不足拒绝调用；同一幂等键重试不重复计费。",
  "servers": [
    {
      "url": "/"
    }
  ],
  "paths": {
    "/v1/operations/voice-access.read": {
      "get": {
        "operationId": "voice_access_read",
        "summary": "读取语音接入配置",
        "tags": [
          "语音接入"
        ],
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "description": "显式授权操作 voice-access.read。业务查询及正文遵循 /api/voice-external-access 契约。并发版本规则仍适用。",
        "x-yunfu-source": "/api/voice-external-access",
        "x-yunfu-field-index": {
          "method": "GET",
          "query": [
            "agentId"
          ],
          "body": [],
          "form": [],
          "actions": [],
          "permissions": [
            "agent"
          ],
          "errorStatuses": [
            403
          ],
          "jsonLimits": []
        },
        "x-yunfu-permissions": [
          "agent"
        ],
        "x-yunfu-billable": false,
        "x-yunfu-example-status": "contract",
        "x-yunfu-field-index-scope": "共享后台路由索引，不是本操作的参数或必填字段清单。",
        "parameters": [
          {
            "name": "agentId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "description": "授权企业内的智能体 ID。"
          }
        ],
        "responses": {
          "400": {
            "description": "参数错误 · 按当前操作检查字段、格式和固定参数；修正后再提交。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "401": {
            "description": "凭据失效 · 检查密钥是否过期、撤销或轮换，以及站点是否匹配。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "402": {
            "description": "余额或额度不足 · 核对余额、套餐和接待额度；恢复可用后再确认是否提交。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "403": {
            "description": "权限或来源不符 · 核对操作授权、账号权限和请求来源；不要关闭认证绕过。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "404": {
            "description": "资源不存在或不可见 · 核对路径、资源编号和所属企业。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "405": {
            "description": "请求方法不符 · 按该操作文档和 Allow 响应头使用 GET 或 POST。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Allow": {
                "schema": {
                  "type": "string",
                  "const": "GET"
                }
              }
            }
          },
          "408": {
            "description": "读取请求超时 · 检查网络和正文上传；写入重试前核对原结果并保留原幂等键。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "409": {
            "description": "版本、幂等或状态冲突 · 先读回业务结果；有 Retry-After 时等待。修改配置先合并最新版本，结果未知不换键重做。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "请求过大 · 按接口限制缩小请求或使用该业务提供的分批导入入口。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "415": {
            "description": "正文格式不支持 · 开放网关 POST 使用 Content-Type: application/json 和有效 JSON 正文。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "422": {
            "description": "业务条件不满足 · 按错误提示补齐配置或业务状态；不要重复提交相同无效请求。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "429": {
            "description": "调用限流 · 按 Retry-After 等待，降低调用频率；写入重试仍使用原幂等键。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Limit": {
                "description": "密钥每分钟调用限额。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "当前分钟窗口剩余次数；为 0 时下一次调用返回 429。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Reset": {
                "description": "距当前分钟窗口结束的秒数。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              }
            }
          },
          "503": {
            "description": "依赖不可用 · 稍后核对服务状态；只读可有界重试，写入先确认原结果。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "2XX": {
            "description": "业务接口响应，可能为 JSON、文件、SSE 或 NDJSON。按实际 Content-Type 解析，NDJSON 不是 SSE。202 为受理，不代表异步完成。",
            "headers": {
              "X-Request-Id": {
                "description": "有 X-Request-Id 时，由有权的管理员在请求日志核对；提前拒绝的请求可能没有编号，此时记录时间、操作路径和状态。/v1/capabilities 的编号不进入业务日志。错误正文按接口解析，不依赖错误文案自动重试。",
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "description": "为 true 时表示返回的是同一幂等键首次请求的缓存结果，未再次执行。",
                "schema": {
                  "type": "string",
                  "const": "true"
                }
              },
              "X-RateLimit-Limit": {
                "description": "密钥每分钟调用限额。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "当前分钟窗口剩余次数；为 0 时下一次调用返回 429。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Reset": {
                "description": "距当前分钟窗口结束的秒数。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              }
            }
          },
          "default": {
            "description": "其他错误按具体接口响应解析；不保证包含请求编号或统一错误代码。"
          }
        }
      }
    },
    "/v1/operations/voice-access.save": {
      "post": {
        "operationId": "voice_access_save",
        "summary": "语音接入配置 · 保存",
        "tags": [
          "语音接入"
        ],
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "description": "显式授权操作 voice-access.save。业务查询及正文遵循 /api/voice-external-access 契约。action 固定为 save。并发版本规则仍适用。",
        "x-yunfu-source": "/api/voice-external-access",
        "x-yunfu-field-index": {
          "method": "POST",
          "query": [
            "agentId"
          ],
          "body": [
            "action",
            "agentVersion",
            "allowedIps",
            "enabled",
            "mode",
            "revision",
            "rotate",
            "transport"
          ],
          "form": [],
          "actions": [
            "disable"
          ],
          "permissions": [
            "agent",
            "applications",
            "channels"
          ],
          "errorStatuses": [
            400,
            403,
            409,
            422
          ],
          "jsonLimits": [
            20000
          ]
        },
        "x-yunfu-action": "save",
        "x-yunfu-permissions": [
          "agent",
          "channels",
          "applications"
        ],
        "x-yunfu-billable": false,
        "x-yunfu-example-status": "contract",
        "x-yunfu-field-index-scope": "共享后台路由索引，不是本操作的参数或必填字段清单。",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 100,
              "pattern": "^[-\\w.:]+$"
            }
          },
          {
            "name": "agentId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "description": "授权企业内的智能体 ID。"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "revision",
                  "mode"
                ],
                "properties": {
                  "revision": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "sip",
                      "ip"
                    ]
                  },
                  "transport": {
                    "type": "string",
                    "enum": [
                      "tls",
                      "tcp",
                      "udp"
                    ]
                  },
                  "enabled": {
                    "type": "boolean"
                  },
                  "allowedIps": {
                    "type": "array",
                    "maxItems": 32,
                    "items": {
                      "type": "string"
                    }
                  },
                  "rotate": {
                    "type": "boolean"
                  },
                  "agentVersion": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1,
                    "description": "Released version for SIP. Use null to follow the latest release."
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "400": {
            "description": "参数错误 · 按当前操作检查字段、格式和固定参数；修正后再提交。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "401": {
            "description": "凭据失效 · 检查密钥是否过期、撤销或轮换，以及站点是否匹配。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "402": {
            "description": "余额或额度不足 · 核对余额、套餐和接待额度；恢复可用后再确认是否提交。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "403": {
            "description": "权限或来源不符 · 核对操作授权、账号权限和请求来源；不要关闭认证绕过。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "404": {
            "description": "资源不存在或不可见 · 核对路径、资源编号和所属企业。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "405": {
            "description": "请求方法不符 · 按该操作文档和 Allow 响应头使用 GET 或 POST。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Allow": {
                "schema": {
                  "type": "string",
                  "const": "POST"
                }
              }
            }
          },
          "408": {
            "description": "读取请求超时 · 检查网络和正文上传；写入重试前核对原结果并保留原幂等键。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "409": {
            "description": "版本、幂等或状态冲突 · 先读回业务结果；有 Retry-After 时等待。修改配置先合并最新版本，结果未知不换键重做。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "请求过大 · 按接口限制缩小请求或使用该业务提供的分批导入入口。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "415": {
            "description": "正文格式不支持 · 开放网关 POST 使用 Content-Type: application/json 和有效 JSON 正文。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "422": {
            "description": "业务条件不满足 · 按错误提示补齐配置或业务状态；不要重复提交相同无效请求。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "429": {
            "description": "调用限流 · 按 Retry-After 等待，降低调用频率；写入重试仍使用原幂等键。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Limit": {
                "description": "密钥每分钟调用限额。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "当前分钟窗口剩余次数；为 0 时下一次调用返回 429。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Reset": {
                "description": "距当前分钟窗口结束的秒数。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              }
            }
          },
          "503": {
            "description": "依赖不可用 · 稍后核对服务状态；只读可有界重试，写入先确认原结果。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "2XX": {
            "description": "业务接口响应，可能为 JSON、文件、SSE 或 NDJSON。按实际 Content-Type 解析，NDJSON 不是 SSE。202 为受理，不代表异步完成。",
            "headers": {
              "X-Request-Id": {
                "description": "有 X-Request-Id 时，由有权的管理员在请求日志核对；提前拒绝的请求可能没有编号，此时记录时间、操作路径和状态。/v1/capabilities 的编号不进入业务日志。错误正文按接口解析，不依赖错误文案自动重试。",
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "description": "为 true 时表示返回的是同一幂等键首次请求的缓存结果，未再次执行。",
                "schema": {
                  "type": "string",
                  "const": "true"
                }
              },
              "X-RateLimit-Limit": {
                "description": "密钥每分钟调用限额。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "当前分钟窗口剩余次数；为 0 时下一次调用返回 429。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Reset": {
                "description": "距当前分钟窗口结束的秒数。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              }
            }
          },
          "default": {
            "description": "其他错误按具体接口响应解析；不保证包含请求编号或统一错误代码。"
          }
        }
      }
    },
    "/v1/operations/voice-access.disable": {
      "post": {
        "operationId": "voice_access_disable",
        "summary": "语音接入配置 · 停用",
        "tags": [
          "语音接入"
        ],
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "description": "显式授权操作 voice-access.disable。业务查询及正文遵循 /api/voice-external-access 契约。action 固定为 disable。并发版本规则仍适用。",
        "x-yunfu-source": "/api/voice-external-access",
        "x-yunfu-field-index": {
          "method": "POST",
          "query": [
            "agentId"
          ],
          "body": [
            "action",
            "agentVersion",
            "allowedIps",
            "enabled",
            "mode",
            "revision",
            "rotate",
            "transport"
          ],
          "form": [],
          "actions": [
            "disable"
          ],
          "permissions": [
            "agent",
            "applications",
            "channels"
          ],
          "errorStatuses": [
            400,
            403,
            409,
            422
          ],
          "jsonLimits": [
            20000
          ]
        },
        "x-yunfu-action": "disable",
        "x-yunfu-permissions": [
          "agent",
          "channels",
          "applications"
        ],
        "x-yunfu-billable": false,
        "x-yunfu-example-status": "contract",
        "x-yunfu-field-index-scope": "共享后台路由索引，不是本操作的参数或必填字段清单。",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 100,
              "pattern": "^[-\\w.:]+$"
            }
          },
          {
            "name": "agentId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "description": "授权企业内的智能体 ID。"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "revision"
                ],
                "properties": {
                  "revision": {
                    "type": "integer",
                    "minimum": 1
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "400": {
            "description": "参数错误 · 按当前操作检查字段、格式和固定参数；修正后再提交。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "401": {
            "description": "凭据失效 · 检查密钥是否过期、撤销或轮换，以及站点是否匹配。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "402": {
            "description": "余额或额度不足 · 核对余额、套餐和接待额度；恢复可用后再确认是否提交。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "403": {
            "description": "权限或来源不符 · 核对操作授权、账号权限和请求来源；不要关闭认证绕过。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "404": {
            "description": "资源不存在或不可见 · 核对路径、资源编号和所属企业。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "405": {
            "description": "请求方法不符 · 按该操作文档和 Allow 响应头使用 GET 或 POST。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Allow": {
                "schema": {
                  "type": "string",
                  "const": "POST"
                }
              }
            }
          },
          "408": {
            "description": "读取请求超时 · 检查网络和正文上传；写入重试前核对原结果并保留原幂等键。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "409": {
            "description": "版本、幂等或状态冲突 · 先读回业务结果；有 Retry-After 时等待。修改配置先合并最新版本，结果未知不换键重做。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "请求过大 · 按接口限制缩小请求或使用该业务提供的分批导入入口。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "415": {
            "description": "正文格式不支持 · 开放网关 POST 使用 Content-Type: application/json 和有效 JSON 正文。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "422": {
            "description": "业务条件不满足 · 按错误提示补齐配置或业务状态；不要重复提交相同无效请求。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "429": {
            "description": "调用限流 · 按 Retry-After 等待，降低调用频率；写入重试仍使用原幂等键。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Limit": {
                "description": "密钥每分钟调用限额。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "当前分钟窗口剩余次数；为 0 时下一次调用返回 429。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Reset": {
                "description": "距当前分钟窗口结束的秒数。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              }
            }
          },
          "503": {
            "description": "依赖不可用 · 稍后核对服务状态；只读可有界重试，写入先确认原结果。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "2XX": {
            "description": "业务接口响应，可能为 JSON、文件、SSE 或 NDJSON。按实际 Content-Type 解析，NDJSON 不是 SSE。202 为受理，不代表异步完成。",
            "headers": {
              "X-Request-Id": {
                "description": "有 X-Request-Id 时，由有权的管理员在请求日志核对；提前拒绝的请求可能没有编号，此时记录时间、操作路径和状态。/v1/capabilities 的编号不进入业务日志。错误正文按接口解析，不依赖错误文案自动重试。",
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "description": "为 true 时表示返回的是同一幂等键首次请求的缓存结果，未再次执行。",
                "schema": {
                  "type": "string",
                  "const": "true"
                }
              },
              "X-RateLimit-Limit": {
                "description": "密钥每分钟调用限额。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "当前分钟窗口剩余次数；为 0 时下一次调用返回 429。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Reset": {
                "description": "距当前分钟窗口结束的秒数。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              }
            }
          },
          "default": {
            "description": "其他错误按具体接口响应解析；不保证包含请求编号或统一错误代码。"
          }
        }
      }
    },
    "/v1/operations/voice-records.read": {
      "get": {
        "operationId": "voice_records_read",
        "summary": "读取语音记录",
        "tags": [
          "互动与记录"
        ],
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "description": "显式授权操作 voice-records.read。业务查询及正文遵循 /api/voice-records 契约。并发版本规则仍适用。",
        "x-yunfu-source": "/api/voice-records",
        "x-yunfu-field-index": {
          "method": "GET",
          "query": [],
          "body": [],
          "form": [],
          "actions": [],
          "permissions": [],
          "errorStatuses": [],
          "jsonLimits": []
        },
        "x-yunfu-permissions": [
          "service"
        ],
        "x-yunfu-billable": false,
        "x-yunfu-example-status": "contract",
        "x-yunfu-field-index-scope": "共享后台路由索引，不是本操作的参数或必填字段清单。",
        "parameters": [
          {
            "in": "query",
            "name": "scope",
            "schema": {
              "type": "string"
            },
            "description": "记录范围，默认 all；演练记录和正式服务分别归类。",
            "example": "all"
          },
          {
            "in": "query",
            "name": "page",
            "schema": {
              "type": "integer"
            },
            "description": "从 1 开始，最大 10000。",
            "example": "1"
          },
          {
            "in": "query",
            "name": "pageSize",
            "schema": {
              "type": "integer"
            },
            "description": "1–100；默认值见接口说明。",
            "example": "10"
          },
          {
            "in": "query",
            "name": "inputKind",
            "schema": {
              "type": "string"
            },
            "description": "默认 all。",
            "example": "all"
          },
          {
            "in": "query",
            "name": "status",
            "schema": {
              "type": "string"
            },
            "description": "默认 all。",
            "example": "all"
          },
          {
            "in": "query",
            "name": "mode",
            "schema": {
              "type": "string"
            },
            "description": "默认 all。",
            "example": "all"
          },
          {
            "in": "query",
            "name": "sort",
            "schema": {
              "type": "string"
            },
            "description": "默认 newest；排序依据见各接口说明。",
            "example": "newest"
          },
          {
            "in": "query",
            "name": "query",
            "schema": {
              "type": "string"
            },
            "description": "搜索关键词，最多 200 字符；字段覆盖范围见各接口说明。"
          },
          {
            "in": "query",
            "name": "agentId",
            "schema": {
              "type": "string"
            },
            "description": "智能体 ID，最多 100 字符。"
          },
          {
            "in": "query",
            "name": "conversationId",
            "schema": {
              "type": "string"
            },
            "description": "关联对话 ID，最多 100 字符；使用时另外要求 service 权限及该对话可见。"
          },
          {
            "in": "query",
            "name": "sessionIds",
            "schema": {
              "type": "string"
            },
            "description": "仅 action=export 时使用，导出所选通话。最多 100 个唯一 ID，仍受当前筛选和访问权限限制，不能与 sessionId 同传。"
          },
          {
            "in": "query",
            "name": "pagination",
            "schema": {
              "type": "string"
            },
            "description": "默认 offset 兼容旧客户端；大数据列表建议 cursor。"
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            },
            "description": "cursor 模式下一页使用 nextCursor；第一页面省略。绑定当前身份、权限和筛选，不能跨账户复用。"
          }
        ],
        "responses": {
          "400": {
            "description": "参数错误 · 按当前操作检查字段、格式和固定参数；修正后再提交。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "401": {
            "description": "凭据失效 · 检查密钥是否过期、撤销或轮换，以及站点是否匹配。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "402": {
            "description": "余额或额度不足 · 核对余额、套餐和接待额度；恢复可用后再确认是否提交。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "403": {
            "description": "权限或来源不符 · 核对操作授权、账号权限和请求来源；不要关闭认证绕过。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "404": {
            "description": "资源不存在或不可见 · 核对路径、资源编号和所属企业。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "405": {
            "description": "请求方法不符 · 按该操作文档和 Allow 响应头使用 GET 或 POST。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Allow": {
                "schema": {
                  "type": "string",
                  "const": "GET"
                }
              }
            }
          },
          "408": {
            "description": "读取请求超时 · 检查网络和正文上传；写入重试前核对原结果并保留原幂等键。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "409": {
            "description": "版本、幂等或状态冲突 · 先读回业务结果；有 Retry-After 时等待。修改配置先合并最新版本，结果未知不换键重做。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "请求过大 · 按接口限制缩小请求或使用该业务提供的分批导入入口。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "415": {
            "description": "正文格式不支持 · 开放网关 POST 使用 Content-Type: application/json 和有效 JSON 正文。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "422": {
            "description": "业务条件不满足 · 按错误提示补齐配置或业务状态；不要重复提交相同无效请求。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "429": {
            "description": "调用限流 · 按 Retry-After 等待，降低调用频率；写入重试仍使用原幂等键。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Limit": {
                "description": "密钥每分钟调用限额。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "当前分钟窗口剩余次数；为 0 时下一次调用返回 429。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Reset": {
                "description": "距当前分钟窗口结束的秒数。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              }
            }
          },
          "503": {
            "description": "依赖不可用 · 稍后核对服务状态；只读可有界重试，写入先确认原结果。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "2XX": {
            "description": "业务接口响应，可能为 JSON、文件、SSE 或 NDJSON。按实际 Content-Type 解析，NDJSON 不是 SSE。202 为受理，不代表异步完成。",
            "headers": {
              "X-Request-Id": {
                "description": "有 X-Request-Id 时，由有权的管理员在请求日志核对；提前拒绝的请求可能没有编号，此时记录时间、操作路径和状态。/v1/capabilities 的编号不进入业务日志。错误正文按接口解析，不依赖错误文案自动重试。",
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "description": "为 true 时表示返回的是同一幂等键首次请求的缓存结果，未再次执行。",
                "schema": {
                  "type": "string",
                  "const": "true"
                }
              },
              "X-RateLimit-Limit": {
                "description": "密钥每分钟调用限额。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "当前分钟窗口剩余次数；为 0 时下一次调用返回 429。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Reset": {
                "description": "距当前分钟窗口结束的秒数。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              }
            }
          },
          "default": {
            "description": "其他错误按具体接口响应解析；不保证包含请求编号或统一错误代码。"
          }
        }
      }
    },
    "/v1/operations/voice.read": {
      "get": {
        "operationId": "voice_read",
        "summary": "读取实时语音",
        "tags": [
          "互动与记录"
        ],
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "description": "显式授权操作 voice.read。业务查询及正文遵循 /api/voice 契约。并发版本规则仍适用。",
        "x-yunfu-source": "/api/voice",
        "x-yunfu-field-index": {
          "method": "GET",
          "query": [],
          "body": [],
          "form": [],
          "actions": [],
          "permissions": [],
          "errorStatuses": [],
          "jsonLimits": []
        },
        "x-yunfu-permissions": [
          "agent"
        ],
        "x-yunfu-billable": false,
        "x-yunfu-example-status": "read",
        "x-yunfu-field-index-scope": "共享后台路由索引，不是本操作的参数或必填字段清单。",
        "parameters": [
          {
            "name": "sessionId",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "description": "只读查询本人媒体连接状态，不续租、不返回凭据。"
          },
          {
            "name": "check",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "billing"
              ]
            },
            "description": "不传时检查资源；billing 检查费用准入。"
          },
          {
            "name": "mode",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "pipeline",
                "realtime"
              ],
              "default": "pipeline"
            },
            "description": "配合 check=billing：pipeline 检查分钟包，realtime 检查钱包。"
          },
          {
            "name": "resourceId",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "description": "配合 realtime 计费检查所选端到端资源。"
          }
        ],
        "responses": {
          "400": {
            "description": "参数错误 · 按当前操作检查字段、格式和固定参数；修正后再提交。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "401": {
            "description": "凭据失效 · 检查密钥是否过期、撤销或轮换，以及站点是否匹配。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "402": {
            "description": "余额或额度不足 · 核对余额、套餐和接待额度；恢复可用后再确认是否提交。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "403": {
            "description": "权限或来源不符 · 核对操作授权、账号权限和请求来源；不要关闭认证绕过。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "404": {
            "description": "资源不存在或不可见 · 核对路径、资源编号和所属企业。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "405": {
            "description": "请求方法不符 · 按该操作文档和 Allow 响应头使用 GET 或 POST。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Allow": {
                "schema": {
                  "type": "string",
                  "const": "GET"
                }
              }
            }
          },
          "408": {
            "description": "读取请求超时 · 检查网络和正文上传；写入重试前核对原结果并保留原幂等键。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "409": {
            "description": "版本、幂等或状态冲突 · 先读回业务结果；有 Retry-After 时等待。修改配置先合并最新版本，结果未知不换键重做。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "请求过大 · 按接口限制缩小请求或使用该业务提供的分批导入入口。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "415": {
            "description": "正文格式不支持 · 开放网关 POST 使用 Content-Type: application/json 和有效 JSON 正文。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "422": {
            "description": "业务条件不满足 · 按错误提示补齐配置或业务状态；不要重复提交相同无效请求。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "429": {
            "description": "调用限流 · 按 Retry-After 等待，降低调用频率；写入重试仍使用原幂等键。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Limit": {
                "description": "密钥每分钟调用限额。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "当前分钟窗口剩余次数；为 0 时下一次调用返回 429。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Reset": {
                "description": "距当前分钟窗口结束的秒数。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              }
            }
          },
          "503": {
            "description": "依赖不可用 · 稍后核对服务状态；只读可有界重试，写入先确认原结果。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "2XX": {
            "description": "业务接口响应，可能为 JSON、文件、SSE 或 NDJSON。按实际 Content-Type 解析，NDJSON 不是 SSE。202 为受理，不代表异步完成。",
            "headers": {
              "X-Request-Id": {
                "description": "有 X-Request-Id 时，由有权的管理员在请求日志核对；提前拒绝的请求可能没有编号，此时记录时间、操作路径和状态。/v1/capabilities 的编号不进入业务日志。错误正文按接口解析，不依赖错误文案自动重试。",
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "description": "为 true 时表示返回的是同一幂等键首次请求的缓存结果，未再次执行。",
                "schema": {
                  "type": "string",
                  "const": "true"
                }
              },
              "X-RateLimit-Limit": {
                "description": "密钥每分钟调用限额。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "当前分钟窗口剩余次数；为 0 时下一次调用返回 429。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Reset": {
                "description": "距当前分钟窗口结束的秒数。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              }
            }
          },
          "default": {
            "description": "其他错误按具体接口响应解析；不保证包含请求编号或统一错误代码。"
          }
        }
      }
    },
    "/v1/operations/voice.start": {
      "post": {
        "operationId": "voice_start",
        "summary": "实时语音 · 启动",
        "tags": [
          "互动与记录"
        ],
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "description": "显式授权操作 voice.start。业务查询及正文遵循 /api/voice 契约。action 固定为 start。并发版本规则仍适用。",
        "x-yunfu-source": "/api/voice",
        "x-yunfu-field-index": {
          "method": "POST",
          "query": [],
          "body": [
            "action",
            "asyncCapabilities",
            "audioCodec",
            "channelId",
            "conversationId",
            "customerId",
            "deviceAddress",
            "mediaProtocol",
            "mode",
            "phone",
            "previewVoiceId",
            "sdpOffer",
            "workflowId"
          ],
          "form": [],
          "actions": [
            "PCMA",
            "PCMU",
            "async",
            "cancel-human",
            "cancel-human-request",
            "confirm-human",
            "end",
            "end-human",
            "handoff",
            "join-human",
            "lease",
            "pageContext",
            "prepareGreeting",
            "preview",
            "realtime-transport",
            "start",
            "takeover-human",
            "task-command",
            "turn"
          ],
          "permissions": [],
          "errorStatuses": [
            400,
            403,
            422
          ],
          "jsonLimits": [
            100000
          ]
        },
        "x-yunfu-action": "start",
        "x-yunfu-permissions": [
          "agent",
          "service",
          "channels"
        ],
        "x-yunfu-billable": true,
        "x-yunfu-example-status": "contract",
        "x-yunfu-field-index-scope": "共享后台路由索引，不是本操作的参数或必填字段清单。",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 100,
              "pattern": "^[-\\w.:]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "agentId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "default": "default"
                  },
                  "channelId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "entryId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "workflowId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "workflowVersion": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "browserOrigin": {
                    "type": "string",
                    "format": "uri",
                    "description": "渠道入口允许列表中的准确 HTTPS 或本地来源，仅限 API Key 调用。"
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "draft",
                      "published"
                    ],
                    "description": "兼容协议仅使用已发布版本，省略时选发布版；普通 HTTP 调用绑定渠道时选发布版，否则选草稿；SDK 默认传发布版。"
                  },
                  "conversationId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "sdpOffer": {
                    "type": "string"
                  },
                  "audioCodec": {
                    "type": "string",
                    "enum": [
                      "pcm16",
                      "opus",
                      "PCMU",
                      "PCMA"
                    ]
                  },
                  "audioContainer": {
                    "type": "string",
                    "enum": [
                      "wav"
                    ]
                  },
                  "preferOpus": {
                    "type": "boolean"
                  },
                  "preferOpusOutput": {
                    "type": "boolean",
                    "description": "Optional Opus output on native Qwen/Doubao sockets. Requires binary-v1 and a 24 kHz decoder supporting both 20 and 40 ms packets. Confirm outputAudioCodec in start and ready, then play only the event’s samples beginning at skipSamples."
                  },
                  "mediaProtocol": {
                    "type": "string",
                    "enum": [
                      "openai-realtime",
                      "openai-live",
                      "volc-realtime",
                      "volc-dialogue"
                    ],
                    "description": "已授权的服务端 WebSocket 协议，仅用发布版；三段式需 voice.turn 授权及固定回调。Volc JSON 为本站扩展。"
                  }
                },
                "not": {
                  "required": [
                    "channelId",
                    "workflowId"
                  ]
                },
                "allOf": [
                  {
                    "if": {
                      "required": [
                        "mediaProtocol"
                      ]
                    },
                    "then": {
                      "properties": {
                        "mode": {
                          "const": "published",
                          "default": "published"
                        }
                      },
                      "not": {
                        "required": [
                          "sdpOffer"
                        ]
                      }
                    }
                  }
                ],
                "additionalProperties": true
              }
            }
          }
        },
        "responses": {
          "400": {
            "description": "参数错误 · 按当前操作检查字段、格式和固定参数；修正后再提交。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "401": {
            "description": "凭据失效 · 检查密钥是否过期、撤销或轮换，以及站点是否匹配。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "402": {
            "description": "余额或额度不足 · 核对余额、套餐和接待额度；恢复可用后再确认是否提交。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "403": {
            "description": "权限或来源不符 · 核对操作授权、账号权限和请求来源；不要关闭认证绕过。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "404": {
            "description": "资源不存在或不可见 · 核对路径、资源编号和所属企业。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "405": {
            "description": "请求方法不符 · 按该操作文档和 Allow 响应头使用 GET 或 POST。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Allow": {
                "schema": {
                  "type": "string",
                  "const": "POST"
                }
              }
            }
          },
          "408": {
            "description": "读取请求超时 · 检查网络和正文上传；写入重试前核对原结果并保留原幂等键。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "409": {
            "description": "版本、幂等或状态冲突 · 先读回业务结果；有 Retry-After 时等待。修改配置先合并最新版本，结果未知不换键重做。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "请求过大 · 按接口限制缩小请求或使用该业务提供的分批导入入口。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "415": {
            "description": "正文格式不支持 · 开放网关 POST 使用 Content-Type: application/json 和有效 JSON 正文。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "422": {
            "description": "业务条件不满足 · 按错误提示补齐配置或业务状态；不要重复提交相同无效请求。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "429": {
            "description": "调用限流 · 按 Retry-After 等待，降低调用频率；写入重试仍使用原幂等键。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Limit": {
                "description": "密钥每分钟调用限额。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "当前分钟窗口剩余次数；为 0 时下一次调用返回 429。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Reset": {
                "description": "距当前分钟窗口结束的秒数。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              }
            }
          },
          "503": {
            "description": "依赖不可用 · 稍后核对服务状态；只读可有界重试，写入先确认原结果。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "2XX": {
            "description": "业务接口响应，可能为 JSON、文件、SSE 或 NDJSON。按实际 Content-Type 解析，NDJSON 不是 SSE。202 为受理，不代表异步完成。",
            "headers": {
              "X-Request-Id": {
                "description": "有 X-Request-Id 时，由有权的管理员在请求日志核对；提前拒绝的请求可能没有编号，此时记录时间、操作路径和状态。/v1/capabilities 的编号不进入业务日志。错误正文按接口解析，不依赖错误文案自动重试。",
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "description": "为 true 时表示返回的是同一幂等键首次请求的缓存结果，未再次执行。",
                "schema": {
                  "type": "string",
                  "const": "true"
                }
              },
              "X-RateLimit-Limit": {
                "description": "密钥每分钟调用限额。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "当前分钟窗口剩余次数；为 0 时下一次调用返回 429。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Reset": {
                "description": "距当前分钟窗口结束的秒数。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              }
            }
          },
          "default": {
            "description": "其他错误按具体接口响应解析；不保证包含请求编号或统一错误代码。"
          }
        }
      }
    },
    "/v1/operations/voice.realtime-transport": {
      "post": {
        "operationId": "voice_realtime_transport",
        "summary": "实时语音 · 建立实时连接",
        "tags": [
          "互动与记录"
        ],
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "description": "显式授权操作 voice.realtime-transport。业务查询及正文遵循 /api/voice 契约。action 固定为 realtime-transport。并发版本规则仍适用。",
        "x-yunfu-source": "/api/voice",
        "x-yunfu-field-index": {
          "method": "POST",
          "query": [],
          "body": [
            "action",
            "asyncCapabilities",
            "audioCodec",
            "channelId",
            "conversationId",
            "customerId",
            "deviceAddress",
            "mediaProtocol",
            "mode",
            "phone",
            "previewVoiceId",
            "sdpOffer",
            "workflowId"
          ],
          "form": [],
          "actions": [
            "PCMA",
            "PCMU",
            "async",
            "cancel-human",
            "cancel-human-request",
            "confirm-human",
            "end",
            "end-human",
            "handoff",
            "join-human",
            "lease",
            "pageContext",
            "prepareGreeting",
            "preview",
            "realtime-transport",
            "start",
            "takeover-human",
            "task-command",
            "turn"
          ],
          "permissions": [],
          "errorStatuses": [
            400,
            403,
            422
          ],
          "jsonLimits": [
            100000
          ]
        },
        "x-yunfu-action": "realtime-transport",
        "x-yunfu-permissions": [
          "agent",
          "service",
          "channels"
        ],
        "x-yunfu-billable": false,
        "x-yunfu-example-status": "skeleton",
        "x-yunfu-field-index-scope": "共享后台路由索引，不是本操作的参数或必填字段清单。",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 100,
              "pattern": "^[-\\w.:]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "action": {
                    "const": "realtime-transport"
                  }
                },
                "additionalProperties": true
              }
            }
          }
        },
        "responses": {
          "400": {
            "description": "参数错误 · 按当前操作检查字段、格式和固定参数；修正后再提交。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "401": {
            "description": "凭据失效 · 检查密钥是否过期、撤销或轮换，以及站点是否匹配。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "402": {
            "description": "余额或额度不足 · 核对余额、套餐和接待额度；恢复可用后再确认是否提交。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "403": {
            "description": "权限或来源不符 · 核对操作授权、账号权限和请求来源；不要关闭认证绕过。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "404": {
            "description": "资源不存在或不可见 · 核对路径、资源编号和所属企业。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "405": {
            "description": "请求方法不符 · 按该操作文档和 Allow 响应头使用 GET 或 POST。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Allow": {
                "schema": {
                  "type": "string",
                  "const": "POST"
                }
              }
            }
          },
          "408": {
            "description": "读取请求超时 · 检查网络和正文上传；写入重试前核对原结果并保留原幂等键。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "409": {
            "description": "版本、幂等或状态冲突 · 先读回业务结果；有 Retry-After 时等待。修改配置先合并最新版本，结果未知不换键重做。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "请求过大 · 按接口限制缩小请求或使用该业务提供的分批导入入口。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "415": {
            "description": "正文格式不支持 · 开放网关 POST 使用 Content-Type: application/json 和有效 JSON 正文。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "422": {
            "description": "业务条件不满足 · 按错误提示补齐配置或业务状态；不要重复提交相同无效请求。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "429": {
            "description": "调用限流 · 按 Retry-After 等待，降低调用频率；写入重试仍使用原幂等键。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Limit": {
                "description": "密钥每分钟调用限额。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "当前分钟窗口剩余次数；为 0 时下一次调用返回 429。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Reset": {
                "description": "距当前分钟窗口结束的秒数。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              }
            }
          },
          "503": {
            "description": "依赖不可用 · 稍后核对服务状态；只读可有界重试，写入先确认原结果。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "2XX": {
            "description": "业务接口响应，可能为 JSON、文件、SSE 或 NDJSON。按实际 Content-Type 解析，NDJSON 不是 SSE。202 为受理，不代表异步完成。",
            "headers": {
              "X-Request-Id": {
                "description": "有 X-Request-Id 时，由有权的管理员在请求日志核对；提前拒绝的请求可能没有编号，此时记录时间、操作路径和状态。/v1/capabilities 的编号不进入业务日志。错误正文按接口解析，不依赖错误文案自动重试。",
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "description": "为 true 时表示返回的是同一幂等键首次请求的缓存结果，未再次执行。",
                "schema": {
                  "type": "string",
                  "const": "true"
                }
              },
              "X-RateLimit-Limit": {
                "description": "密钥每分钟调用限额。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "当前分钟窗口剩余次数；为 0 时下一次调用返回 429。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Reset": {
                "description": "距当前分钟窗口结束的秒数。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              }
            }
          },
          "default": {
            "description": "其他错误按具体接口响应解析；不保证包含请求编号或统一错误代码。"
          }
        }
      }
    },
    "/v1/operations/voice.end": {
      "post": {
        "operationId": "voice_end",
        "summary": "实时语音 · 结束",
        "tags": [
          "互动与记录"
        ],
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "description": "显式授权操作 voice.end。业务查询及正文遵循 /api/voice 契约。action 固定为 end。并发版本规则仍适用。",
        "x-yunfu-source": "/api/voice",
        "x-yunfu-field-index": {
          "method": "POST",
          "query": [],
          "body": [
            "action",
            "asyncCapabilities",
            "audioCodec",
            "channelId",
            "conversationId",
            "customerId",
            "deviceAddress",
            "mediaProtocol",
            "mode",
            "phone",
            "previewVoiceId",
            "sdpOffer",
            "workflowId"
          ],
          "form": [],
          "actions": [
            "PCMA",
            "PCMU",
            "async",
            "cancel-human",
            "cancel-human-request",
            "confirm-human",
            "end",
            "end-human",
            "handoff",
            "join-human",
            "lease",
            "pageContext",
            "prepareGreeting",
            "preview",
            "realtime-transport",
            "start",
            "takeover-human",
            "task-command",
            "turn"
          ],
          "permissions": [],
          "errorStatuses": [
            400,
            403,
            422
          ],
          "jsonLimits": [
            100000
          ]
        },
        "x-yunfu-action": "end",
        "x-yunfu-permissions": [
          "agent",
          "service",
          "channels"
        ],
        "x-yunfu-billable": false,
        "x-yunfu-example-status": "skeleton",
        "x-yunfu-field-index-scope": "共享后台路由索引，不是本操作的参数或必填字段清单。",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 100,
              "pattern": "^[-\\w.:]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "sessionId"
                ],
                "properties": {
                  "sessionId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  }
                },
                "additionalProperties": true
              }
            }
          }
        },
        "responses": {
          "400": {
            "description": "参数错误 · 按当前操作检查字段、格式和固定参数；修正后再提交。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "401": {
            "description": "凭据失效 · 检查密钥是否过期、撤销或轮换，以及站点是否匹配。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "402": {
            "description": "余额或额度不足 · 核对余额、套餐和接待额度；恢复可用后再确认是否提交。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "403": {
            "description": "权限或来源不符 · 核对操作授权、账号权限和请求来源；不要关闭认证绕过。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "404": {
            "description": "资源不存在或不可见 · 核对路径、资源编号和所属企业。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "405": {
            "description": "请求方法不符 · 按该操作文档和 Allow 响应头使用 GET 或 POST。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Allow": {
                "schema": {
                  "type": "string",
                  "const": "POST"
                }
              }
            }
          },
          "408": {
            "description": "读取请求超时 · 检查网络和正文上传；写入重试前核对原结果并保留原幂等键。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "409": {
            "description": "版本、幂等或状态冲突 · 先读回业务结果；有 Retry-After 时等待。修改配置先合并最新版本，结果未知不换键重做。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "请求过大 · 按接口限制缩小请求或使用该业务提供的分批导入入口。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "415": {
            "description": "正文格式不支持 · 开放网关 POST 使用 Content-Type: application/json 和有效 JSON 正文。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "422": {
            "description": "业务条件不满足 · 按错误提示补齐配置或业务状态；不要重复提交相同无效请求。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "429": {
            "description": "调用限流 · 按 Retry-After 等待，降低调用频率；写入重试仍使用原幂等键。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Limit": {
                "description": "密钥每分钟调用限额。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "当前分钟窗口剩余次数；为 0 时下一次调用返回 429。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Reset": {
                "description": "距当前分钟窗口结束的秒数。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              }
            }
          },
          "503": {
            "description": "依赖不可用 · 稍后核对服务状态；只读可有界重试，写入先确认原结果。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "2XX": {
            "description": "业务接口响应，可能为 JSON、文件、SSE 或 NDJSON。按实际 Content-Type 解析，NDJSON 不是 SSE。202 为受理，不代表异步完成。",
            "headers": {
              "X-Request-Id": {
                "description": "有 X-Request-Id 时，由有权的管理员在请求日志核对；提前拒绝的请求可能没有编号，此时记录时间、操作路径和状态。/v1/capabilities 的编号不进入业务日志。错误正文按接口解析，不依赖错误文案自动重试。",
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "description": "为 true 时表示返回的是同一幂等键首次请求的缓存结果，未再次执行。",
                "schema": {
                  "type": "string",
                  "const": "true"
                }
              },
              "X-RateLimit-Limit": {
                "description": "密钥每分钟调用限额。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "当前分钟窗口剩余次数；为 0 时下一次调用返回 429。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Reset": {
                "description": "距当前分钟窗口结束的秒数。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              }
            }
          },
          "default": {
            "description": "其他错误按具体接口响应解析；不保证包含请求编号或统一错误代码。"
          }
        }
      }
    },
    "/v1/operations/voice.turn": {
      "post": {
        "operationId": "voice_turn",
        "summary": "实时语音 · 发送一轮语音",
        "tags": [
          "互动与记录"
        ],
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "description": "显式授权操作 voice.turn。业务查询及正文遵循 /api/voice 契约。action 固定为 turn。并发版本规则仍适用。",
        "x-yunfu-source": "/api/voice",
        "x-yunfu-field-index": {
          "method": "POST",
          "query": [],
          "body": [
            "action",
            "asyncCapabilities",
            "audioCodec",
            "channelId",
            "conversationId",
            "customerId",
            "deviceAddress",
            "mediaProtocol",
            "mode",
            "phone",
            "previewVoiceId",
            "sdpOffer",
            "workflowId"
          ],
          "form": [],
          "actions": [
            "PCMA",
            "PCMU",
            "async",
            "cancel-human",
            "cancel-human-request",
            "confirm-human",
            "end",
            "end-human",
            "handoff",
            "join-human",
            "lease",
            "pageContext",
            "prepareGreeting",
            "preview",
            "realtime-transport",
            "start",
            "takeover-human",
            "task-command",
            "turn"
          ],
          "permissions": [],
          "errorStatuses": [
            400,
            403,
            422
          ],
          "jsonLimits": [
            100000
          ]
        },
        "x-yunfu-action": "turn",
        "x-yunfu-permissions": [
          "agent",
          "service",
          "channels"
        ],
        "x-yunfu-billable": true,
        "x-yunfu-example-status": "skeleton",
        "x-yunfu-field-index-scope": "共享后台路由索引，不是本操作的参数或必填字段清单。",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 100,
              "pattern": "^[-\\w.:]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "action": {
                    "const": "turn"
                  }
                },
                "additionalProperties": true
              }
            }
          }
        },
        "responses": {
          "400": {
            "description": "参数错误 · 按当前操作检查字段、格式和固定参数；修正后再提交。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "401": {
            "description": "凭据失效 · 检查密钥是否过期、撤销或轮换，以及站点是否匹配。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "402": {
            "description": "余额或额度不足 · 核对余额、套餐和接待额度；恢复可用后再确认是否提交。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "403": {
            "description": "权限或来源不符 · 核对操作授权、账号权限和请求来源；不要关闭认证绕过。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "404": {
            "description": "资源不存在或不可见 · 核对路径、资源编号和所属企业。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "405": {
            "description": "请求方法不符 · 按该操作文档和 Allow 响应头使用 GET 或 POST。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Allow": {
                "schema": {
                  "type": "string",
                  "const": "POST"
                }
              }
            }
          },
          "408": {
            "description": "读取请求超时 · 检查网络和正文上传；写入重试前核对原结果并保留原幂等键。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "409": {
            "description": "版本、幂等或状态冲突 · 先读回业务结果；有 Retry-After 时等待。修改配置先合并最新版本，结果未知不换键重做。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "请求过大 · 按接口限制缩小请求或使用该业务提供的分批导入入口。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "415": {
            "description": "正文格式不支持 · 开放网关 POST 使用 Content-Type: application/json 和有效 JSON 正文。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "422": {
            "description": "业务条件不满足 · 按错误提示补齐配置或业务状态；不要重复提交相同无效请求。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "429": {
            "description": "调用限流 · 按 Retry-After 等待，降低调用频率；写入重试仍使用原幂等键。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Limit": {
                "description": "密钥每分钟调用限额。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "当前分钟窗口剩余次数；为 0 时下一次调用返回 429。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Reset": {
                "description": "距当前分钟窗口结束的秒数。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              }
            }
          },
          "503": {
            "description": "依赖不可用 · 稍后核对服务状态；只读可有界重试，写入先确认原结果。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "2XX": {
            "description": "业务接口响应，可能为 JSON、文件、SSE 或 NDJSON。按实际 Content-Type 解析，NDJSON 不是 SSE。202 为受理，不代表异步完成。",
            "headers": {
              "X-Request-Id": {
                "description": "有 X-Request-Id 时，由有权的管理员在请求日志核对；提前拒绝的请求可能没有编号，此时记录时间、操作路径和状态。/v1/capabilities 的编号不进入业务日志。错误正文按接口解析，不依赖错误文案自动重试。",
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "description": "为 true 时表示返回的是同一幂等键首次请求的缓存结果，未再次执行。",
                "schema": {
                  "type": "string",
                  "const": "true"
                }
              },
              "X-RateLimit-Limit": {
                "description": "密钥每分钟调用限额。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "当前分钟窗口剩余次数；为 0 时下一次调用返回 429。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Reset": {
                "description": "距当前分钟窗口结束的秒数。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              }
            }
          },
          "default": {
            "description": "其他错误按具体接口响应解析；不保证包含请求编号或统一错误代码。"
          }
        }
      }
    },
    "/v1/operations/voice.lease": {
      "post": {
        "operationId": "voice_lease",
        "summary": "实时语音 · 续期",
        "tags": [
          "互动与记录"
        ],
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "description": "按原智能体、渠道或工作流绑定续租 Go pipeline / LiveKit 会话；不适用于 provider-realtime 或 OpenAI 会话。",
        "x-yunfu-source": "/api/voice",
        "x-yunfu-field-index": {
          "method": "POST",
          "query": [],
          "body": [
            "action",
            "asyncCapabilities",
            "audioCodec",
            "channelId",
            "conversationId",
            "customerId",
            "deviceAddress",
            "mediaProtocol",
            "mode",
            "phone",
            "previewVoiceId",
            "sdpOffer",
            "workflowId"
          ],
          "form": [],
          "actions": [
            "PCMA",
            "PCMU",
            "async",
            "cancel-human",
            "cancel-human-request",
            "confirm-human",
            "end",
            "end-human",
            "handoff",
            "join-human",
            "lease",
            "pageContext",
            "prepareGreeting",
            "preview",
            "realtime-transport",
            "start",
            "takeover-human",
            "task-command",
            "turn"
          ],
          "permissions": [],
          "errorStatuses": [
            400,
            403,
            422
          ],
          "jsonLimits": [
            100000
          ]
        },
        "x-yunfu-action": "lease",
        "x-yunfu-permissions": [
          "agent",
          "service",
          "channels"
        ],
        "x-yunfu-billable": false,
        "x-yunfu-example-status": "skeleton",
        "x-yunfu-field-index-scope": "共享后台路由索引，不是本操作的参数或必填字段清单。",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 100,
              "pattern": "^[-\\w.:]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "sessionId"
                ],
                "properties": {
                  "agentId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "default": "default"
                  },
                  "channelId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "entryId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "workflowId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "workflowVersion": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "sessionId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  }
                },
                "additionalProperties": true
              }
            }
          }
        },
        "responses": {
          "400": {
            "description": "参数错误 · 按当前操作检查字段、格式和固定参数；修正后再提交。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "401": {
            "description": "凭据失效 · 检查密钥是否过期、撤销或轮换，以及站点是否匹配。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "402": {
            "description": "余额或额度不足 · 核对余额、套餐和接待额度；恢复可用后再确认是否提交。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "403": {
            "description": "权限或来源不符 · 核对操作授权、账号权限和请求来源；不要关闭认证绕过。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "404": {
            "description": "资源不存在或不可见 · 核对路径、资源编号和所属企业。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "405": {
            "description": "请求方法不符 · 按该操作文档和 Allow 响应头使用 GET 或 POST。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Allow": {
                "schema": {
                  "type": "string",
                  "const": "POST"
                }
              }
            }
          },
          "408": {
            "description": "读取请求超时 · 检查网络和正文上传；写入重试前核对原结果并保留原幂等键。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "409": {
            "description": "版本、幂等或状态冲突 · 先读回业务结果；有 Retry-After 时等待。修改配置先合并最新版本，结果未知不换键重做。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "请求过大 · 按接口限制缩小请求或使用该业务提供的分批导入入口。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "415": {
            "description": "正文格式不支持 · 开放网关 POST 使用 Content-Type: application/json 和有效 JSON 正文。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "422": {
            "description": "业务条件不满足 · 按错误提示补齐配置或业务状态；不要重复提交相同无效请求。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "429": {
            "description": "调用限流 · 按 Retry-After 等待，降低调用频率；写入重试仍使用原幂等键。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Limit": {
                "description": "密钥每分钟调用限额。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "当前分钟窗口剩余次数；为 0 时下一次调用返回 429。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Reset": {
                "description": "距当前分钟窗口结束的秒数。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              }
            }
          },
          "503": {
            "description": "依赖不可用 · 稍后核对服务状态；只读可有界重试，写入先确认原结果。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "2XX": {
            "description": "业务接口响应，可能为 JSON、文件、SSE 或 NDJSON。按实际 Content-Type 解析，NDJSON 不是 SSE。202 为受理，不代表异步完成。",
            "headers": {
              "X-Request-Id": {
                "description": "有 X-Request-Id 时，由有权的管理员在请求日志核对；提前拒绝的请求可能没有编号，此时记录时间、操作路径和状态。/v1/capabilities 的编号不进入业务日志。错误正文按接口解析，不依赖错误文案自动重试。",
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "description": "为 true 时表示返回的是同一幂等键首次请求的缓存结果，未再次执行。",
                "schema": {
                  "type": "string",
                  "const": "true"
                }
              },
              "X-RateLimit-Limit": {
                "description": "密钥每分钟调用限额。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "当前分钟窗口剩余次数；为 0 时下一次调用返回 429。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Reset": {
                "description": "距当前分钟窗口结束的秒数。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              }
            }
          },
          "default": {
            "description": "其他错误按具体接口响应解析；不保证包含请求编号或统一错误代码。"
          }
        }
      }
    },
    "/v1/operations/telephony.read": {
      "get": {
        "operationId": "telephony_read",
        "summary": "读取电话线路",
        "tags": [
          "电话与应用"
        ],
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "description": "显式授权操作 telephony.read。业务查询及正文遵循 /api/telephony 契约。并发版本规则仍适用。",
        "x-yunfu-source": "/api/telephony",
        "x-yunfu-field-index": {
          "method": "GET",
          "query": [
            "batchId",
            "business",
            "historyDays",
            "lineId",
            "recordSelection",
            "revision",
            "scope",
            "view"
          ],
          "body": [],
          "form": [],
          "actions": [],
          "permissions": [],
          "errorStatuses": [
            400,
            403
          ],
          "jsonLimits": []
        },
        "x-yunfu-permissions": [
          "applications"
        ],
        "x-yunfu-billable": false,
        "x-yunfu-fixed-query": {
          "view": ""
        },
        "x-yunfu-example-status": "contract",
        "x-yunfu-field-index-scope": "共享后台路由索引，不是本操作的参数或必填字段清单。",
        "parameters": [
          {
            "in": "query",
            "name": "view",
            "schema": {
              "type": "string",
              "const": ""
            },
            "description": "网关固定值，不可覆盖。",
            "example": "",
            "required": false
          },
          {
            "in": "query",
            "name": "scope",
            "schema": {
              "type": "string"
            },
            "description": "平台资源模式；不返回企业通话正文。"
          },
          {
            "in": "query",
            "name": "historyDays",
            "schema": {
              "type": "string"
            },
            "description": "线路运营统计范围，默认近 30 天。"
          }
        ],
        "responses": {
          "400": {
            "description": "参数错误 · 按当前操作检查字段、格式和固定参数；修正后再提交。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "401": {
            "description": "凭据失效 · 检查密钥是否过期、撤销或轮换，以及站点是否匹配。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "402": {
            "description": "余额或额度不足 · 核对余额、套餐和接待额度；恢复可用后再确认是否提交。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "403": {
            "description": "权限或来源不符 · 核对操作授权、账号权限和请求来源；不要关闭认证绕过。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "404": {
            "description": "资源不存在或不可见 · 核对路径、资源编号和所属企业。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "405": {
            "description": "请求方法不符 · 按该操作文档和 Allow 响应头使用 GET 或 POST。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Allow": {
                "schema": {
                  "type": "string",
                  "const": "GET"
                }
              }
            }
          },
          "408": {
            "description": "读取请求超时 · 检查网络和正文上传；写入重试前核对原结果并保留原幂等键。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "409": {
            "description": "版本、幂等或状态冲突 · 先读回业务结果；有 Retry-After 时等待。修改配置先合并最新版本，结果未知不换键重做。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "请求过大 · 按接口限制缩小请求或使用该业务提供的分批导入入口。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "415": {
            "description": "正文格式不支持 · 开放网关 POST 使用 Content-Type: application/json 和有效 JSON 正文。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "422": {
            "description": "业务条件不满足 · 按错误提示补齐配置或业务状态；不要重复提交相同无效请求。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "429": {
            "description": "调用限流 · 按 Retry-After 等待，降低调用频率；写入重试仍使用原幂等键。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Limit": {
                "description": "密钥每分钟调用限额。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "当前分钟窗口剩余次数；为 0 时下一次调用返回 429。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Reset": {
                "description": "距当前分钟窗口结束的秒数。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              }
            }
          },
          "503": {
            "description": "依赖不可用 · 稍后核对服务状态；只读可有界重试，写入先确认原结果。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "2XX": {
            "description": "业务接口响应，可能为 JSON、文件、SSE 或 NDJSON。按实际 Content-Type 解析，NDJSON 不是 SSE。202 为受理，不代表异步完成。",
            "headers": {
              "X-Request-Id": {
                "description": "有 X-Request-Id 时，由有权的管理员在请求日志核对；提前拒绝的请求可能没有编号，此时记录时间、操作路径和状态。/v1/capabilities 的编号不进入业务日志。错误正文按接口解析，不依赖错误文案自动重试。",
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "description": "为 true 时表示返回的是同一幂等键首次请求的缓存结果，未再次执行。",
                "schema": {
                  "type": "string",
                  "const": "true"
                }
              },
              "X-RateLimit-Limit": {
                "description": "密钥每分钟调用限额。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "当前分钟窗口剩余次数；为 0 时下一次调用返回 429。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Reset": {
                "description": "距当前分钟窗口结束的秒数。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              }
            }
          },
          "default": {
            "description": "其他错误按具体接口响应解析；不保证包含请求编号或统一错误代码。"
          }
        }
      }
    },
    "/v1/operations/telephony.saveLine": {
      "post": {
        "operationId": "telephony_saveLine",
        "summary": "电话线路 · 保存线路",
        "tags": [
          "电话与应用"
        ],
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "description": "显式授权操作 telephony.saveLine。业务查询及正文遵循 /api/telephony 契约。action 固定为 saveLine。并发版本规则仍适用。",
        "x-yunfu-source": "/api/telephony",
        "x-yunfu-field-index": {
          "method": "POST",
          "query": [
            "scope"
          ],
          "body": [
            "action",
            "channel",
            "confirmed",
            "id",
            "line",
            "revision"
          ],
          "form": [],
          "actions": [
            "allocate",
            "deleteLine",
            "dial",
            "hangup",
            "inspect",
            "quickRegister",
            "register",
            "registrationStatus",
            "resumeRegistration",
            "saveChannel",
            "saveLine",
            "testLine",
            "unregister"
          ],
          "permissions": [],
          "errorStatuses": [
            400,
            403
          ],
          "jsonLimits": [
            20000
          ]
        },
        "x-yunfu-action": "saveLine",
        "x-yunfu-permissions": [
          "applications"
        ],
        "x-yunfu-billable": false,
        "x-yunfu-example-status": "contract",
        "x-yunfu-field-index-scope": "共享后台路由索引，不是本操作的参数或必填字段清单。",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 100,
              "pattern": "^[-\\w.:]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "action": {
                    "const": "saveLine"
                  }
                },
                "additionalProperties": true
              },
              "example": {
                "action": "saveLine",
                "line": {
                  "name": "运营商 IP 线路",
                  "registrationMode": "ip",
                  "host": "203.0.113.10",
                  "port": 5060,
                  "transport": "udp",
                  "username": "",
                  "password": "",
                  "allowedIps": [
                    "203.0.113.10/32"
                  ],
                  "number": "+8613800000000",
                  "inbound": true,
                  "outbound": true,
                  "enabled": true,
                  "maxConcurrent": 5,
                  "audioMode": "auto"
                }
              }
            }
          }
        },
        "responses": {
          "400": {
            "description": "参数错误 · 按当前操作检查字段、格式和固定参数；修正后再提交。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "401": {
            "description": "凭据失效 · 检查密钥是否过期、撤销或轮换，以及站点是否匹配。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "402": {
            "description": "余额或额度不足 · 核对余额、套餐和接待额度；恢复可用后再确认是否提交。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "403": {
            "description": "权限或来源不符 · 核对操作授权、账号权限和请求来源；不要关闭认证绕过。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "404": {
            "description": "资源不存在或不可见 · 核对路径、资源编号和所属企业。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "405": {
            "description": "请求方法不符 · 按该操作文档和 Allow 响应头使用 GET 或 POST。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Allow": {
                "schema": {
                  "type": "string",
                  "const": "POST"
                }
              }
            }
          },
          "408": {
            "description": "读取请求超时 · 检查网络和正文上传；写入重试前核对原结果并保留原幂等键。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "409": {
            "description": "版本、幂等或状态冲突 · 先读回业务结果；有 Retry-After 时等待。修改配置先合并最新版本，结果未知不换键重做。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "请求过大 · 按接口限制缩小请求或使用该业务提供的分批导入入口。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "415": {
            "description": "正文格式不支持 · 开放网关 POST 使用 Content-Type: application/json 和有效 JSON 正文。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "422": {
            "description": "业务条件不满足 · 按错误提示补齐配置或业务状态；不要重复提交相同无效请求。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "429": {
            "description": "调用限流 · 按 Retry-After 等待，降低调用频率；写入重试仍使用原幂等键。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Limit": {
                "description": "密钥每分钟调用限额。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "当前分钟窗口剩余次数；为 0 时下一次调用返回 429。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Reset": {
                "description": "距当前分钟窗口结束的秒数。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              }
            }
          },
          "503": {
            "description": "依赖不可用 · 稍后核对服务状态；只读可有界重试，写入先确认原结果。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "2XX": {
            "description": "业务接口响应，可能为 JSON、文件、SSE 或 NDJSON。按实际 Content-Type 解析，NDJSON 不是 SSE。202 为受理，不代表异步完成。",
            "headers": {
              "X-Request-Id": {
                "description": "有 X-Request-Id 时，由有权的管理员在请求日志核对；提前拒绝的请求可能没有编号，此时记录时间、操作路径和状态。/v1/capabilities 的编号不进入业务日志。错误正文按接口解析，不依赖错误文案自动重试。",
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "description": "为 true 时表示返回的是同一幂等键首次请求的缓存结果，未再次执行。",
                "schema": {
                  "type": "string",
                  "const": "true"
                }
              },
              "X-RateLimit-Limit": {
                "description": "密钥每分钟调用限额。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "当前分钟窗口剩余次数；为 0 时下一次调用返回 429。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Reset": {
                "description": "距当前分钟窗口结束的秒数。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              }
            }
          },
          "default": {
            "description": "其他错误按具体接口响应解析；不保证包含请求编号或统一错误代码。"
          }
        }
      }
    },
    "/v1/operations/telephony.register": {
      "post": {
        "operationId": "telephony_register",
        "summary": "电话线路 · 注册线路",
        "tags": [
          "电话与应用"
        ],
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "description": "显式授权操作 telephony.register。业务查询及正文遵循 /api/telephony 契约。action 固定为 register。并发版本规则仍适用。",
        "x-yunfu-source": "/api/telephony",
        "x-yunfu-field-index": {
          "method": "POST",
          "query": [
            "scope"
          ],
          "body": [
            "action",
            "channel",
            "confirmed",
            "id",
            "line",
            "revision"
          ],
          "form": [],
          "actions": [
            "allocate",
            "deleteLine",
            "dial",
            "hangup",
            "inspect",
            "quickRegister",
            "register",
            "registrationStatus",
            "resumeRegistration",
            "saveChannel",
            "saveLine",
            "testLine",
            "unregister"
          ],
          "permissions": [],
          "errorStatuses": [
            400,
            403
          ],
          "jsonLimits": [
            20000
          ]
        },
        "x-yunfu-action": "register",
        "x-yunfu-permissions": [
          "applications"
        ],
        "x-yunfu-billable": false,
        "x-yunfu-example-status": "skeleton",
        "x-yunfu-field-index-scope": "共享后台路由索引，不是本操作的参数或必填字段清单。",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 100,
              "pattern": "^[-\\w.:]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "action": {
                    "const": "register"
                  }
                },
                "additionalProperties": true
              }
            }
          }
        },
        "responses": {
          "400": {
            "description": "参数错误 · 按当前操作检查字段、格式和固定参数；修正后再提交。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "401": {
            "description": "凭据失效 · 检查密钥是否过期、撤销或轮换，以及站点是否匹配。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "402": {
            "description": "余额或额度不足 · 核对余额、套餐和接待额度；恢复可用后再确认是否提交。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "403": {
            "description": "权限或来源不符 · 核对操作授权、账号权限和请求来源；不要关闭认证绕过。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "404": {
            "description": "资源不存在或不可见 · 核对路径、资源编号和所属企业。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "405": {
            "description": "请求方法不符 · 按该操作文档和 Allow 响应头使用 GET 或 POST。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Allow": {
                "schema": {
                  "type": "string",
                  "const": "POST"
                }
              }
            }
          },
          "408": {
            "description": "读取请求超时 · 检查网络和正文上传；写入重试前核对原结果并保留原幂等键。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "409": {
            "description": "版本、幂等或状态冲突 · 先读回业务结果；有 Retry-After 时等待。修改配置先合并最新版本，结果未知不换键重做。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "请求过大 · 按接口限制缩小请求或使用该业务提供的分批导入入口。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "415": {
            "description": "正文格式不支持 · 开放网关 POST 使用 Content-Type: application/json 和有效 JSON 正文。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "422": {
            "description": "业务条件不满足 · 按错误提示补齐配置或业务状态；不要重复提交相同无效请求。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "429": {
            "description": "调用限流 · 按 Retry-After 等待，降低调用频率；写入重试仍使用原幂等键。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Limit": {
                "description": "密钥每分钟调用限额。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "当前分钟窗口剩余次数；为 0 时下一次调用返回 429。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Reset": {
                "description": "距当前分钟窗口结束的秒数。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              }
            }
          },
          "503": {
            "description": "依赖不可用 · 稍后核对服务状态；只读可有界重试，写入先确认原结果。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "2XX": {
            "description": "业务接口响应，可能为 JSON、文件、SSE 或 NDJSON。按实际 Content-Type 解析，NDJSON 不是 SSE。202 为受理，不代表异步完成。",
            "headers": {
              "X-Request-Id": {
                "description": "有 X-Request-Id 时，由有权的管理员在请求日志核对；提前拒绝的请求可能没有编号，此时记录时间、操作路径和状态。/v1/capabilities 的编号不进入业务日志。错误正文按接口解析，不依赖错误文案自动重试。",
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "description": "为 true 时表示返回的是同一幂等键首次请求的缓存结果，未再次执行。",
                "schema": {
                  "type": "string",
                  "const": "true"
                }
              },
              "X-RateLimit-Limit": {
                "description": "密钥每分钟调用限额。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "当前分钟窗口剩余次数；为 0 时下一次调用返回 429。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Reset": {
                "description": "距当前分钟窗口结束的秒数。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              }
            }
          },
          "default": {
            "description": "其他错误按具体接口响应解析；不保证包含请求编号或统一错误代码。"
          }
        }
      }
    },
    "/v1/operations/telephony.testLine": {
      "post": {
        "operationId": "telephony_testLine",
        "summary": "电话线路 · 测试线路",
        "tags": [
          "电话与应用"
        ],
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "description": "显式授权操作 telephony.testLine。业务查询及正文遵循 /api/telephony 契约。action 固定为 testLine。并发版本规则仍适用。",
        "x-yunfu-source": "/api/telephony",
        "x-yunfu-field-index": {
          "method": "POST",
          "query": [
            "scope"
          ],
          "body": [
            "action",
            "channel",
            "confirmed",
            "id",
            "line",
            "revision"
          ],
          "form": [],
          "actions": [
            "allocate",
            "deleteLine",
            "dial",
            "hangup",
            "inspect",
            "quickRegister",
            "register",
            "registrationStatus",
            "resumeRegistration",
            "saveChannel",
            "saveLine",
            "testLine",
            "unregister"
          ],
          "permissions": [],
          "errorStatuses": [
            400,
            403
          ],
          "jsonLimits": [
            20000
          ]
        },
        "x-yunfu-action": "testLine",
        "x-yunfu-permissions": [
          "applications"
        ],
        "x-yunfu-billable": false,
        "x-yunfu-example-status": "contract",
        "x-yunfu-field-index-scope": "共享后台路由索引，不是本操作的参数或必填字段清单。",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 100,
              "pattern": "^[-\\w.:]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "action": {
                    "const": "testLine"
                  }
                },
                "additionalProperties": true
              },
              "example": {
                "action": "testLine",
                "id": "38b39cfa-b9ee-4ea4-b4ea-063e9be5a413",
                "revision": 1
              }
            }
          }
        },
        "responses": {
          "400": {
            "description": "参数错误 · 按当前操作检查字段、格式和固定参数；修正后再提交。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "401": {
            "description": "凭据失效 · 检查密钥是否过期、撤销或轮换，以及站点是否匹配。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "402": {
            "description": "余额或额度不足 · 核对余额、套餐和接待额度；恢复可用后再确认是否提交。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "403": {
            "description": "权限或来源不符 · 核对操作授权、账号权限和请求来源；不要关闭认证绕过。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "404": {
            "description": "资源不存在或不可见 · 核对路径、资源编号和所属企业。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "405": {
            "description": "请求方法不符 · 按该操作文档和 Allow 响应头使用 GET 或 POST。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Allow": {
                "schema": {
                  "type": "string",
                  "const": "POST"
                }
              }
            }
          },
          "408": {
            "description": "读取请求超时 · 检查网络和正文上传；写入重试前核对原结果并保留原幂等键。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "409": {
            "description": "版本、幂等或状态冲突 · 先读回业务结果；有 Retry-After 时等待。修改配置先合并最新版本，结果未知不换键重做。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "请求过大 · 按接口限制缩小请求或使用该业务提供的分批导入入口。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "415": {
            "description": "正文格式不支持 · 开放网关 POST 使用 Content-Type: application/json 和有效 JSON 正文。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "422": {
            "description": "业务条件不满足 · 按错误提示补齐配置或业务状态；不要重复提交相同无效请求。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "429": {
            "description": "调用限流 · 按 Retry-After 等待，降低调用频率；写入重试仍使用原幂等键。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Limit": {
                "description": "密钥每分钟调用限额。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "当前分钟窗口剩余次数；为 0 时下一次调用返回 429。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Reset": {
                "description": "距当前分钟窗口结束的秒数。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              }
            }
          },
          "503": {
            "description": "依赖不可用 · 稍后核对服务状态；只读可有界重试，写入先确认原结果。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "2XX": {
            "description": "业务接口响应，可能为 JSON、文件、SSE 或 NDJSON。按实际 Content-Type 解析，NDJSON 不是 SSE。202 为受理，不代表异步完成。",
            "headers": {
              "X-Request-Id": {
                "description": "有 X-Request-Id 时，由有权的管理员在请求日志核对；提前拒绝的请求可能没有编号，此时记录时间、操作路径和状态。/v1/capabilities 的编号不进入业务日志。错误正文按接口解析，不依赖错误文案自动重试。",
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "description": "为 true 时表示返回的是同一幂等键首次请求的缓存结果，未再次执行。",
                "schema": {
                  "type": "string",
                  "const": "true"
                }
              },
              "X-RateLimit-Limit": {
                "description": "密钥每分钟调用限额。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "当前分钟窗口剩余次数；为 0 时下一次调用返回 429。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Reset": {
                "description": "距当前分钟窗口结束的秒数。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              }
            }
          },
          "default": {
            "description": "其他错误按具体接口响应解析；不保证包含请求编号或统一错误代码。"
          }
        }
      }
    },
    "/v1/operations/phone-calls.read": {
      "get": {
        "operationId": "phone_calls_read",
        "summary": "读取电话呼入呼出",
        "tags": [
          "电话与应用"
        ],
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "description": "显式授权操作 phone-calls.read。业务查询及正文遵循 /api/telephony 契约。并发版本规则仍适用。",
        "x-yunfu-source": "/api/telephony",
        "x-yunfu-field-index": {
          "method": "GET",
          "query": [
            "batchId",
            "business",
            "historyDays",
            "lineId",
            "recordSelection",
            "revision",
            "scope",
            "view"
          ],
          "body": [],
          "form": [],
          "actions": [],
          "permissions": [],
          "errorStatuses": [
            400,
            403
          ],
          "jsonLimits": []
        },
        "x-yunfu-permissions": [
          "service"
        ],
        "x-yunfu-billable": false,
        "x-yunfu-fixed-query": {
          "view": "calls"
        },
        "x-yunfu-example-status": "contract",
        "x-yunfu-field-index-scope": "共享后台路由索引，不是本操作的参数或必填字段清单。",
        "parameters": [
          {
            "in": "query",
            "name": "view",
            "schema": {
              "type": "string",
              "const": "calls"
            },
            "required": false,
            "description": "网关固定值，不可覆盖。",
            "example": "calls"
          },
          {
            "in": "query",
            "name": "page",
            "schema": {
              "type": "string"
            },
            "description": "",
            "example": "1"
          },
          {
            "in": "query",
            "name": "pageSize",
            "schema": {
              "type": "string"
            },
            "description": "",
            "example": "100"
          },
          {
            "in": "query",
            "name": "compact",
            "schema": {
              "type": "string"
            },
            "description": "移除列表转写正文，messages 返回空数组；完整转写用详情或批量导出。",
            "example": "1"
          },
          {
            "in": "query",
            "name": "qMode",
            "schema": {
              "type": "string"
            },
            "description": "",
            "example": "metadata"
          },
          {
            "in": "query",
            "name": "direction",
            "schema": {
              "type": "string"
            },
            "description": "省略表示两个方向。"
          },
          {
            "in": "query",
            "name": "status",
            "schema": {
              "type": "string"
            },
            "description": "live 包含 queued/ringing/active，finished 包含四个终态；unknown 不属于失败或终态。"
          },
          {
            "in": "query",
            "name": "scope",
            "schema": {
              "type": "string"
            },
            "description": "默认 all；此电话记录接口不返回语音演练记录，test 当前为空。"
          }
        ],
        "responses": {
          "400": {
            "description": "参数错误 · 按当前操作检查字段、格式和固定参数；修正后再提交。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "401": {
            "description": "凭据失效 · 检查密钥是否过期、撤销或轮换，以及站点是否匹配。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "402": {
            "description": "余额或额度不足 · 核对余额、套餐和接待额度；恢复可用后再确认是否提交。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "403": {
            "description": "权限或来源不符 · 核对操作授权、账号权限和请求来源；不要关闭认证绕过。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "404": {
            "description": "资源不存在或不可见 · 核对路径、资源编号和所属企业。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "405": {
            "description": "请求方法不符 · 按该操作文档和 Allow 响应头使用 GET 或 POST。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Allow": {
                "schema": {
                  "type": "string",
                  "const": "GET"
                }
              }
            }
          },
          "408": {
            "description": "读取请求超时 · 检查网络和正文上传；写入重试前核对原结果并保留原幂等键。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "409": {
            "description": "版本、幂等或状态冲突 · 先读回业务结果；有 Retry-After 时等待。修改配置先合并最新版本，结果未知不换键重做。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "请求过大 · 按接口限制缩小请求或使用该业务提供的分批导入入口。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "415": {
            "description": "正文格式不支持 · 开放网关 POST 使用 Content-Type: application/json 和有效 JSON 正文。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "422": {
            "description": "业务条件不满足 · 按错误提示补齐配置或业务状态；不要重复提交相同无效请求。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "429": {
            "description": "调用限流 · 按 Retry-After 等待，降低调用频率；写入重试仍使用原幂等键。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Limit": {
                "description": "密钥每分钟调用限额。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "当前分钟窗口剩余次数；为 0 时下一次调用返回 429。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Reset": {
                "description": "距当前分钟窗口结束的秒数。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              }
            }
          },
          "503": {
            "description": "依赖不可用 · 稍后核对服务状态；只读可有界重试，写入先确认原结果。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "2XX": {
            "description": "业务接口响应，可能为 JSON、文件、SSE 或 NDJSON。按实际 Content-Type 解析，NDJSON 不是 SSE。202 为受理，不代表异步完成。",
            "headers": {
              "X-Request-Id": {
                "description": "有 X-Request-Id 时，由有权的管理员在请求日志核对；提前拒绝的请求可能没有编号，此时记录时间、操作路径和状态。/v1/capabilities 的编号不进入业务日志。错误正文按接口解析，不依赖错误文案自动重试。",
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "description": "为 true 时表示返回的是同一幂等键首次请求的缓存结果，未再次执行。",
                "schema": {
                  "type": "string",
                  "const": "true"
                }
              },
              "X-RateLimit-Limit": {
                "description": "密钥每分钟调用限额。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "当前分钟窗口剩余次数；为 0 时下一次调用返回 429。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Reset": {
                "description": "距当前分钟窗口结束的秒数。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              }
            }
          },
          "default": {
            "description": "其他错误按具体接口响应解析；不保证包含请求编号或统一错误代码。"
          }
        }
      }
    },
    "/v1/operations/phone-calls.dial": {
      "post": {
        "operationId": "phone_calls_dial",
        "summary": "电话呼入呼出 · 拨号",
        "tags": [
          "电话与应用"
        ],
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "description": "显式授权操作 phone-calls.dial。业务查询及正文遵循 /api/telephony 契约。action 固定为 dial。并发版本规则仍适用。",
        "x-yunfu-source": "/api/telephony",
        "x-yunfu-field-index": {
          "method": "POST",
          "query": [
            "scope"
          ],
          "body": [
            "action",
            "channel",
            "confirmed",
            "id",
            "line",
            "revision"
          ],
          "form": [],
          "actions": [
            "allocate",
            "deleteLine",
            "dial",
            "hangup",
            "inspect",
            "quickRegister",
            "register",
            "registrationStatus",
            "resumeRegistration",
            "saveChannel",
            "saveLine",
            "testLine",
            "unregister"
          ],
          "permissions": [],
          "errorStatuses": [
            400,
            403
          ],
          "jsonLimits": [
            20000
          ]
        },
        "x-yunfu-action": "dial",
        "x-yunfu-permissions": [
          "service"
        ],
        "x-yunfu-billable": true,
        "x-yunfu-example-status": "contract",
        "x-yunfu-field-index-scope": "共享后台路由索引，不是本操作的参数或必填字段清单。",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 100,
              "pattern": "^[-\\w.:]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "requestId",
                  "channelId",
                  "to",
                  "confirmed"
                ],
                "properties": {
                  "requestId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "channelId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "to": {
                    "type": "string",
                    "pattern": "^\\+[1-9][0-9]{5,14}$"
                  },
                  "confirmed": {
                    "type": "boolean",
                    "const": true
                  }
                },
                "additionalProperties": true
              }
            }
          }
        },
        "responses": {
          "400": {
            "description": "参数错误 · 按当前操作检查字段、格式和固定参数；修正后再提交。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "401": {
            "description": "凭据失效 · 检查密钥是否过期、撤销或轮换，以及站点是否匹配。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "402": {
            "description": "余额或额度不足 · 核对余额、套餐和接待额度；恢复可用后再确认是否提交。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "403": {
            "description": "权限或来源不符 · 核对操作授权、账号权限和请求来源；不要关闭认证绕过。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "404": {
            "description": "资源不存在或不可见 · 核对路径、资源编号和所属企业。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "405": {
            "description": "请求方法不符 · 按该操作文档和 Allow 响应头使用 GET 或 POST。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Allow": {
                "schema": {
                  "type": "string",
                  "const": "POST"
                }
              }
            }
          },
          "408": {
            "description": "读取请求超时 · 检查网络和正文上传；写入重试前核对原结果并保留原幂等键。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "409": {
            "description": "版本、幂等或状态冲突 · 先读回业务结果；有 Retry-After 时等待。修改配置先合并最新版本，结果未知不换键重做。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "请求过大 · 按接口限制缩小请求或使用该业务提供的分批导入入口。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "415": {
            "description": "正文格式不支持 · 开放网关 POST 使用 Content-Type: application/json 和有效 JSON 正文。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "422": {
            "description": "业务条件不满足 · 按错误提示补齐配置或业务状态；不要重复提交相同无效请求。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "429": {
            "description": "调用限流 · 按 Retry-After 等待，降低调用频率；写入重试仍使用原幂等键。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Limit": {
                "description": "密钥每分钟调用限额。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "当前分钟窗口剩余次数；为 0 时下一次调用返回 429。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Reset": {
                "description": "距当前分钟窗口结束的秒数。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              }
            }
          },
          "503": {
            "description": "依赖不可用 · 稍后核对服务状态；只读可有界重试，写入先确认原结果。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "2XX": {
            "description": "业务接口响应，可能为 JSON、文件、SSE 或 NDJSON。按实际 Content-Type 解析，NDJSON 不是 SSE。202 为受理，不代表异步完成。",
            "headers": {
              "X-Request-Id": {
                "description": "有 X-Request-Id 时，由有权的管理员在请求日志核对；提前拒绝的请求可能没有编号，此时记录时间、操作路径和状态。/v1/capabilities 的编号不进入业务日志。错误正文按接口解析，不依赖错误文案自动重试。",
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "description": "为 true 时表示返回的是同一幂等键首次请求的缓存结果，未再次执行。",
                "schema": {
                  "type": "string",
                  "const": "true"
                }
              },
              "X-RateLimit-Limit": {
                "description": "密钥每分钟调用限额。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "当前分钟窗口剩余次数；为 0 时下一次调用返回 429。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Reset": {
                "description": "距当前分钟窗口结束的秒数。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              }
            }
          },
          "default": {
            "description": "其他错误按具体接口响应解析；不保证包含请求编号或统一错误代码。"
          }
        }
      }
    },
    "/v1/operations/phone-calls.hangup": {
      "post": {
        "operationId": "phone_calls_hangup",
        "summary": "电话呼入呼出 · 挂断",
        "tags": [
          "电话与应用"
        ],
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "description": "按通话 ID 请求挂断。requested=true 仅表示受理；通过 phone-detail.read 核对最终状态。",
        "x-yunfu-source": "/api/telephony",
        "x-yunfu-field-index": {
          "method": "POST",
          "query": [
            "scope"
          ],
          "body": [
            "action",
            "channel",
            "confirmed",
            "id",
            "line",
            "revision"
          ],
          "form": [],
          "actions": [
            "allocate",
            "deleteLine",
            "dial",
            "hangup",
            "inspect",
            "quickRegister",
            "register",
            "registrationStatus",
            "resumeRegistration",
            "saveChannel",
            "saveLine",
            "testLine",
            "unregister"
          ],
          "permissions": [],
          "errorStatuses": [
            400,
            403
          ],
          "jsonLimits": [
            20000
          ]
        },
        "x-yunfu-action": "hangup",
        "x-yunfu-permissions": [
          "service"
        ],
        "x-yunfu-billable": false,
        "x-yunfu-example-status": "contract",
        "x-yunfu-field-index-scope": "共享后台路由索引，不是本操作的参数或必填字段清单。",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 100,
              "pattern": "^[-\\w.:]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "id"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  }
                },
                "additionalProperties": true
              }
            }
          }
        },
        "responses": {
          "400": {
            "description": "参数错误 · 按当前操作检查字段、格式和固定参数；修正后再提交。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "401": {
            "description": "凭据失效 · 检查密钥是否过期、撤销或轮换，以及站点是否匹配。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "402": {
            "description": "余额或额度不足 · 核对余额、套餐和接待额度；恢复可用后再确认是否提交。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "403": {
            "description": "权限或来源不符 · 核对操作授权、账号权限和请求来源；不要关闭认证绕过。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "404": {
            "description": "资源不存在或不可见 · 核对路径、资源编号和所属企业。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "405": {
            "description": "请求方法不符 · 按该操作文档和 Allow 响应头使用 GET 或 POST。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Allow": {
                "schema": {
                  "type": "string",
                  "const": "POST"
                }
              }
            }
          },
          "408": {
            "description": "读取请求超时 · 检查网络和正文上传；写入重试前核对原结果并保留原幂等键。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "409": {
            "description": "版本、幂等或状态冲突 · 先读回业务结果；有 Retry-After 时等待。修改配置先合并最新版本，结果未知不换键重做。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "请求过大 · 按接口限制缩小请求或使用该业务提供的分批导入入口。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "415": {
            "description": "正文格式不支持 · 开放网关 POST 使用 Content-Type: application/json 和有效 JSON 正文。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "422": {
            "description": "业务条件不满足 · 按错误提示补齐配置或业务状态；不要重复提交相同无效请求。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "429": {
            "description": "调用限流 · 按 Retry-After 等待，降低调用频率；写入重试仍使用原幂等键。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Limit": {
                "description": "密钥每分钟调用限额。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "当前分钟窗口剩余次数；为 0 时下一次调用返回 429。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Reset": {
                "description": "距当前分钟窗口结束的秒数。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              }
            }
          },
          "503": {
            "description": "依赖不可用 · 稍后核对服务状态；只读可有界重试，写入先确认原结果。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "2XX": {
            "description": "业务接口响应，可能为 JSON、文件、SSE 或 NDJSON。按实际 Content-Type 解析，NDJSON 不是 SSE。202 为受理，不代表异步完成。",
            "headers": {
              "X-Request-Id": {
                "description": "有 X-Request-Id 时，由有权的管理员在请求日志核对；提前拒绝的请求可能没有编号，此时记录时间、操作路径和状态。/v1/capabilities 的编号不进入业务日志。错误正文按接口解析，不依赖错误文案自动重试。",
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "description": "为 true 时表示返回的是同一幂等键首次请求的缓存结果，未再次执行。",
                "schema": {
                  "type": "string",
                  "const": "true"
                }
              },
              "X-RateLimit-Limit": {
                "description": "密钥每分钟调用限额。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "当前分钟窗口剩余次数；为 0 时下一次调用返回 429。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Reset": {
                "description": "距当前分钟窗口结束的秒数。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              }
            }
          },
          "default": {
            "description": "其他错误按具体接口响应解析；不保证包含请求编号或统一错误代码。"
          }
        }
      }
    },
    "/v1/operations/phone-detail.read": {
      "get": {
        "operationId": "phone_detail_read",
        "summary": "读取电话详情",
        "tags": [
          "电话与应用"
        ],
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "description": "显式授权操作 phone-detail.read。业务查询及正文遵循 /api/telephony 契约。并发版本规则仍适用。",
        "x-yunfu-source": "/api/telephony",
        "x-yunfu-field-index": {
          "method": "GET",
          "query": [
            "batchId",
            "business",
            "historyDays",
            "lineId",
            "recordSelection",
            "revision",
            "scope",
            "view"
          ],
          "body": [],
          "form": [],
          "actions": [],
          "permissions": [],
          "errorStatuses": [
            400,
            403
          ],
          "jsonLimits": []
        },
        "x-yunfu-permissions": [
          "service"
        ],
        "x-yunfu-billable": false,
        "x-yunfu-fixed-query": {
          "view": "call"
        },
        "x-yunfu-example-status": "contract",
        "x-yunfu-field-index-scope": "共享后台路由索引，不是本操作的参数或必填字段清单。",
        "parameters": [
          {
            "in": "query",
            "name": "view",
            "schema": {
              "type": "string",
              "const": "call"
            },
            "required": false,
            "description": "网关固定值，不可覆盖。",
            "example": "call"
          },
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          }
        ],
        "responses": {
          "400": {
            "description": "参数错误 · 按当前操作检查字段、格式和固定参数；修正后再提交。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "401": {
            "description": "凭据失效 · 检查密钥是否过期、撤销或轮换，以及站点是否匹配。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "402": {
            "description": "余额或额度不足 · 核对余额、套餐和接待额度；恢复可用后再确认是否提交。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "403": {
            "description": "权限或来源不符 · 核对操作授权、账号权限和请求来源；不要关闭认证绕过。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "404": {
            "description": "资源不存在或不可见 · 核对路径、资源编号和所属企业。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "405": {
            "description": "请求方法不符 · 按该操作文档和 Allow 响应头使用 GET 或 POST。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Allow": {
                "schema": {
                  "type": "string",
                  "const": "GET"
                }
              }
            }
          },
          "408": {
            "description": "读取请求超时 · 检查网络和正文上传；写入重试前核对原结果并保留原幂等键。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "409": {
            "description": "版本、幂等或状态冲突 · 先读回业务结果；有 Retry-After 时等待。修改配置先合并最新版本，结果未知不换键重做。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "请求过大 · 按接口限制缩小请求或使用该业务提供的分批导入入口。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "415": {
            "description": "正文格式不支持 · 开放网关 POST 使用 Content-Type: application/json 和有效 JSON 正文。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "422": {
            "description": "业务条件不满足 · 按错误提示补齐配置或业务状态；不要重复提交相同无效请求。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "429": {
            "description": "调用限流 · 按 Retry-After 等待，降低调用频率；写入重试仍使用原幂等键。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Limit": {
                "description": "密钥每分钟调用限额。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "当前分钟窗口剩余次数；为 0 时下一次调用返回 429。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Reset": {
                "description": "距当前分钟窗口结束的秒数。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              }
            }
          },
          "503": {
            "description": "依赖不可用 · 稍后核对服务状态；只读可有界重试，写入先确认原结果。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "2XX": {
            "description": "业务接口响应，可能为 JSON、文件、SSE 或 NDJSON。按实际 Content-Type 解析，NDJSON 不是 SSE。202 为受理，不代表异步完成。",
            "headers": {
              "X-Request-Id": {
                "description": "有 X-Request-Id 时，由有权的管理员在请求日志核对；提前拒绝的请求可能没有编号，此时记录时间、操作路径和状态。/v1/capabilities 的编号不进入业务日志。错误正文按接口解析，不依赖错误文案自动重试。",
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "description": "为 true 时表示返回的是同一幂等键首次请求的缓存结果，未再次执行。",
                "schema": {
                  "type": "string",
                  "const": "true"
                }
              },
              "X-RateLimit-Limit": {
                "description": "密钥每分钟调用限额。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "当前分钟窗口剩余次数；为 0 时下一次调用返回 429。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Reset": {
                "description": "距当前分钟窗口结束的秒数。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              }
            }
          },
          "default": {
            "description": "其他错误按具体接口响应解析；不保证包含请求编号或统一错误代码。"
          }
        }
      }
    },
    "/v1/operations/phone-channels.read": {
      "get": {
        "operationId": "phone_channels_read",
        "summary": "读取电话渠道",
        "tags": [
          "电话与应用"
        ],
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "description": "显式授权操作 phone-channels.read。业务查询及正文遵循 /api/telephony 契约。并发版本规则仍适用。",
        "x-yunfu-source": "/api/telephony",
        "x-yunfu-field-index": {
          "method": "GET",
          "query": [
            "batchId",
            "business",
            "historyDays",
            "lineId",
            "recordSelection",
            "revision",
            "scope",
            "view"
          ],
          "body": [],
          "form": [],
          "actions": [],
          "permissions": [],
          "errorStatuses": [
            400,
            403
          ],
          "jsonLimits": []
        },
        "x-yunfu-permissions": [
          "channels"
        ],
        "x-yunfu-billable": false,
        "x-yunfu-fixed-query": {
          "view": ""
        },
        "x-yunfu-example-status": "contract",
        "x-yunfu-field-index-scope": "共享后台路由索引，不是本操作的参数或必填字段清单。",
        "parameters": [
          {
            "in": "query",
            "name": "view",
            "schema": {
              "type": "string",
              "const": ""
            },
            "description": "网关固定值，不可覆盖。",
            "example": "",
            "required": false
          },
          {
            "in": "query",
            "name": "scope",
            "schema": {
              "type": "string"
            },
            "description": "平台资源模式；不返回企业通话正文。"
          },
          {
            "in": "query",
            "name": "historyDays",
            "schema": {
              "type": "string"
            },
            "description": "线路运营统计范围，默认近 30 天。"
          }
        ],
        "responses": {
          "400": {
            "description": "参数错误 · 按当前操作检查字段、格式和固定参数；修正后再提交。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "401": {
            "description": "凭据失效 · 检查密钥是否过期、撤销或轮换，以及站点是否匹配。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "402": {
            "description": "余额或额度不足 · 核对余额、套餐和接待额度；恢复可用后再确认是否提交。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "403": {
            "description": "权限或来源不符 · 核对操作授权、账号权限和请求来源；不要关闭认证绕过。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "404": {
            "description": "资源不存在或不可见 · 核对路径、资源编号和所属企业。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "405": {
            "description": "请求方法不符 · 按该操作文档和 Allow 响应头使用 GET 或 POST。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Allow": {
                "schema": {
                  "type": "string",
                  "const": "GET"
                }
              }
            }
          },
          "408": {
            "description": "读取请求超时 · 检查网络和正文上传；写入重试前核对原结果并保留原幂等键。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "409": {
            "description": "版本、幂等或状态冲突 · 先读回业务结果；有 Retry-After 时等待。修改配置先合并最新版本，结果未知不换键重做。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "请求过大 · 按接口限制缩小请求或使用该业务提供的分批导入入口。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "415": {
            "description": "正文格式不支持 · 开放网关 POST 使用 Content-Type: application/json 和有效 JSON 正文。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "422": {
            "description": "业务条件不满足 · 按错误提示补齐配置或业务状态；不要重复提交相同无效请求。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "429": {
            "description": "调用限流 · 按 Retry-After 等待，降低调用频率；写入重试仍使用原幂等键。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Limit": {
                "description": "密钥每分钟调用限额。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "当前分钟窗口剩余次数；为 0 时下一次调用返回 429。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Reset": {
                "description": "距当前分钟窗口结束的秒数。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              }
            }
          },
          "503": {
            "description": "依赖不可用 · 稍后核对服务状态；只读可有界重试，写入先确认原结果。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "2XX": {
            "description": "业务接口响应，可能为 JSON、文件、SSE 或 NDJSON。按实际 Content-Type 解析，NDJSON 不是 SSE。202 为受理，不代表异步完成。",
            "headers": {
              "X-Request-Id": {
                "description": "有 X-Request-Id 时，由有权的管理员在请求日志核对；提前拒绝的请求可能没有编号，此时记录时间、操作路径和状态。/v1/capabilities 的编号不进入业务日志。错误正文按接口解析，不依赖错误文案自动重试。",
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "description": "为 true 时表示返回的是同一幂等键首次请求的缓存结果，未再次执行。",
                "schema": {
                  "type": "string",
                  "const": "true"
                }
              },
              "X-RateLimit-Limit": {
                "description": "密钥每分钟调用限额。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "当前分钟窗口剩余次数；为 0 时下一次调用返回 429。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Reset": {
                "description": "距当前分钟窗口结束的秒数。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              }
            }
          },
          "default": {
            "description": "其他错误按具体接口响应解析；不保证包含请求编号或统一错误代码。"
          }
        }
      }
    },
    "/v1/operations/phone-channels.saveChannel": {
      "post": {
        "operationId": "phone_channels_saveChannel",
        "summary": "电话渠道 · 保存渠道",
        "tags": [
          "电话与应用"
        ],
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "description": "显式授权操作 phone-channels.saveChannel。业务查询及正文遵循 /api/telephony 契约。action 固定为 saveChannel。并发版本规则仍适用。",
        "x-yunfu-source": "/api/telephony",
        "x-yunfu-field-index": {
          "method": "POST",
          "query": [
            "scope"
          ],
          "body": [
            "action",
            "channel",
            "confirmed",
            "id",
            "line",
            "revision"
          ],
          "form": [],
          "actions": [
            "allocate",
            "deleteLine",
            "dial",
            "hangup",
            "inspect",
            "quickRegister",
            "register",
            "registrationStatus",
            "resumeRegistration",
            "saveChannel",
            "saveLine",
            "testLine",
            "unregister"
          ],
          "permissions": [],
          "errorStatuses": [
            400,
            403
          ],
          "jsonLimits": [
            20000
          ]
        },
        "x-yunfu-action": "saveChannel",
        "x-yunfu-permissions": [
          "channels"
        ],
        "x-yunfu-billable": false,
        "x-yunfu-example-status": "contract",
        "x-yunfu-field-index-scope": "共享后台路由索引，不是本操作的参数或必填字段清单。",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 100,
              "pattern": "^[-\\w.:]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "action": {
                    "const": "saveChannel"
                  }
                },
                "additionalProperties": true
              },
              "example": {
                "action": "saveChannel",
                "channel": {
                  "name": "来电客服",
                  "lineId": "11111111-1111-4111-8111-111111111111",
                  "enabled": false,
                  "plan": {
                    "type": "agent",
                    "id": "agent_example",
                    "version": 1
                  },
                  "schedule": {
                    "enabled": false,
                    "timezone": "Asia/Shanghai",
                    "validFrom": "",
                    "validUntil": "",
                    "slots": []
                  },
                  "rating": {
                    "enabled": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "400": {
            "description": "参数错误 · 按当前操作检查字段、格式和固定参数；修正后再提交。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "401": {
            "description": "凭据失效 · 检查密钥是否过期、撤销或轮换，以及站点是否匹配。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "402": {
            "description": "余额或额度不足 · 核对余额、套餐和接待额度；恢复可用后再确认是否提交。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "403": {
            "description": "权限或来源不符 · 核对操作授权、账号权限和请求来源；不要关闭认证绕过。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "404": {
            "description": "资源不存在或不可见 · 核对路径、资源编号和所属企业。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "405": {
            "description": "请求方法不符 · 按该操作文档和 Allow 响应头使用 GET 或 POST。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Allow": {
                "schema": {
                  "type": "string",
                  "const": "POST"
                }
              }
            }
          },
          "408": {
            "description": "读取请求超时 · 检查网络和正文上传；写入重试前核对原结果并保留原幂等键。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "409": {
            "description": "版本、幂等或状态冲突 · 先读回业务结果；有 Retry-After 时等待。修改配置先合并最新版本，结果未知不换键重做。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "请求过大 · 按接口限制缩小请求或使用该业务提供的分批导入入口。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "415": {
            "description": "正文格式不支持 · 开放网关 POST 使用 Content-Type: application/json 和有效 JSON 正文。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "422": {
            "description": "业务条件不满足 · 按错误提示补齐配置或业务状态；不要重复提交相同无效请求。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "429": {
            "description": "调用限流 · 按 Retry-After 等待，降低调用频率；写入重试仍使用原幂等键。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Limit": {
                "description": "密钥每分钟调用限额。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "当前分钟窗口剩余次数；为 0 时下一次调用返回 429。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Reset": {
                "description": "距当前分钟窗口结束的秒数。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              }
            }
          },
          "503": {
            "description": "依赖不可用 · 稍后核对服务状态；只读可有界重试，写入先确认原结果。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "2XX": {
            "description": "业务接口响应，可能为 JSON、文件、SSE 或 NDJSON。按实际 Content-Type 解析，NDJSON 不是 SSE。202 为受理，不代表异步完成。",
            "headers": {
              "X-Request-Id": {
                "description": "有 X-Request-Id 时，由有权的管理员在请求日志核对；提前拒绝的请求可能没有编号，此时记录时间、操作路径和状态。/v1/capabilities 的编号不进入业务日志。错误正文按接口解析，不依赖错误文案自动重试。",
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "description": "为 true 时表示返回的是同一幂等键首次请求的缓存结果，未再次执行。",
                "schema": {
                  "type": "string",
                  "const": "true"
                }
              },
              "X-RateLimit-Limit": {
                "description": "密钥每分钟调用限额。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "当前分钟窗口剩余次数；为 0 时下一次调用返回 429。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Reset": {
                "description": "距当前分钟窗口结束的秒数。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              }
            }
          },
          "default": {
            "description": "其他错误按具体接口响应解析；不保证包含请求编号或统一错误代码。"
          }
        }
      }
    },
    "/v1/operations/phone-records.export": {
      "get": {
        "operationId": "phone_records_export",
        "summary": "导出电话记录",
        "tags": [
          "电话与应用"
        ],
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "description": "显式授权操作 phone-records.export。业务查询及正文遵循 /api/telephony 契约。并发版本规则仍适用。",
        "x-yunfu-source": "/api/telephony",
        "x-yunfu-field-index": {
          "method": "GET",
          "query": [
            "batchId",
            "business",
            "historyDays",
            "lineId",
            "recordSelection",
            "revision",
            "scope",
            "view"
          ],
          "body": [],
          "form": [],
          "actions": [],
          "permissions": [],
          "errorStatuses": [
            400,
            403
          ],
          "jsonLimits": []
        },
        "x-yunfu-permissions": [
          "service"
        ],
        "x-yunfu-billable": false,
        "x-yunfu-fixed-query": {
          "view": "export"
        },
        "x-yunfu-example-status": "contract",
        "x-yunfu-field-index-scope": "共享后台路由索引，不是本操作的参数或必填字段清单。",
        "parameters": [
          {
            "in": "query",
            "name": "view",
            "schema": {
              "type": "string",
              "const": "export"
            },
            "required": false,
            "description": "网关固定值，不可覆盖。",
            "example": "export"
          },
          {
            "in": "query",
            "name": "ids",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "逗号分隔的 1–100 个唯一电话 UUID；全部需属于当前企业。",
            "example": "11111111-1111-4111-8111-111111111111"
          }
        ],
        "responses": {
          "400": {
            "description": "参数错误 · 按当前操作检查字段、格式和固定参数；修正后再提交。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "401": {
            "description": "凭据失效 · 检查密钥是否过期、撤销或轮换，以及站点是否匹配。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "402": {
            "description": "余额或额度不足 · 核对余额、套餐和接待额度；恢复可用后再确认是否提交。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "403": {
            "description": "权限或来源不符 · 核对操作授权、账号权限和请求来源；不要关闭认证绕过。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "404": {
            "description": "资源不存在或不可见 · 核对路径、资源编号和所属企业。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "405": {
            "description": "请求方法不符 · 按该操作文档和 Allow 响应头使用 GET 或 POST。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Allow": {
                "schema": {
                  "type": "string",
                  "const": "GET"
                }
              }
            }
          },
          "408": {
            "description": "读取请求超时 · 检查网络和正文上传；写入重试前核对原结果并保留原幂等键。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "409": {
            "description": "版本、幂等或状态冲突 · 先读回业务结果；有 Retry-After 时等待。修改配置先合并最新版本，结果未知不换键重做。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "请求过大 · 按接口限制缩小请求或使用该业务提供的分批导入入口。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "415": {
            "description": "正文格式不支持 · 开放网关 POST 使用 Content-Type: application/json 和有效 JSON 正文。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "422": {
            "description": "业务条件不满足 · 按错误提示补齐配置或业务状态；不要重复提交相同无效请求。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "429": {
            "description": "调用限流 · 按 Retry-After 等待，降低调用频率；写入重试仍使用原幂等键。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Limit": {
                "description": "密钥每分钟调用限额。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "当前分钟窗口剩余次数；为 0 时下一次调用返回 429。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Reset": {
                "description": "距当前分钟窗口结束的秒数。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              }
            }
          },
          "503": {
            "description": "依赖不可用 · 稍后核对服务状态；只读可有界重试，写入先确认原结果。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeveloperError"
                }
              }
            }
          },
          "2XX": {
            "description": "业务接口响应，可能为 JSON、文件、SSE 或 NDJSON。按实际 Content-Type 解析，NDJSON 不是 SSE。202 为受理，不代表异步完成。",
            "headers": {
              "X-Request-Id": {
                "description": "有 X-Request-Id 时，由有权的管理员在请求日志核对；提前拒绝的请求可能没有编号，此时记录时间、操作路径和状态。/v1/capabilities 的编号不进入业务日志。错误正文按接口解析，不依赖错误文案自动重试。",
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "description": "为 true 时表示返回的是同一幂等键首次请求的缓存结果，未再次执行。",
                "schema": {
                  "type": "string",
                  "const": "true"
                }
              },
              "X-RateLimit-Limit": {
                "description": "密钥每分钟调用限额。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "当前分钟窗口剩余次数；为 0 时下一次调用返回 429。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              },
              "X-RateLimit-Reset": {
                "description": "距当前分钟窗口结束的秒数。",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9]+$"
                }
              }
            }
          },
          "default": {
            "description": "其他错误按具体接口响应解析；不保证包含请求编号或统一错误代码。"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerApiKey": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "Yunfu API Key",
        "description": "企业管理员创建的站点绑定密钥，用于 /v1/capabilities 权限预检、已授权的 /v1/operations 和远程 /v1/mcp；不用于任意 /api 后台会话路由。"
      }
    }
  }
}