> ## 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 an identity

> Soft-delete a Forward identity.

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

Deletes an Identity by marking it deleted. Historical sessions, events, and audit records are not cascade-deleted.

## 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  | Deleted Identity ID.                     |
| `deleted` | boolean | Whether the Identity was marked deleted. |

## Errors

| HTTP | Type                   | Trigger                                                  |
| ---- | ---------------------- | -------------------------------------------------------- |
| 401  | `authentication_error` | PAT invalid or expired.                                  |
| 404  | `not_found_error`      | Identity does not exist or is not visible to the caller. |
| 409  | `conflict_error`       | Identity cannot be deleted in its current state.         |

## Notes

* Deleted identities cannot be used to create new sessions.
* Delete is currently implemented as a soft delete.

## Related

<CardGroup cols={2}>
  <Card title="List identities" icon="list" href="/cloud-agents/api/forward/identities/list" />

  <Card title="Create an identity" icon="plus" href="/cloud-agents/api/forward/identities/create" />
</CardGroup>
