删除 Channel
curl --request DELETE \
--url https://agent-api.bigmodel.cn/api/agent/forward/v0/channels/{channelId} \
--header 'Authorization: Bearer <token>' \
--header 'zai-beta: <zai-beta>' \
--header 'zai-version: <zai-version>'import requests
url = "https://agent-api.bigmodel.cn/api/agent/forward/v0/channels/{channelId}"
headers = {
"zai-version": "<zai-version>",
"zai-beta": "<zai-beta>",
"Authorization": "Bearer <token>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {
'zai-version': '<zai-version>',
'zai-beta': '<zai-beta>',
Authorization: 'Bearer <token>'
}
};
fetch('https://agent-api.bigmodel.cn/api/agent/forward/v0/channels/{channelId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.delete("https://agent-api.bigmodel.cn/api/agent/forward/v0/channels/{channelId}")
.header("zai-version", "<zai-version>")
.header("zai-beta", "<zai-beta>")
.header("Authorization", "Bearer <token>")
.asString();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://agent-api.bigmodel.cn/api/agent/forward/v0/channels/{channelId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("zai-version", "<zai-version>")
req.Header.Add("zai-beta", "<zai-beta>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://agent-api.bigmodel.cn/api/agent/forward/v0/channels/{channelId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"zai-beta: <zai-beta>",
"zai-version: <zai-version>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"id": "channel_xxx",
"deleted": true
}{
"type": "error",
"error": {
"type": "not_found_error",
"message": "资源不存在、已删除或不属于当前账号。",
"details": {}
},
"request_id": "req_xxx"
}{
"type": "error",
"error": {
"type": "rate_limit_error",
"message": "账号或全局请求频率超限。",
"details": {}
},
"request_id": "req_xxx"
}Channel
删除 Channel
软删除并归档 Channel,停止连接、后续消息处理和发送,清除渠道凭据。删除是解除接入,不是暂停;不提供恢复此 Channel 的操作。
DELETE
/
agent
/
forward
/
v0
/
channels
/
{channelId}
删除 Channel
curl --request DELETE \
--url https://agent-api.bigmodel.cn/api/agent/forward/v0/channels/{channelId} \
--header 'Authorization: Bearer <token>' \
--header 'zai-beta: <zai-beta>' \
--header 'zai-version: <zai-version>'import requests
url = "https://agent-api.bigmodel.cn/api/agent/forward/v0/channels/{channelId}"
headers = {
"zai-version": "<zai-version>",
"zai-beta": "<zai-beta>",
"Authorization": "Bearer <token>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {
'zai-version': '<zai-version>',
'zai-beta': '<zai-beta>',
Authorization: 'Bearer <token>'
}
};
fetch('https://agent-api.bigmodel.cn/api/agent/forward/v0/channels/{channelId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.delete("https://agent-api.bigmodel.cn/api/agent/forward/v0/channels/{channelId}")
.header("zai-version", "<zai-version>")
.header("zai-beta", "<zai-beta>")
.header("Authorization", "Bearer <token>")
.asString();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://agent-api.bigmodel.cn/api/agent/forward/v0/channels/{channelId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("zai-version", "<zai-version>")
req.Header.Add("zai-beta", "<zai-beta>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://agent-api.bigmodel.cn/api/agent/forward/v0/channels/{channelId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"zai-beta: <zai-beta>",
"zai-version: <zai-version>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"id": "channel_xxx",
"deleted": true
}{
"type": "error",
"error": {
"type": "not_found_error",
"message": "资源不存在、已删除或不属于当前账号。",
"details": {}
},
"request_id": "req_xxx"
}{
"type": "error",
"error": {
"type": "rate_limit_error",
"message": "账号或全局请求频率超限。",
"details": {}
},
"request_id": "req_xxx"
}已有 Managed Session、Memory Store、审计记录和已挂载资源保留。已发出的远端请求可能已在平台侧完成;删除后原连接处理方不会继续登记结果或回复,不能把删除视为远端请求已取消。
复用飞书、企业微信或钉钉机器人前,先完成旧 Channel 删除并释放绑定,再用合法凭据创建新 Channel。复用个人微信绑定账号时,需要重建 Channel 并重新扫码,不能导入旧 token。新 Channel 使用新 ID,不自动迁移旧 Session 或历史。
成功 200 返回
请求示例
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"
{ "id": "channel_xxx", "deleted": true }。不存在、已删除或不属于当前账号返回 404,重复删除也返回 404。限流规则见创建 Channel。Authorizations
标准的 HTTP Bearer 认证方式,在 API Keys 页面获取密钥。
Headers
Was this page helpful?