API 参考 / admin

写客服气泡收件配置(平台超管)

PUT /api/v1/admin/settings/support · adminUpdateSupportSettings

覆盖客服气泡的收件与展示配置(单 key upsert,attachment_storage 同款范式):启用开关、 支持项目 id、代填 actor / 默认负责人、飞书群链接与二维码图 URL、联络邮箱、对话话术。 enabled=true 时 projectId 与 actorUserId 必填,且 actorUserId / defaultOwnerId 必须是该 支持项目成员(服务端校验,不满足 422)。feishuGroupLink / feishuGroupQrUrl 若填写必须是 https 绝对 URL,contactEmail 必须是合法邮箱形态(B-00324)——这两类值会被渲染进 https 站点上的客服气泡,http 图片会被浏览器按混合内容拦掉。无密钥字段,读视图全量回显。 chatGreeting / chatFallbackReply / cannedReplies 服务于「在线对话」,该能力尚未接通 (决策 D5),这三项当前保存后没有任何消费方(B-00257)。 保存即时生效(公开端点 getSupportConfig 直接读库)。写审计 platform.settings.update。要求平台超管。

本接口要求浏览器会话。Bearer API Token 无法调用——Token 的生命周期管理必须在网页端完成。

请求体

enabled(必填)
boolean
projectId(必填)
string
actorUserId(必填)
string
defaultOwnerId(必填)
string
feishuGroupLink(必填)
string
feishuGroupQrUrl(必填)
string
contactEmail(必填)
string
chatGreeting(必填)
string
chatFallbackReply(必填)
string
cannedReplies(必填)
SupportCannedReply[]
cannedReplies[].keywords(必填)
string[]
cannedReplies[].reply(必填)
string

响应字段 · 200

enabled(必填)
boolean
projectId(必填)
string
actorUserId(必填)
string
defaultOwnerId(必填)
string
feishuGroupLink(必填)
string
feishuGroupQrUrl(必填)
string
contactEmail(必填)
string
chatGreeting(必填)
string
chatFallbackReply(必填)
string
cannedReplies(必填)
SupportCannedReply[]
cannedReplies[].keywords(必填)
string[]
cannedReplies[].reply(必填)
string

错误

请求示例(curl)

curl -X PUT "https://你的项目.workflow.games/api/v1/admin/settings/support" \
  -H "Authorization: Bearer wfp_…" \
  -H "content-type: application/json" \
  --data '{"enabled":true,"projectId":"018f3c2e-0000-7000-8000-000000000000","actorUserId":"018f3c2e-0000-7000-8000-000000000000","defaultOwnerId":"018f3c2e-0000-7000-8000-000000000000","feishuGroupLink":"https://example.com","feishuGroupQrUrl":"https://example.com","contactEmail":"[email protected]","chatGreeting":"示例文本","chatFallbackReply":"示例文本","cannedReplies":[{"keywords":["示例文本"],"reply":"示例文本"}]}'

响应示例

HTTP/1.1 200
{
  "enabled": true,
  "projectId": "018f3c2e-0000-7000-8000-000000000000",
  "actorUserId": "018f3c2e-0000-7000-8000-000000000000",
  "defaultOwnerId": "018f3c2e-0000-7000-8000-000000000000",
  "feishuGroupLink": "https://example.com",
  "feishuGroupQrUrl": "https://example.com",
  "contactEmail": "[email protected]",
  "chatGreeting": "示例文本",
  "chatFallbackReply": "示例文本",
  "cannedReplies": [
    {
      "keywords": [
        "示例文本"
      ],
      "reply": "示例文本"
    }
  ]
}

合同真值:OpenAPI 3.1(0.1.0)。

相关:Agent 接入指南 · 使用指南 · API 参考索引

Workflow 正在加载…