> ## 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 を削除します。

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

不要になった Channel を削除します。

## Headers

| Header          | Required | Description    |
| --------------- | -------- | -------------- |
| `Authorization` | Yes      | `Bearer <PAT>` |

## Path parameters

| Parameter    | Type   | Required | Description                          |
| ------------ | ------ | -------- | ------------------------------------ |
| `channel_id` | string | Yes      | チャネル ID。Channel オブジェクトの `id` と同じ値です。 |

## Example request

```bash theme={null}
curl -s -X DELETE 'https://api.qoder.com/api/v1/forward/channels/channel_019eabc123' \
  -H "Authorization: Bearer $QODER_PAT"
```

## Example response

**HTTP 200 OK**

```json theme={null}
{
  "id": "channel_019eabc123",
  "deleted": true
}
```

## Response fields

| Field     | Type    | Description                |
| --------- | ------- | -------------------------- |
| `id`      | string  | 削除された Channel ID。          |
| `deleted` | boolean | 削除が成功したかどうか。成功時は常に `true`。 |

## Deletion rules

* 削除後、Channel は受信メッセージを処理せず、QR バインディングを継続できず、チャネル返信を送信できなくなります。
* 削除は取り消せません。受信処理を一時的に停止するには、Update Channel で `enabled=false` を使用してください。

## Errors

| HTTP | Type                   | Code | Trigger                         |
| ---- | ---------------------- | ---- | ------------------------------- |
| 401  | `authentication_error` | -    | PAT が無効、期限切れ、または欠落しています。        |
| 404  | `not_found_error`      | -    | Channel が存在しないか、呼び出し元から参照できません。 |
| 502  | `api_error`            | -    | Channel の削除に失敗しました。             |

## Related

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

  <Card title="チャネルの更新" icon="pencil" href="/cloud-agents/api/forward/channels/update" />
</CardGroup>
