Create an external IM channel bound to an Identity and Template.
Request headers
|
Header |
Required |
Description |
|
|
Yes |
|
|
|
Yes |
|
|
|
No |
Optional idempotency key for unsafe requests. |
Request body
|
Parameter |
Type |
Required |
Description |
|
|
string |
Yes |
Forward Identity ID. Must belong to the caller and be enabled. |
|
|
string |
Yes |
Forward Template ID used when the channel creates sessions. |
|
|
string |
Yes |
Channel type. Supported values: |
|
|
string |
No |
Channel display name. |
|
|
object |
Conditional |
Required for token or app-credential channels. QR authorization channels may omit it and activate later. |
|
|
object |
No |
Reply visibility settings. |
Example request
curl -s -X POST 'https://api.qoder.com.cn/api/v1/forward/channels' \
-H "Authorization: Bearer $QODER_PAT" \
-H "Content-Type: application/json" \
-d '{
"identity_id": "idn_019eabc123",
"template_id": "tmpl_support",
"channel_type": "feishu",
"name": "Support Feishu channel",
"channel_config": {
"credentials": {
"app_key": "...",
"app_secret": "..."
},
"response_options": {
"include_tool_calls": false,
"include_thinking": false
}
}
}'
Example response
HTTP 201 Created
{
"id": "ci_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"
}
Response fields
|
Field |
Type |
Description |
|
|
string |
Channel ID. Example prefix is |
|
|
string |
Always |
|
|
string |
Bound Forward Identity ID. |
|
|
string |
Bound Forward Template ID. |
|
|
string |
External channel type. |
|
|
boolean |
Manual enable or disable switch. |
|
|
string |
|
|
|
object |
Reply visibility settings. |
Errors
|
HTTP |
Type |
Code |
Trigger |
|
400 |
|
|
Channel type is unsupported. |
|
401 |
|
|
PAT is invalid or expired. |
|
404 |
|
|
Template does not exist or is not visible. |
|
404 |
|
|
Identity does not exist or is not visible. |
|
409 |
|
|
Identity is disabled. |
|
409 |
|
|
Required credentials or QR authorization are missing. |
|
502 |
|
|
Underlying channel authorization failed. |
Notes
-
user_idis derived internally from authentication and is never exposed. -
New channels default to
enabled=true. -
A channel can process inbound messages only when
enabled=trueandbinding_status="bound". -
Deleting or archiving channels is not supported. Disable a channel via Update channel instead.