创建 Feishu 消息渠道

接口用途

创建 Feishu 消息渠道实例。

请求方式

POST

接口地址

https://moi.matrixorigin.cn/newmoi/workspaces/<workspace_id>/channels/feishu/instances

身份认证

使用工作区 API Key,在请求头中携带 X-API-Key: <WORKSPACE_API_KEY>,并设置 Content-Type: application/json

路径参数

无。

查询参数

无。

请求体

创建 Feishu channel instance。secrets 中不要明文沉淀到文档示例的真实 app_secret/token/encrypt_key。

字段

类型

必填

说明

channel_type

string

渠道类型,如 feishu

name

string

实例名称

description

string

描述

config

object

非敏感配置,如 app_id

secrets

object

敏感配置;勿写入文档明文

visibility

string

可见性

labels

object

标签

请求示例

curl -X POST 'https://moi.matrixorigin.cn/newmoi/workspaces/<workspace_id>/channels/feishu/instances' \
  -H 'X-API-Key: <WORKSPACE_API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{"channel_type":"feishu","name":"feishu-bot","config":{"app_id":"<app_id>"},"secrets":{"app_secret":"<APP_SECRET>"},"visibility":"workspace"}'

响应说明

除 A2A JSON-RPC 外,多数工作区接口成功响应形如 {"code":0,"data":...};下列字段描述 data(或 HTTP 202 时的 data)。

返回渠道实例:

字段

类型

必填

说明

id

string

实例 ID

workspace_id

string

工作区 ID

provider

string

feishu / github

channel_type

string

渠道类型

name

string

名称

description

string

描述

status

string

状态,如 active

credential_ref

string

凭据引用

callback_path

string

回调路径(如有)

capabilities

array

能力

tool_ids

array

关联工具

config

object

非敏感配置

last_test_status

string

最近测试状态

last_tested_at

string

最近测试时间

created_at

string

创建时间

updated_at

string

更新时间

使用限制

  • 创建前可先走保存前测试链路。

相关接口