# List runs

**GET** `/api/embed/v1/accounts/{accountId}/runs`

Lists an account’s production runs, newest first. Never step data.

Needs a partner key: `Authorization: Bearer gre_…`, from [Platform › Partner keys](https://docs.gorunner.io/embed/platform-screens#partner-keys). Call it from your server only.

Embed · Self-hosted with an Embed license

## Parameters

### Path

- `accountId` · Required · string: Your ID for the customer’s account: 1 to 255 bytes of UTF-8, case-sensitive. URL-encode it: it may contain `/`.

### Query

- `workspaceId` · Optional · string: Only this workspace, by your ID. Left out: every workspace.
- `workflowId` · Optional · UUID: Only this workflow’s runs.
- `status` · Optional · string: `queued`, `running`, `held`, `worked`, `failed` or `cancelled`.
- `from` · Optional · time: Runs started at or after this time.
- `to` · Optional · time: Runs started before this time.
- `cursor` · Optional · string: The `pagination.nextCursor` of the page before. Left out: the first page.
- `limit` · Optional · integer: Rows a page, 1 to 100. The default is 50.

## What is listed

Runs started by a trigger, in production. A run a sub-flow step started is part of the run that called it, not listed apart. `error` is the failure’s sentence; `failure` names the step.

## Responses

- 200 OK

  A page of runs.

- 400 `VALIDATION_ERROR`

  A parameter isn’t valid.

- 404 `NOT_FOUND`

  No such account or workspace.

- 500 `INTERNAL_ERROR`

  Something failed on the installation’s side. Try again.

Any call can also answer: [`401 UNAUTHORIZED`](https://docs.gorunner.io/errors#UNAUTHORIZED) · [`403 EMBED_NOT_LICENSED`](https://docs.gorunner.io/errors#EMBED_NOT_LICENSED) · [`403 IP_NOT_ALLOWED`](https://docs.gorunner.io/errors#IP_NOT_ALLOWED) · [`429 RATE_LIMITED`](https://docs.gorunner.io/errors#RATE_LIMITED) · [`503 BUSY`](https://docs.gorunner.io/errors#BUSY). See [Errors](https://docs.gorunner.io/embed/api#errors).

Request

**curl**

```bash
GORUNNER="https://automations.example.com"
GORUNNER_EMBED_KEY="YOUR_PARTNER_KEY"  # gre_…
ACCOUNT_ID="acct-bakery"

URL="$GORUNNER/api/embed/v1/accounts/$ACCOUNT_ID/"
URL="${URL}runs?status=failed"
curl "$URL" \
  -H "Authorization: Bearer $GORUNNER_EMBED_KEY"
```

**JavaScript**

```js
const GORUNNER = "https://automations.example.com";
const KEY = process.env.GORUNNER_EMBED_KEY; // gre_…
const ACCOUNT_ID = encodeURIComponent("acct-bakery");

const res = await fetch(
  `${GORUNNER}/api/embed/v1/accounts/` +
    `${ACCOUNT_ID}/runs?status=failed`,
  {
    headers: { Authorization: `Bearer ${KEY}` },
  },
);
const { data } = await res.json();
```

**Python**

```python
import os, requests
from urllib.parse import quote

GORUNNER = "https://automations.example.com"
KEY = os.environ["GORUNNER_EMBED_KEY"]  # gre_…
ACCOUNT_ID = quote("acct-bakery", safe="")

res = requests.get(
    f"{GORUNNER}/api/embed/v1/accounts/"
    f"{ACCOUNT_ID}/runs",
    params={"status": "failed"},
    headers={"Authorization": f"Bearer {KEY}"},
)
data = res.json()["data"]
```

Response · 200 OK

```json
{
  "data": [
    {
      "id": "8f0c41d2-6b7e-4c1a-9d3f-2a5b7c9e1f04",
      "workflowId": "3b1e5c2a-7d4f-4e8b-a1c6-5f2d9b0e7a31",
      "workspace": {
        "id": null,
        "default": true
      },
      "status": "failed",
      "trigger": "webhook",
      "startedAt": "2026-10-25T08:59:58Z",
      "firstStartedAt": "2026-10-25T08:59:58Z",
      "finishedAt": "2026-10-25T09:00:00Z",
      "durationMs": 1840,
      "error": "step add_row failed: the spreadsheet was not found",
      "failure": {
        "message": "step add_row failed: the spreadsheet was not found",
        "step": {
          "name": "add_row",
          "displayName": "Add a row"
        }
      }
    }
  ],
  "pagination": {
    "limit": 50,
    "nextCursor": null
  }
}
```

**Every field**

It takes no body.

### Response · 200 OK

- `data` · array of objects
  - `id` · UUID
  - `workflowId` · UUID
  - `workspace` · object
    - `id` · string or null: The partner’s workspace id; null for the default workspace.
    - `default` · boolean
  - `status` · string: `queued`: accepted, waiting for a worker or a free slot. `running`: a worker has it. `held`: waiting on a person or a timer. One of `queued`, `running`, `held`, `worked`, `failed`, `cancelled`.
  - `trigger` · string: What started it: the trigger’s type (`webhook`, `cron`, `manual`, …).
  - `startedAt` · time: When the run was accepted. It may then wait in line for a free slot before a worker starts it (`firstStartedAt`).
  - `firstStartedAt` · time or null: When a worker first started the run. `durationMs` counts from here, so the time from `startedAt` to this is the time the run waited in line. Null until a worker starts the run, and for a run started on v2026.10.5 or earlier or one that ran inline (an error handler’s), whose `durationMs` counts from `startedAt`.
  - `finishedAt` · time or null
  - `durationMs` · integer or null: How long the run took, in milliseconds: from the first time a worker started the run (`firstStartedAt`, else `startedAt`) to its finish. Waits inside the run (a Delay, an Approval) count; the time it waited in the line for a free slot does not. A run cancelled while it waited has none. Null until it finishes.
  - `error` · string or null: Why it did not work, as a sentence: a failed run’s failure, or `Cancelled by user` on a cancelled run (whoever cancelled it).
  - `failure` · object or null: A failed run’s error in the shape the `run.failed` event carries: the message (as `error`) and the first step that failed. Null for every other run.
    - `message` · string
    - `step` · object or null: The first step that failed; null when the run failed around its steps.
      - `name` · string: The step’s name in the definition (`step_2`).
      - `displayName` · string
- `pagination` · object
  - `limit` · integer
  - `nextCursor` · string or null: The `cursor` of the next page; null on the last page. A page that comes back full can carry a cursor even when nothing follows: the next page is then empty, with null here. Keep going until it is null.

Related: [Get a run](https://docs.gorunner.io/embed/api/runs/get-run) · [Run a run again](https://docs.gorunner.io/embed/api/runs/rerun-run)

Source: https://docs.gorunner.io/embed/api/runs/list-runs
