> This page is for version v2024-12-23.
> For other versions, use one of these documentation indexes:
> - v2026-02-09 (default): https://docs.extend.ai/2026-02-09/llms.txt
> - v2025-04-21: https://docs.extend.ai/2025-04-21/llms.txt
> - v2024-12-23: https://docs.extend.ai/2024-12-23/llms.txt

> ## Documentation Index
> Fetch the complete documentation index at: https://docs.extend.ai/llms.txt
> Use this file to discover all available pages before exploring further.
>
> ## API version
> The current API version is `2026-02-09`, served at the site root (no version prefix in URLs).
> If this page URL contains `/2025-04-21/` or `/2024-12-23/`, you are reading an older API version.
> Prefer the current docs at https://docs.extend.ai/llms.txt unless the user explicitly needs that older version.
> Do not treat older-version pages as the source of truth for new integrations.

# List Workflow Runs

This endpoint allows you to fetch the runs of a given [workflow](/2024-12-23/developers/objects/workflow).

This endpoint returns a paginated response. You can use the `nextPageToken` to fetch subsequent pages.

Each workflow run object contains a *summary* of the run. Full details are available by calling the [Get WorkflowRun](/2024-12-23/developers/workflow-endpoints/workflow-run) endpoint.

### Query Parameters

**`status`** `string`

Filters workflow runs by their status.

Possible values include:

* `PENDING`
* `PROCESSING`
* `NEEDS_REVIEW`
* `REJECTED`
* `PROCESSED`
* `FAILED`

---

**`workflowId`** `string`

Filters workflow runs by the workflow ID.

---

**`batchId`** `string`

Filters workflow runs by the batch ID. This is useful for fetching all runs for a given batch created via the [Batch Run Workflow](/2024-12-23/developers/workflow-endpoints/batch-run-workflow) endpoint.

---

**`sortBy`** — default: updatedAt

Sorts the workflow runs by the given field.

Possible values include:

* `updatedAt`
* `createdAt`

---

**`sortDir`** — default: desc

Sorts the workflow runs in ascending or descending order.

Possible values include:

* `asc`: sort in ascending order
* `desc`: sort in descending order

---

**`nextPageToken`**

The token used to fetch the page of results from a previous request.

**Note**: if parameters other than `nextPageToken` change in subsequent requests, you are likely to receive incomplete results.

---

**`maxPageSize`** — default: 10

The maximum number of results to return per page.

You are not guaranteed to receive this many results per page, but you will not receive more than this.

* Max: 1000
* Min: 1

---

### Response

**`success`** `boolean`

A true or false value indicating whether the request was successful or not.

---

**`workflowRuns`** `array`

An array of [WorkflowRun summary](/2024-12-23/developers/objects/workflow-run-summary)
objects.

---

**`nextPageToken`** `string`

The token used to fetch the next page of results.

If there are no more pages, the token will not be present.

The general pattern for collecting all results is to keep calling the endpoint with the `nextPageToken` and the same parameters, until the token is not present, for example:

```
workflow_runs = []
token = None
while True:
  response = list_workflow_runs(nextPageToken=token)
  workflow_runs.extend(response.workflowRuns)
  token = response.nextPageToken
  if not token:
    break
```

---

### Error Responses

**`success`** `boolean`

Will be `false` if the request failed.

---

**`error`** `string`

A description of the error that occurred.

---

#### Possible Errors

* **404 Not Found**: If the specified workflow does not exist.
* **400 Bad Request**: If invalid query parameters are provided.

```curl
curl --request GET \
  --url https://api-prod.extend.app/workflow_runs \
  --header 'Authorization: Bearer <token>'
```

```python
import requests

url = "https://api-prod.extend.app/workflow_runs"

headers = {"Authorization": "Bearer <token>"}

response = requests.request("GET", url, headers=headers)

print(response.text)
```

```javascript
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api-prod.extend.app/workflow_runs', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
```

```php
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api-prod.extend.app/workflow_runs",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <token>"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api-prod.extend.app/workflow_runs"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```java
HttpResponse<String> response = Unirest.get("https://api-prod.extend.app/workflow_runs")
  .header("Authorization", "Bearer <token>")
  .asString();
```

**`Example Success Response`**

```json Example Success Response
{
  "success": true,
  "nextPageToken": "abc123",
  "workflowRuns": [
  {
    "id": "workflow_run_1234",
    "status": "PROCESSED",
    "initialRunAt": "2023-01-01T09:41:00.000Z",
    "reviewedByUser": "user@example.com",
    "reviewedAt": "2023-01-10T05:39:14.500Z",
    "startTime": "2023-01-01T09:41:00.000Z",
    "endTime": "2023-01-10T05:39:24.500Z",
    "workflowId": "workflow_1234",
    "workflowName": "My Workflow",    
    "workflowVersionId": "workflow_version_1234",
    "batchId": "batch_1234",
    "rejectionNote": "This workflow run was rejected because it was not valid.",
    "createdAt": "2023-01-01T09:41:00.000Z",
    "updatedAt": "2023-01-10T05:39:24.500Z"
  },
  {
    "id": "workflow_run_1235",
    "status": "FAILED",
    "initialRunAt": "2023-01-01T09:41:00.000Z",
    "reviewedByUser": "user@example.com",
    "reviewedAt": "2023-01-10T05:39:14.500Z",
    "startTime": "2023-01-01T09:41:00.000Z",
    "endTime": "2023-01-10T05:39:24.500Z",
    "workflowId": "workflow_1234",
    "workflowName": "My Workflow",    
    "workflowVersionId": "workflow_version_1234",
    "batchId": "batch_1234",
    "rejectionNote": "This workflow run was rejected because it was not valid.",
    "createdAt": "2023-01-01T09:41:00.000Z",
      "updatedAt": "2023-01-10T05:39:24.500Z"
    }
  ]
}
```