> ## 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.

# ファイルの削除

> ファイルを削除します。

`DELETE /api/v1/cloud/files/{file_id}`

ファイルを削除し、削除確認を返します。

## パスパラメータ

| パラメータ     | 型      | 説明                       |
| --------- | ------ | ------------------------ |
| `file_id` | string | ファイル ID（`file_` プレフィックス） |

## ヘッダー

| ヘッダー          | 必須 | 説明                  |
| ------------- | -- | ------------------- |
| Authorization | はい | `Bearer $QODER_PAT` |

## リクエスト例

```bash theme={null}
curl -X DELETE https://api.qoder.com/api/v1/cloud/files/file_019e3bb8c1387743bf4ef115aae5acb1 \
  -H "Authorization: Bearer $QODER_PAT"
```

## レスポンス例

**HTTP 200 OK**

```json theme={null}
{
  "id": "file_019e3bb8c1387743bf4ef115aae5acb1",
  "type": "file_deleted"
}
```

削除が成功すると、レスポンスボディの `"type": "file_deleted"` で通知されます。

## エラーレスポンス

| HTTP | type                   | 説明                           |
| ---- | ---------------------- | ---------------------------- |
| 401  | `authentication_error` | 認証トークンが欠落または無効               |
| 404  | `not_found_error`      | ファイルが存在しない                   |
| 409  | `conflict_error`       | ファイルがアクティブなリソースから引き続き参照されている |

[エラー](/ja/cloud-agents/api/conventions/errors)で完全なエラーエンベロープを参照してください。

## 関連項目

<CardGroup cols={2}>
  <Card title="ファイルの添付とダウンロード" icon="paperclip" href="/ja/cloud-agents/files">
    Agent にコンテキストを提供するファイルをアップロードし、Agent が生成したファイルをダウンロードします。
  </Card>
</CardGroup>
