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

# 删除 Channel

> 软删除并归档 Channel，停止连接、后续消息处理和发送，清除渠道凭据。删除是解除接入，不是暂停；不提供恢复此 Channel 的操作。

已有 Managed Session、Memory Store、审计记录和已挂载资源保留。已发出的远端请求可能已在平台侧完成；删除后原连接处理方不会继续登记结果或回复，不能把删除视为远端请求已取消。

复用飞书、企业微信或钉钉机器人前，先完成旧 Channel 删除并释放绑定，再用合法凭据创建新 Channel。复用个人微信绑定账号时，需要重建 Channel 并重新扫码，不能导入旧 token。新 Channel 使用新 ID，不自动迁移旧 Session 或历史。

## 请求示例

```bash
curl --request DELETE "https://agent-api.bigmodel.cn/api/agent/forward/v0/channels/$CHANNEL_ID" \
  --header "Authorization: Bearer $ZHIPUAI_API_KEY" \
  --header "zai-version: 2026-05-26" \
  --header "zai-beta: managed-agents-2026-05-26"
```

成功 200 返回 `{ "id": "channel_xxx", "deleted": true }`。不存在、已删除或不属于当前账号返回 404，重复删除也返回 404。限流规则见[创建 Channel](https://docs.bigmodel.cn/api-reference/channel/create.md)。


## OpenAPI

````yaml /openapi/openapi-channel.json delete /agent/forward/v0/channels/{channelId}
openapi: 3.0.1
info:
  title: Channel API
  version: '2026-10-30'
  description: >-
    Channel API v0：将固定版本的 Agent
    接入飞书、企业微信、钉钉和个人微信。提供创建、分页查询、详情、有限配置更新、删除以及微信扫码会话创建和查询。连接异步建立；201 仅表示配置保存成功。
servers:
  - url: https://agent-api.bigmodel.cn/api
    description: 生产环境
security:
  - bearerAuth: []
tags:
  - name: Channel
    description: 渠道管理；Agent 运行仍通过 Managed Session 和 Events API。
paths:
  /agent/forward/v0/channels/{channelId}:
    delete:
      tags:
        - Channel
      summary: 删除 Channel
      description: 软删除并归档 Channel，停止连接、后续消息处理和发送，清除渠道凭据。删除是解除接入，不是暂停；不提供恢复此 Channel 的操作。
      operationId: forwardDeleteChannelsByChannelId
      parameters:
        - $ref: '#/components/parameters/ForwardZaiVersion'
        - $ref: '#/components/parameters/ForwardZaiBeta'
        - name: channelId
          in: path
          required: true
          description: channelId 资源标识。
          schema:
            type: string
      responses:
        '200':
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForwardChannelDeleted'
              example:
                id: channel_xxx
                deleted: true
        '404':
          description: 资源不存在、已删除或不属于当前账号。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForwardAgentErrorResponse'
              example:
                type: error
                error:
                  type: not_found_error
                  message: 资源不存在、已删除或不属于当前账号。
                  details: {}
                request_id: req_xxx
        '429':
          description: 账号或全局请求频率超限。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForwardAgentErrorResponse'
              example:
                type: error
                error:
                  type: rate_limit_error
                  message: 账号或全局请求频率超限。
                  details: {}
                request_id: req_xxx
          headers:
            retry-after:
              description: 建议等待的相对秒数。503 并发预检忙时可为 1。
              schema:
                type: string
            ratelimit-limit:
              description: 当前桶容量。
              schema:
                type: string
            ratelimit-remaining:
              description: 剩余容量，拒绝时为 0。
              schema:
                type: string
            ratelimit-reset:
              description: 恢复一个请求额度所需的相对秒数。
              schema:
                type: string
            x-ratelimit-scope:
              description: 仅全局限流时返回 global。
              schema:
                type: string
components:
  parameters:
    ForwardZaiVersion:
      name: zai-version
      in: header
      required: true
      description: Channel API v0 基础协议标识，固定为 2026-05-26。
      schema:
        type: string
        enum:
          - '2026-05-26'
        default: '2026-05-26'
        example: '2026-05-26'
    ForwardZaiBeta:
      name: zai-beta
      in: header
      required: true
      description: 可有多个逗号分隔值，但必须包含 managed-agents-2026-05-26。
      schema:
        type: string
        default: managed-agents-2026-05-26
        example: managed-agents-2026-05-26
  schemas:
    ForwardChannelDeleted:
      type: object
      properties:
        id:
          type: string
          example: channel_xxx
        deleted:
          type: boolean
          enum:
            - true
      required:
        - id
        - deleted
      additionalProperties: false
      example:
        id: channel_xxx
        deleted: true
    ForwardAgentErrorResponse:
      type: object
      properties:
        type:
          type: string
          enum:
            - error
        error:
          type: object
          properties:
            type:
              type: string
              enum:
                - authentication_error
                - permission_error
                - invalid_request_error
                - not_found_error
                - conflict_error
                - rate_limit_error
                - api_error
            message:
              type: string
            details:
              type: object
              additionalProperties: true
          required:
            - type
            - message
            - details
          additionalProperties: false
        request_id:
          type: string
          example: req_xxx
      required:
        - type
        - error
        - request_id
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        标准的 HTTP Bearer 认证方式，在 [API
        Keys](https://bigmodel.cn/usercenter/proj-mgmt/apikeys) 页面获取密钥。

````

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