Skip to main content
POST /api/v1/forward/channels Creates a channel instance for an external messaging platform. The channel receives inbound IM messages and sends replies through the configured provider.

Headers

HeaderRequiredDescription
AuthorizationYesBearer <PAT>
Content-TypeYesapplication/json
Idempotency-KeyNoOptional idempotency key for unsafe requests.

Body parameters

ParameterTypeRequiredDescription
identity_idstringYesForward Identity ID. Must belong to the caller and be enabled.
template_idstringYesForward Template ID used when the channel creates sessions.
channel_typestringYesChannel type. Currently supports wechat, wecom, feishu, and dingtalk.
namestringNoChannel display name.
channel_config.credentialsobjectConditionalChannel runtime credentials. QR authorization channels may omit it. Direct credential channels use provider-specific fields: feishu uses app_id/app_secret, dingtalk uses client_id/client_secret, and wecom uses bot_id/secret. Credentials are not returned in plaintext.
channel_config.response_optionsobjectNoReply visibility settings.

Example request

curl -s -X POST 'https://api.qoder.com/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_id": "...",
        "app_secret": "..."
      },
      "response_options": {
        "include_tool_calls": false,
        "include_thinking": false
      }
    }
  }'

Example response

HTTP 201 Created
{
  "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"
}

Response fields

FieldTypeDescription
idstringChannel ID. Example prefix is channel_.
typestringAlways channel.
identity_idstringBound Forward Identity ID.
template_idstringBound Forward Template ID.
channel_typestringExternal channel type.
enabledbooleanManual enable or disable switch.
binding_statusstringunbound, bound, or expired.
channel_config.response_optionsobjectReply visibility settings.

Errors

HTTPTypeCodeTrigger
400invalid_request_errorchannel_type_unsupportedChannel type is unsupported.
404not_found_errorchannel_template_not_foundTemplate does not exist or is not visible.
404not_found_errorchannel_identity_not_foundIdentity does not exist or is not visible.
409conflict_errorchannel_identity_disabledIdentity is disabled.
409conflict_errorchannel_auth_requiredRequired credentials or QR authorization are missing.
502api_errorchannel_auth_failedUnderlying channel authorization failed.

Notes

  • New channels default to enabled=true.
  • A channel can process inbound messages only when enabled=true and binding_status="bound".
  • To pause inbound processing temporarily, prefer Update Channel with enabled=false.

Create channel QR session

List channels