Skip to main content

Documentation Index

Fetch the complete documentation index at: https://beaver.voc.ai/llms.txt

Use this file to discover all available pages before exploring further.

当第三方平台有新消息时,向 Shulex 在 UI 中展示的 Webhook 地址发起 POST 请求。

Webhook 地址

请在 Shulex 前端 UI 创建渠道后,直接复制页面展示的 Webhook 地址。不要手动拼接 Webhook URL UI 展示的 Webhook 地址格式:
POST https://<host>/api_v2/intelli/v2/webhook/CUSTOM_TICKET/{xToken}/{channelId}

字段说明

字段说明
CUSTOM_TICKET固定平台标识,必须全大写
{xToken}当前账号 API Token,由 Shulex 生成
{channelId}当前 Custom Ticket channel ID

安全说明

  • {xToken}{channelId} 都由 Shulex 系统生成并展示在 UI 中,接入方只需要复制使用
  • 当前链路使用 {xToken}/{channelId} 双参数定位渠道。
  • 禁止只使用数字 channelId 作为 Webhook token,避免 IDOR 枚举风险。
  • 服务端会校验 xToken 所属租户与 channelId 所属租户一致。

请求格式

POST {webhookUrl}
Content-Type: application/json

{
  "ticketId": "order-2024-88001",
  "event": "new_message"
}

请求体字段

字段类型是否必填说明
ticketIdstring必填工单唯一 ID,Shulex 用它调用 queryUrl 拉取详情
eventstring选填触发事件类型,例如 new_messageticket_updated;当前链路不依赖该字段做分支处理
Webhook 只作为触发器使用。请求体至少包含 ticketId完整工单内容不会从 Webhook body 读取

响应格式

成功

{
  "code": 200,
  "message": "ok"
}
code=200 只表示 Shulex 已接收并进入处理链路,不表示 AI 回复已经完成。

常见错误

{
  "code": 401,
  "message": "invalid token"
}
{
  "code": 400,
  "message": "unsupported platform: CUSTOM_TICKET"
}
{
  "code": 422,
  "message": "platform not configured"
}
code说明
200已接收,进入处理链路
400不支持的平台标识
401xToken 无效或与 channel 不匹配
422平台未配置