---
title: "Delete persistent session"
method: DELETE
path: "/v1/projects/{project_id}/sessions/{environment_id}/{session_id}"
tags: ["sessions"]
---

# Delete persistent session

`DELETE /v1/projects/{project_id}/sessions/{environment_id}/{session_id}`

## Request

- Base URL: `https://api.connic.co`
- URL: `https://api.connic.co/v1/projects/{project_id}/sessions/{environment_id}/{session_id}`
- Auth: HTTP bearer

Permanently delete a persistent agent session and its event history. When both `app_name` and `user_id` are non-empty, only that exact session is deleted. Otherwise, every non-internal session with this session ID in the environment is deleted.

Required permission: `retrieval.manage`.

## Path parameters

- `project_id` string, uuid, required
- `environment_id` string, uuid, required
- `session_id` string, required

## Query parameters

- `app_name` string, nullable: Agent application name. Used for exact targeting only when it and user_id are both non-empty.
- `user_id` string, nullable: Agent user identity. Used for exact targeting only when it and app_name are both non-empty.

## Response `200`

Successful Response

- PublicOkResponse
  - `ok` boolean, required: Whether the operation succeeded.

## Other responses

- `401`: Missing or invalid API key.
- `403`: The API key lacks the required permission or access to the environment.
- `404`: The resource does not exist in this project.
- `422`: Validation Error
- `429`: Rate limit exceeded.

---

[API](https://skmtc.dev/connic/apis/connic-api.md) · [All operations](https://skmtc.dev/connic/apis/connic-api/llms.txt) · [OpenAPI document](https://skmtc.dev/connic/apis/connic-api/revisions/482932da5fbe?raw)
