---
title: "Close Stale Flow Executions"
method: POST
path: "/v1/admin_console/cleanup/close_stale_flow_executions"
tags: ["admin_console", "cleanup"]
---

# Close Stale Flow Executions

`POST /v1/admin_console/cleanup/close_stale_flow_executions`

## Request

- Base URL: `https://api.linktodm.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.linktodm.com/v1/admin_console/cleanup/close_stale_flow_executions`
- Auth: none declared

Cancel all RUNNING flow executions older than the given number of hours.

## Query parameters

- `older_than_hrs` integer: Cancel RUNNING executions started more than this many hours ago

## Headers

- `x-admin-api-key` string, nullable

## Response `200`

Successful Response

- CloseStaleFlowExecutionsResponse
  - `closed_executions` integer, required
  - `older_than_hrs` integer, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/linktodm/apis/salesmorph.md) - [All operations](https://skmtc.dev/linktodm/apis/salesmorph/llms.txt) - [OpenAPI document](https://skmtc.dev/linktodm/apis/salesmorph/revisions/4af0ad5dbe92?raw)
