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

# End chat session

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

Snapshots and terminates the active sandbox (if any), then marks the chat as ended.

## Path parameters

- `id` string, required

## Response `200`

Chat ended

- object
  - `id` string
  - `status` string
  - `snapshotImageId` 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

---

[API](https://skmtc.net/casemark/apis/case-dev-api.md) · [All operations](https://skmtc.net/casemark/apis/case-dev-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/casemark/case-dev-api/versions/5b7e64e6d6f9/schema)
