> ## Documentation Index
> Fetch the complete documentation index at: https://docs.memorylake.cn/llms.txt
> Use this file to discover all available pages before exploring further.

# 列出 IM 集成

> 列出您可管理的工作空间中的 IM 渠道集成，按时间倒序

```
GET /openapi/memorylake/admin/v1/integrations
```

列出您可管理的工作空间中的 IM 渠道集成，按时间倒序。其他工作空间中的集成不列出（也不计入 `total`）；按您无权管理的工作空间筛选会被拒绝。从不返回凭据。

<Note>
  **所需权限：** 取决于您发送的内容：

  * 设置了 `workspace_id` 时：`workspace:integration_manage`（作用于 `workspace_id`）
</Note>

### 查询参数

<ParamField query="page_size" type="integer" default="20">
  每页条目数（1–100）
</ParamField>

<ParamField query="continuation_token" type="string">
  上一页返回的令牌。不透明——请勿自行构造或解析。
</ParamField>

<ParamField query="workspace_id" type="string">
  仅返回此工作空间的集成
</ParamField>

<ParamField query="agent_id" type="string">
  仅返回由此 Agent 应答的集成
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET 'https://app.memorylake.cn/openapi/memorylake/admin/v1/integrations' \
    -H 'Authorization: Bearer sk_xxxxxx'
  ```
</RequestExample>

### 响应

<ResponseField name="data" type="object">
  <Expandable title="Load More Response Integration 对象">
    <ResponseField name="items" type="array">
      当前页的条目列表

      <Expandable title="Integration 对象">
        <ResponseField name="agent_id" type="string">负责回复发送给该机器人的消息的 Agent</ResponseField>
        <ResponseField name="channel" type="string">IM 平台。可选值：`dingtalk`、`wecom`、`feishu`、`slack`。</ResponseField>
        <ResponseField name="created_at" type="integer">创建时间，Unix 秒级时间戳</ResponseField>
        <ResponseField name="credentials_configured" type="boolean">是否已存储凭据。凭据本身仅可写入，从不返回。</ResponseField>
        <ResponseField name="daily_message_limit" type="integer">此集成每天处理的最大消息数；0 表示不限</ResponseField>
        <ResponseField name="dataset_ids" type="array">Agent 可使用的开放数据数据集</ResponseField>
        <ResponseField name="enabled" type="boolean">是否应连接该集成</ResponseField>
        <ResponseField name="external_app_id" type="string">机器人在 IM 平台上的标识符（DingTalk Client ID、Feishu App ID、WeCom Bot ID、Slack `team:bot-user`）。不属于机密信息。</ResponseField>
        <ResponseField name="id" type="string">集成的标识符</ResponseField>
        <ResponseField name="name" type="string">显示名称</ResponseField>
        <ResponseField name="read_only_project_ids" type="array">额外检索的项目（只读）</ResponseField>
        <ResponseField name="read_write_project_id" type="string">从 IM 对话中提取的记忆写入的项目</ResponseField>

        <ResponseField name="settings" type="object">
          渠道专属设置

          <Expandable title="Integration Settings 对象">
            <ResponseField name="card_template_id" type="string">仅限 DingTalk：AI 卡片模板 ID。设置后回复将以流式写入交互卡片；省略或发送 `""` 则以普通消息回复。</ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="status" type="string">连接状态。创建后或更改凭据后为 `pending`，直至首次连接尝试；可轮询[获取 IM 集成](/features/memorylake/api-reference/integrations/get-integration)跟踪状态。可选值：`pending`、`connected`、`error`、`disabled`。</ResponseField>
        <ResponseField name="updated_at" type="integer">最后更新时间，Unix 秒级时间戳</ResponseField>
        <ResponseField name="workspace_id" type="string">集成所属的工作空间。创建时确定。</ResponseField>
        <ResponseField name="status_error" type="string">`status` 为 `error` 时的简短规范化原因，用于展示（中文，采用控制台措辞，可能变化）。绝不包含平台的原始响应。程序中请使用 `status_error_code`。</ResponseField>
        <ResponseField name="status_error_code" type="string">稳定的原因代码，只要存在 `status_error` 就会返回。`credentials_invalid`：平台拒绝了凭据（请修正凭据）；`subscribe_rejected`：WeCom 拒绝了订阅——凭据错误或触发平台限流，会自动重试；`preempted`：另一个连接接管了该机器人，通常是同一机器人在另一环境中建立了连接；`timeout` / `disconnected` / `connection_aborted` / `connection_failed`：连接问题，会自动重试；`dependency_unavailable`：此部署依赖的某项服务不可用，会自动重试；`dependency_misconfigured`：此部署缺少该渠道所需的组件（WeCom 需要 Redis）——请联系运维人员；`internal_error`：我方故障；`unknown`：该原因记录于原因代码引入之前，会在下次连接尝试时被替换。今后可能新增代码；遇到无法识别的代码时，请按 `connection_failed` 处理。</ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="continuation_token" type="string">用于获取下一页的令牌；最后一页不返回</ResponseField>
    <ResponseField name="total" type="integer">所有分页中符合筛选条件的条目总数；无法获取计数时省略</ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json Success (200) theme={null}
  {
    "success": true,
    "message": "Operation completed successfully",
    "data": {
      "items": [
        {
          "agent_id": "9926a90400d85f0a54e9e195e915db44",
          "channel": "dingtalk",
          "created_at": 1760000000,
          "credentials_configured": false,
          "daily_message_limit": 1,
          "dataset_ids": [
            "3748f84ef0d2e877c0097b8f32d45cf0"
          ],
          "enabled": true,
          "external_app_id": "524832f3cb1ba8ef33208d0692b8d565",
          "id": "f58008acc066bab6dfb73de8efde8905",
          "name": "Example name",
          "read_only_project_ids": [
            "5af1515af082229ccfd68f981a6cf886"
          ],
          "read_write_project_id": "aed31b20113b86ecc2587aa0cbc0eb2f",
          "settings": {
            "card_template_id": "870213bad9d43369a8af134b1b482d6e"
          },
          "status": "pending",
          "updated_at": 1760000000,
          "workspace_id": "ce55865bcc4c12c26161d24b238a888e",
          "status_error": "example",
          "status_error_code": "credentials_invalid"
        }
      ],
      "continuation_token": "eyJvZmZzZXQiOjIwfQ",
      "total": 1
    }
  }
  ```
</ResponseExample>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.