首頁
文件概述
Documentation of API endpoints of MaiAgent
API 分類與端點列表
AI 助理
POST
api/chatbots: 建立新 AI 助理GET
api/chatbot-settings: 列出 AI 助理有的設定項目GET
api/embedding-models: 列出 Embedding ModelGET
api/reranker-models: 列出 Reranker ModelGET
api/chatbots: 取得 AI 助理列表GET
api/chatbots/{id}: 取得特定 AI 助理PUT
api/chatbots/{id}: 更新 AI 助理PATCH
api/chatbots/{id}: 部分更新 AI 助理DELETE
api/chatbots/{id}: 刪除 AI 助理
附件與檔案
POST
api/attachments-upload: 建立新附件 (整合)POST
api/upload-presigned-url: 取得檔案上傳用的預簽署 URL (建立/取得)POST
api/attachments: Presigned 上傳附件POST
api/conversations/{conversationPk}/attachments: 建立對話附件
知識庫
POST
api/chatbots/{chatbotPk}/files: 上傳新知識庫文件GET
api/chatbots/{chatbotPk}/files: 取得知識庫文件列表GET
api/chatbots/{chatbotPk}/files/{id}: 取得特定知識庫文件PUT
api/chatbots/{chatbotPk}/files/{id}: 更新知識庫文件DELETE
api/chatbots/{chatbotPk}/files/{id}: 刪除知識庫文件POST
api/chatbots/{chatbotPk}/files/batch-delete: 批次刪除知識庫文件POST
api/chatbots/{chatbotPk}/faqs: 建立新 FAQGET
api/chatbots/{chatbotPk}/faqs: 取得 FAQ 列表GET
api/chatbots/{chatbotPk}/faqs/{id}: 取得特定 FAQPUT
api/chatbots/{chatbotPk}/faqs/{id}: 更新 FAQDELETE
api/chatbots/{chatbotPk}/faqs/{id}: 刪除 FAQPOST
api/chatbots/{chatbotPk}/faqs/batch-delete: 批次刪除 FAQGET
api/chatbot-text-nodes: 取得 AI 助理的所有檔案的文本節點GET
api/chatbot-text-nodes/{id}: 取得 AI 助理的特定檔案的文本節點POST
api/chatbots/{id}/search: 搜尋測試GET
api/parsers/supported-file-types: 列出檔案類型支援的解析器POST
api/chatbots/{id}/search: 搜尋測試
對話與訊息
POST
api/chatbots/{chatbotId}/completions: 發送訊息 (串流)POST
api/messages: 發送訊息 (建立)GET
api/messages: 取得訊息列表GET
api/messages/{id}: 取得特定訊息POST
api/conversations: 建立新的對話GET
api/conversations: 取得對話列表GET
api/conversations/{id}: 取得特定對話GET
api/chatbots/{chatbotPk}/records: 取得 AI 助理對話紀錄GET
api/chatbots/{chatbotPk}/records/export-excel: 對話紀錄匯出為 Excel 檔案
對話 Widget
GET
api/web-chats/{id}: 取得特定 Web Chat
組織與成員
POST
api/auth/registration: 帳號註冊POST
api/auth/password/change: 更換密碼POST
api/organizations: 建立新組織GET
api/organizations: 取得組織列表GET
api/organizations/{id}: 取得特定組織資訊GET
api/users/current: 取得當前用戶詳細資訊GET
api/permissions: 取得當前用戶權限PUT
api/organizations/{id}: 更新組織資訊PUT
api/users/current: 更新當前用戶詳細資訊DELETE
api/organizations/{id}: 刪除組織POST
api/organizations/{organizationPk}/members: 新增成員至指定組織GET
api/organizations/{organizationPk}/members: 取得指定組織的成員列表GET
api/organizations/{organizationPk}/members/{id}: 取得特定成員詳細資訊PUT
api/organizations/{organizationPk}/members/{id}: 更新指定組織成員資訊DELETE
api/organizations/{organizationPk}/members/{id}: 刪除指定成員
角色與權限
POST
api/organizations/{organizationPk}/groups: 創建角色GET
api/permissions: 列出權限清單GET
api/organizations/{organizationPk}/groups: 獲取角色列表GET
api/organizations/{organizationPk}/groups/{id}: 獲取角色的詳情PUT
api/organizations/{organizationPk}/groups/{id}: 更新角色權限PATCH
api/organizations/{organizationPk}/groups/{id}: 部分更新角色權限DELETE
api/organizations/{organizationPk}/groups/{id}: 刪除角色POST
api/organizations/{organizationPk}/groups/{groupPk}/group-chatbots/bulk-create: 批量分配 AI 助理給角色GET
api/organizations/{organizationPk}/groups/{groupPk}/group-chatbots: 獲取角色的 AI 助理列表DELETE
api/organizations/{organizationPk}/groups/{groupPk}/group-chatbots/{id}: 移除角色裡的 AI 助理
認證要求
所有 API 請求必須在 HTTP Header 中包含 API Key,格式如下:
Authorization: Api-Key YOUR_API_KEY
使用說明
請仔細閱讀每個端點的詳細文檔
在每個分類頁面中可以找到詳細的請求與回應格式
所有範例程式碼都提供了多種程式語言的版本
狀態碼說明
200
請求成功
201
資源成功建立
400
請求格式錯誤
401
認證失敗
403
權限不足
404
資源不存在
500
伺服器錯誤
Last updated
Was this helpful?