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

# チャネルの更新

> Channel の紐づけ、表示名、有効状態、または返信オプションを更新します。

`POST /api/v1/forward/channels/{channel_id}`

merge-patch セマンティクスを使用します。省略されたフィールドは変更されません。

## Headers

| Header            | Required | Description             |
| ----------------- | -------- | ----------------------- |
| `Authorization`   | Yes      | `Bearer <PAT>`          |
| `Content-Type`    | Yes      | `application/json`      |
| `Idempotency-Key` | No       | 安全でないリクエスト向けの任意のべき等性キー。 |

## Path parameters

| Parameter    | Type   | Required | Description |
| ------------ | ------ | -------- | ----------- |
| `channel_id` | string | Yes      | チャネル ID。    |

## Body parameters

| Parameter                         | Type    | Required | Description                  |
| --------------------------------- | ------- | -------- | ---------------------------- |
| `name`                            | string  | No       | チャネルの表示名。                    |
| `identity_id`                     | string  | No       | 新たに紐づける Forward Identity ID。 |
| `template_id`                     | string  | No       | 新たに紐づける Forward Template ID。 |
| `enabled`                         | boolean | No       | 手動での有効化・無効化スイッチ。             |
| `channel_config.response_options` | object  | No       | 返信の表示設定。                     |

## Example request

```bash theme={null}
curl -s -X POST 'https://api.qoder.com/api/v1/forward/channels/channel_019eabc123' \
  -H "Authorization: Bearer $QODER_PAT" \
  -H "Content-Type: application/json" \
  -d '{
    "enabled": false,
    "channel_config": {
      "response_options": {
        "include_tool_calls": true,
        "include_thinking": false
      }
    }
  }'
```

## Example response

**HTTP 200 OK**

```json theme={null}
{
  "id": "channel_019eabc123",
  "type": "channel",
  "identity_id": "idn_019eabc123",
  "template_id": "tmpl_support",
  "channel_type": "feishu",
  "name": "Support Feishu channel",
  "enabled": false,
  "binding_status": "bound",
  "channel_config": {
    "response_options": {
      "include_tool_calls": true,
      "include_thinking": false
    }
  },
  "created_at": "2026-06-18T10:00:00Z",
  "updated_at": "2026-06-18T10:30:00Z"
}
```

## Response fields

更新後の Channel オブジェクトを返します。

## Errors

| HTTP | Type                    | Code                         | Trigger                  |
| ---- | ----------------------- | ---------------------------- | ------------------------ |
| 400  | `invalid_request_error` | `invalid_request`            | リクエストボディが無効です。           |
| 404  | `not_found_error`       | `channel_not_found`          | Channel が存在しません。         |
| 404  | `not_found_error`       | `channel_template_not_found` | 新しい Template が存在しません。    |
| 404  | `not_found_error`       | `channel_identity_not_found` | 新しい Identity が存在しません。    |
| 409  | `conflict_error`        | `channel_identity_disabled`  | 新しい Identity が無効になっています。 |

## Notes

* `id`、`type`、`channel_type` は更新できません。
* `binding_status` はシステムによって維持されます。
* `enabled=true` は手動スイッチを開くだけです。`binding_status` は変更されません。
* `identity_id` または `template_id` を更新すると、既存の会話バインディングの再利用が停止する場合があります。新しい受信メッセージは新しいバインディングを使用します。

## Related

<CardGroup cols={2}>
  <Card title="チャネルの取得" icon="file-lines" href="/cloud-agents/api/forward/channels/get" />

  <Card title="チャネルの一覧取得" icon="list" href="/cloud-agents/api/forward/channels/list" />
</CardGroup>
