---
title: "Clean up terminated session workspaces"
method: POST
path: "/api/v1/sessions/cleanup"
tags: ["sessions"]
---

# Clean up terminated session workspaces

`POST /api/v1/sessions/cleanup`

## Query parameters

- `project` string — Project id filter. When omitted, clean terminated sessions across all projects.

## Response `200`

OK

- CleanupSessionsResponse
  - `alreadyGone` string[], required
  - `cleaned` string[], required
  - `ok` boolean, required
  - `skipped` CleanupSkippedSession[], required
    - `reason` string, required
    - `sessionId` string, required

## Other responses

- `500` — Internal Server Error
- `501` — Not Implemented

## Changes

- **2026-09-06** `15e91b9272f3` — 1 info
  - added the required property `alreadyGone` to the response with the `200` status
- **2026-09-03** `d31a2d019c47` — 2 info
  - added the optional property `reporting_owner` to the response with the `500` status
  - added the optional property `reporting_owner` to the response with the `501` status
- **2026-06-11** `9e535c29fe69` — 1 info
  - added the required property `skipped` to the response with the `200` status
- **2026-06-10** `b64f5ab46d87` — 1 breaking
  - removed the required property `skipped` from the response with the `200` status

[Change history](https://skmtc.dev/composiohq/apis/agent-orchestrator-http-daemon/changes/api/v1/sessions/cleanup/post.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/36b3a9d49c3e?raw)
