Webhook
Last updated
Was this helpful?
Last updated
Was this helpful?
需要 開發者
提供一個 API 端點,用於接收和處理傳入的 webhook 請求。MaiAgent 在串接方建立訊息後,會將 AI 助理的回覆回傳給此 Webhook 端點
Webhook 流程:
端點: https://<your-api-domain>/maiagent/webhook
(由開發者自行設計)
請求方法: POST
id
string
是
訊息唯一識別碼(UUID 格式)
conversation
string
是
對話識別碼
sender
object
是
發送者資訊
string
是
發送者 ID
string
是
發送者使用者 ID
sender.avatar
string
是
發送者頭像 URL
type
string
是
訊息類型(例如:outgoing)
content
string
是
訊息內容
feedback
null
object
否
createdAt
string
是
訊息創建時間戳(毫秒)
attachments
array
是
附件列表
citations
array
是
引用檔案列表
id
string
是
檔案唯一識別碼
filename
string
是
檔案名稱
file
string
是
檔案 URL
fileType
string
是
檔案類型(例如:jsonl)
size
number
是
檔案大小(位元組)
status
string
是
檔案狀態
document
string
是
文件識別碼
createdAt
string
是
檔案創建時間戳(毫秒)
請回傳 200,讓 MaiAgent 知道 Webhook 成功,否則將啟動 MaiAgent Retry Webhook 的機制