メインコンテンツへスキップ
POST /api/v1/forward/channels 外部メッセージングプラットフォーム向けのチャネルインスタンスを作成します。チャネルは受信 IM メッセージを受け取り、設定されたプロバイダーを通じて返信を送信します。

Headers

HeaderRequiredDescription
AuthorizationYesBearer <PAT>
Content-TypeYesapplication/json
Idempotency-KeyNo安全でないリクエスト向けの任意のべき等性キー。

Body parameters

ParameterTypeRequiredDescription
identity_idstringYesForward Identity ID。呼び出し元に属し、有効になっている必要があります。
template_idstringYesチャネルがセッションを作成する際に使用する Forward Template ID。
channel_typestringYesチャネルタイプ。現在は wechatwecomfeishudingtalk をサポートします。
namestringNoチャネルの表示名。
channel_config.credentialsobjectConditionalチャネルの実行時認証情報。QR 認可チャネルでは省略できます。直接認証情報を使うチャネルはプロバイダー固有のフィールドを使用します。feishuapp_id/app_secretdingtalkclient_id/client_secretwecombot_id/secret を使用します。認証情報は平文では返されません。
channel_config.response_optionsobjectNo返信の表示設定。

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
idstringチャネル ID。プレフィックスの例は channel_ です。
typestring常に channel
identity_idstring紐づけられた Forward Identity ID。
template_idstring紐づけられた Forward Template ID。
channel_typestring外部チャネルタイプ。
enabledboolean手動での有効化・無効化スイッチ。
binding_statusstringunboundbound、または expired
channel_config.response_optionsobject返信の表示設定。

Errors

HTTPTypeCodeTrigger
400invalid_request_errorchannel_type_unsupportedチャネルタイプがサポートされていません。
404not_found_errorchannel_template_not_foundTemplate が存在しないか、参照できません。
404not_found_errorchannel_identity_not_foundIdentity が存在しないか、参照できません。
409conflict_errorchannel_identity_disabledIdentity が無効になっています。
409conflict_errorchannel_auth_required必要な認証情報または QR 認可が不足しています。
502api_errorchannel_auth_failed基盤となるチャネルの認可に失敗しました。

Notes

  • 新規チャネルはデフォルトで enabled=true になります。
  • チャネルが受信メッセージを処理できるのは、enabled=true かつ binding_status="bound" の場合のみです。
  • 受信処理を一時的に停止するには、Update Channel で enabled=false を指定することをおすすめします。

チャネル QR セッションの作成

チャネルの一覧取得