# List Failed Runs

Find every run that failed, across all workflows, in one call: when it ran, which step it stopped at (activeStepId) and the error (summary). Newest first. Narrow it to one workflow with workflowId, and to a time range with from and before; without them it covers all kept run history, about the last 30 days. It takes no field filters, where or sort. Page with limit and offset (offset up to 10,000) while meta.pagination.hasNextPage is true; totalCount is exact only on the last page. For the failed runs behind one day of List Workflow Activity, send from=2026-11-20&before=2026-11-21. When acting in another organization, Embedded runs are excluded.

`GET https://connect.mindcloud.co/v2/failed-runs`

Permissions: `log:view`.

## Parameters

### Headers

- `X-Company-Id` (string): Optional. The id of the organization to act in. Leave it out to act in the API key's own organization. A key can also act in its child organizations, and, with "Use this key across all of your organizations" on, in every organization its creator can open in the app. List them with GET /v2/companies. Every response's X-Company-Id header names the organization it acted in. See [Organizations](https://mindcloud.co/docs/api/rest/introduction/organizations).

### Query

- `workflowId` (string): Only runs of this workflow, from List Workflows.
- `from` (string): Only runs that started at or after this time: YYYY-MM-DD (midnight UTC) or an ISO 8601 date-time with a zone.
- `before` (string): Only runs that started before this time: YYYY-MM-DD (midnight UTC) or an ISO 8601 date-time with a zone.

## Example request

```bash
curl --request GET \
  --url 'https://connect.mindcloud.co/v2/failed-runs?workflowId=Wq3kZ8pLx2Nb&from=2026-11-01&before=2026-11-23T12%3A00%3A00Z' \
  --header 'Authorization: Bearer $MINDCLOUD_API_TOKEN'
```

## Response fields

- `id` (string): Unique id of the run. Use List Run Steps for every step it ran.
- `workflowId` (string): The workflow this run belongs to, from List Workflows.
- `workflowName` (string): The workflow's current name.
- `version` (string): The workflow version that ran, or "draft".
- `environmentId` (string): The environment the run targeted, from List Environments.
- `environmentName` (string): That environment's name.
- `startedOn` (date): When the run started. The list is newest first.
- `finishedOn` (date): When the run stopped.
- `durationMs` (number): How long the run took, in milliseconds.
- `operations` (number): How many tasks the run used before it stopped.
- `activeStepId` (string): The step the run stopped at (a stepId). Inside a branch or loop, the step in it that failed. To see its input and response, find the entry with this stepId and success false in List Run Steps, then pass its stepInstanceId to Get a Run Step.
- `summary` (string): Why the run stopped, in a sentence: the step name and the error it returned, for example: Workflow stopped after step "Search Tickets" failed: 429_TOO_MANY_REQUESTS.
- `endUserId` (string): The embedded end user the run belongs to, if any.
- `installationId` (string): The embedded installation the run belongs to, if any.

## Errors

- 400 A field filter, where or sort was sent (UNKNOWN_FILTER_FIELD): `VALIDATION_FAILED` / `UNKNOWN_FILTER_FIELD` "Cannot filter on "environmentId". This list takes no field filters. Use its parameters instead: workflowId, from, before."
- 400 A time range or offset that is not valid (INVALID_QUERY): `VALIDATION_FAILED` / `INVALID_QUERY` ""from" (2026-11-20) must be earlier than "before" (2026-11-01)."
