---
title: "End chat session"
method: DELETE
path: "/agent/v2/chat/{id}"
tags: ["Agents"]
---

# End chat session

`DELETE /agent/v2/chat/{id}`

Terminates the active Daytona runtime (if any), then marks the chat as ended.

## Path parameters

- `id` string, required

## Response `200`

Chat ended

- object
  - `id` string
  - `status` string
  - `provider` string, nullable
  - `runtimeId` string, nullable
  - `runtimeMs` integer
  - `cost` number

## Other responses

- `401` — Invalid API key
- `403` — No agent access or non-API-key auth
- `404` — Chat not found

## Changes

- **2026-03-27** `220d723a75ba` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/casemark/apis/case-dev-api/changes/agent/v2/chat/:id/delete.md)

---

[API](https://skmtc.dev/casemark/apis/case-dev-api.md) · [All operations](https://skmtc.dev/casemark/apis/case-dev-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/casemark/case-dev-api/revisions/9579fb47836b/schema)
