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

# 列出 Channels

> 按条件分页列出外部 IM Channel。

`GET /api/v1/forward/channels`

返回当前账号下的 Channel 记录。

## 请求头

| Header        | 是否必填 | 说明             |
| ------------- | ---- | -------------- |
| Authorization | 是    | `Bearer <PAT>` |

## 查询参数

| 参数              | 类型      | 是否必填 | 默认值 | 说明                                                |
| --------------- | ------- | ---- | --- | ------------------------------------------------- |
| channel\_type   | string  | 否    | -   | 按 `wechat`、`qq`、`wecom`、`feishu` 或 `dingtalk` 过滤。 |
| enabled         | boolean | 否    | -   | 按人工启停状态过滤。                                        |
| binding\_status | string  | 否    | -   | 按 `unbound`、`bound` 或 `expired` 过滤。               |
| identity\_id    | string  | 否    | -   | 按 Forward Identity ID 过滤。                         |
| template\_id    | string  | 否    | -   | 按 Forward Template ID 过滤。                         |
| limit           | integer | 否    | 20  | 分页大小，最大 100。                                      |
| after\_id       | string  | 否    | -   | 向后翻页游标。                                           |
| before\_id      | string  | 否    | -   | 向前翻页游标。                                           |

## 示例请求

```bash theme={null}
curl -s -X GET 'https://api.qoder.com/api/v1/forward/channels' \
  -H "Authorization: Bearer $QODER_PAT"
```

## 示例响应

**HTTP 200 OK**

```json theme={null}
{
  "data": [
    {
      "id": "channel_019eabc123",
      "type": "channel",
      "identity_id": "idn_019eabc123",
      "template_id": "tmpl_support",
      "channel_type": "feishu",
      "name": "Support Feishu channel",
      "enabled": true,
      "binding_status": "bound",
      "channel_config": {
        "response_options": {
          "include_tool_calls": false,
          "include_thinking": false
        }
      },
      "created_at": "2026-06-18T10:00:00Z",
      "updated_at": "2026-06-18T10:00:00Z"
    }
  ],
  "first_id": "channel_019eabc123",
  "last_id": "channel_019eabc123",
  "has_more": false
}
```

## 响应字段

| 字段        | 类型             | 说明                  |
| --------- | -------------- | ------------------- |
| data      | array          | 当前页的 Channel 对象。    |
| first\_id | string \| null | 当前页第一条 Channel ID。  |
| last\_id  | string \| null | 当前页最后一条 Channel ID。 |
| has\_more | boolean        | 是否还有更多记录。           |

## 错误

| HTTP | Type                    | Code                       | 触发条件         |
| ---- | ----------------------- | -------------------------- | ------------ |
| 400  | `invalid_request_error` | `invalid_pagination`       | 分页参数不合法。     |
| 400  | `invalid_request_error` | `channel_type_unsupported` | 渠道类型过滤条件不支持。 |
| 401  | `authentication_error`  | `authentication_required`  | PAT 无效或已过期。  |

## 注意事项

* `after_id` 和 `before_id` 不能同时传入。
* 只返回当前调用方账号边界内的 Channel。

## 相关

<CardGroup cols={2}>
  <Card title="创建 Channel" icon="plus" href="/cloud-agents/api/forward/channels/create" />

  <Card title="获取 Channel" icon="file-lines" href="/cloud-agents/api/forward/channels/get" />
</CardGroup>
