---
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
  - `cleaned` string[], required
  - `ok` boolean, required
  - `skipped` CleanupSkippedSession[], required
    - `reason` string, required
    - `sessionId` string, required

## Other responses

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

---

[API](https://skmtc.net/composiohq/apis/agent-orchestrator-http-daemon.md) · [All operations](https://skmtc.net/composiohq/apis/agent-orchestrator-http-daemon/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/composiohq/agent-orchestrator-http-daemon/versions/be069344383f/schema)
