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

# アイデンティティを削除する

> Forward アイデンティティをソフト削除します。

`DELETE /api/v1/forward/identities/{identity_id}`

Identity を削除済みとしてマークすることで削除します。過去のセッション、イベント、監査レコードはカスケード削除されません。

## Headers

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

## Path parameters

| Parameter     | Type   | Required | Description          |
| ------------- | ------ | -------- | -------------------- |
| `identity_id` | string | Yes      | Forward Identity ID。 |

## Example request

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

## Example response

**HTTP 200 OK**

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

## Response fields

| Field     | Type    | Description                  |
| --------- | ------- | ---------------------------- |
| `id`      | string  | 削除された Identity ID。           |
| `deleted` | boolean | Identity が削除済みとしてマークされたかどうか。 |

## Errors

| HTTP | Type                   | Trigger                         |
| ---- | ---------------------- | ------------------------------- |
| 401  | `authentication_error` | PAT が無効または期限切れです。               |
| 404  | `not_found_error`      | Identity が存在しないか、呼び出し元に表示されません。 |
| 409  | `conflict_error`       | Identity は現在の状態では削除できません。       |

## Notes

* 削除されたアイデンティティを使用して新しいセッションを作成することはできません。
* 削除は現在ソフト削除として実装されています。

## Related

<CardGroup cols={2}>
  <Card title="アイデンティティ一覧を取得する" icon="list" href="/cloud-agents/api/forward/identities/list" />

  <Card title="アイデンティティを作成する" icon="plus" href="/cloud-agents/api/forward/identities/create" />
</CardGroup>
