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

# Session の削除

> Session を削除します。

`DELETE /api/v1/cloud/sessions/{session_id}`

Session を削除し、削除確認を返します。

## パスパラメータ

| パラメータ        | 型      | 説明                            |
| ------------ | ------ | ----------------------------- |
| `session_id` | string | `sess_` プレフィックスを持つ Session ID |

## ヘッダー

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

## リクエスト例

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

## レスポンス例

**HTTP 200 OK**

```json theme={null}
{
  "id": "sess_019e3bb1e8c171fd9abbb1477ffb84cc",
  "type": "session_deleted"
}
```

削除の成功は、レスポンスボディの `"type": "session_deleted"` で示されます。

## エラー

| HTTP | Type                   | 発生条件           |
| ---- | ---------------------- | -------------- |
| 401  | `authentication_error` | PAT が無効または期限切れ |
| 404  | `not_found_error`      | Session が存在しない |

**HTTP 404 Not Found**

```json theme={null}
{
  "type": "error",
  "request_id": "cb80235f-76a2-4ff3-9e28-5aa2da12dc14",
  "error": {
    "type": "not_found_error",
    "message": "Session 'sess_does_not_exist_0000000000000000000000000000' was not found."
  }
}
```

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