---
title: "Permanently delete a terminated session whose workspace is released"
method: DELETE
path: "/api/v1/sessions/{sessionId}"
tags: ["sessions"]
---

# Permanently delete a terminated session whose workspace is released

`DELETE /api/v1/sessions/{sessionId}`

## Request

- Base URL: `http://127.0.0.1:3001`
- URL: `http://127.0.0.1:3001/api/v1/sessions/{sessionId}`
- Auth: none declared
- TypeScript: <https://skmtc.dev/composiohq/apis/agent-orchestrator-http-daemon/docs/api/v1/sessions/:sessionId/delete.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `sessionId` string, required: Session identifier, e.g. project-1.

## Query parameters

- `cleanup` boolean: When true, a worktree that is still on disk is cleaned up first, the way session cleanup does it; a dirty or locked worktree is never forced and refuses the delete.

## Response `200`

OK

- DeleteSessionResponse
  - `ok` boolean, required
  - `sessionId` string, required

## Other responses

- `404`: Not Found
- `409`: Conflict
- `500`: Internal Server Error
- `501`: Not Implemented

## Changes

- **2026-11-02** `7f548a184806`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/composiohq/apis/agent-orchestrator-http-daemon/changes/api/v1/sessions/:sessionId/delete.md)

---

[API](https://skmtc.dev/composiohq/apis/agent-orchestrator-http-daemon.md) - [All operations](https://skmtc.dev/composiohq/apis/agent-orchestrator-http-daemon/llms.txt) - [OpenAPI document](https://skmtc.dev/composiohq/apis/agent-orchestrator-http-daemon/revisions/8fdf65524fe3?raw)
