# List runs

`GET /v1/automations/{automationId}/runs`

The runs of one automation, newest first: one for each time a person went through it, by status and address.

Needs the scope: `automations:read`

## Path parameters

- `automationId` (string, required): The id of the automation. Up to 64 characters.

## Query parameters

- `q` (string): Text to search for. Only items that contain it are returned. Up to 40 characters.
- `limit` (integer): How many items to return, from 1 to 100. Without it you get 25.
- `offset` (integer): How many items to skip. Use it with `limit` to read the next page. Default: `0`.
- `after` (string): The id of the last item you have. The answer starts with the item that follows it, which reads a long list without skipping or repeating when it changes meanwhile. Up to 64 characters.
- `before` (string): The id of the first item you have. The answer ends with the item just before it. Give this or `after`, not both. Up to 64 characters.
- `status` (string): Only runs in this state: `running`, `waiting`, `completed`, `exited`, `failed` or `canceled`. One of: `running`, `waiting`, `completed`, `exited`, `failed`, `canceled`.

## Returns

- `object` ("list"): Always `list`.
- `data` (object[]): The items on this page.
- `data[].object` ("automation_run"): Always `automation_run`.
- `data[].id` (string): The id of the run.
- `data[].automationId` (string): The id of the automation.
- `data[].version` (integer): The version of the automation the run follows.
- `data[].email` (string): The address of the person.
- `data[].contactId` (string | null): The id of their contact, or `null` for a bare address.
- `data[].status` (string): Where the run stands: `running`, `waiting`, `completed`, `exited`, `failed` or `canceled`. One of: `running`, `waiting`, `completed`, `exited`, `failed`, `canceled`.
- `data[].stepId` (string | null): The id of the step it is at, or `null` once it has ended.
- `data[].source` (string): What started it: the name of the event, or `schedule`, `date`, `manual` or `test`.
- `data[].test` (boolean): `true` for a test run.
- `data[].reason` (string | null): Why it ended before the end of its path, or `null`. One of: `exit_step`, `goal`, `unsubscribed`, `contact_deleted`, `automation_deleted`, `automation_stopped`, `missing_variable`, `send_refused`, `step_failed`, `canceled`.
- `data[].detail` (string): More about how it ended. Empty while it is going on.
- `data[].wakeAt` (string | null): When a waiting run goes on, or `null`.
- `data[].startedAt` (string): When the run started.
- `data[].finishedAt` (string | null): When it ended, or `null`.
- `total` (integer): How many items match in all, on every page together.
- `hasMore` (boolean): Whether more items follow this page.

## Example

cURL:

```bash
curl "$OPENSEND_API_URL/v1/automations/auto_welcome/runs?status=waiting" \
  -H "Authorization: Bearer $OPENSEND_API_KEY"
```

TypeScript:

```ts
await opensend.runs.list({
  automationId: 'auto_welcome',
  status: 'waiting',
})
```

CLI:

```bash
opensend runs list --automation-id auto_welcome --status waiting
```

MCP:

```json
{
  "name": "runs_list",
  "arguments": {
    "automationId": "auto_welcome",
    "status": "waiting"
  }
}
```

Answer:

```json
{
  "object": "list",
  "data": [
    {
      "object": "automation_run",
      "id": "run_02",
      "automationId": "auto_welcome",
      "version": 1,
      "email": "alan@example.com",
      "contactId": null,
      "status": "waiting",
      "stepId": "wait_open",
      "source": "user.signed_up",
      "test": false,
      "reason": null,
      "detail": "",
      "wakeAt": "2026-11-28T09:30:00.000Z",
      "startedAt": "2026-11-26T09:30:00.000Z",
      "finishedAt": null
    }
  ],
  "total": 1,
  "hasMore": false
}
```
