# List a workflow's runs

`GET /v1/workflows/{id}/runs`

- Authentication: required (Bearer token)
- Required scope: `api.workflows.view`

A limit-bounded page of the workflow's contact runs plus the by-status
`counts` tally. Filter to specific statuses with `?status=` (a
comma-separated list, e.g. `active,completed`). Recipient email is not
included — `contact_id` is the join key (look the address up under
`api.contacts.view`).

## Path parameters

- `id` (string<uuid>, required) — Resource UUID. An unparseable id reads as a clean `404 not_found`.

## Query parameters

- `limit` (integer, optional) — Page size (1–200). Default 50.
- `offset` (integer, optional) — Number of runs to skip (default 0).
- `status` (string, optional) — Comma-separated run statuses to filter by (e.g. `active,completed`).

## Example request

```bash
curl 'https://api.sendops.dev/v1/workflows/00000000-0000-0000-0000-000000000000/runs' \
  -H "Authorization: Bearer $SENDOPS_API_KEY"
```

## Responses

### 200 — A page of runs plus by-status counts

Content type: `application/json`

```json
{
  "data": [
    {
      "id": "00000000-0000-0000-0000-000000000000",
      "workflow_id": "00000000-0000-0000-0000-000000000000",
      "definition_version": 0,
      "contact_id": "00000000-0000-0000-0000-000000000000",
      "status": "string",
      "node_path": "string",
      "trigger_cause": "string",
      "trigger_source_key": "string",
      "exit_kind": "string",
      "exit_name": "string",
      "failure_reason": "string",
      "next_action_at": "2026-05-17T20:00:00Z",
      "started_at": "2026-05-17T20:00:00Z",
      "completed_at": "2026-05-17T20:00:00Z"
    }
  ],
  "counts": {}
}
```

### 401 — Missing, malformed, or unknown API key

Content type: `application/problem+json`

```json
{
  "type": "https://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "invalid_key",
  "request_id": "string",
  "retry_after": 0,
  "retention_days": 0,
  "scope": "string",
  "resource": "string",
  "errors": [
    {
      "field": "string",
      "reason": "string"
    }
  ]
}
```

### 403 — Key lacks the required scope or plan limit violated

Content type: `application/problem+json`

```json
{
  "type": "https://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "invalid_key",
  "request_id": "string",
  "retry_after": 0,
  "retention_days": 0,
  "scope": "string",
  "resource": "string",
  "errors": [
    {
      "field": "string",
      "reason": "string"
    }
  ]
}
```

### 404 — Resource not found

Content type: `application/problem+json`

```json
{
  "type": "https://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "invalid_key",
  "request_id": "string",
  "retry_after": 0,
  "retention_days": 0,
  "scope": "string",
  "resource": "string",
  "errors": [
    {
      "field": "string",
      "reason": "string"
    }
  ]
}
```

### 422 — Query parameter or path value failed validation

Content type: `application/problem+json`

```json
{
  "type": "https://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "invalid_key",
  "request_id": "string",
  "retry_after": 0,
  "retention_days": 0,
  "scope": "string",
  "resource": "string",
  "errors": [
    {
      "field": "string",
      "reason": "string"
    }
  ]
}
```

### 429 — Per-org rate limit exceeded

Content type: `application/problem+json`

```json
{
  "type": "https://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "invalid_key",
  "request_id": "string",
  "retry_after": 0,
  "retention_days": 0,
  "scope": "string",
  "resource": "string",
  "errors": [
    {
      "field": "string",
      "reason": "string"
    }
  ]
}
```

### 500 — Unexpected server-side failure. The `code` is `internal_error`. The
`request_id` field can be quoted to SendOps support to investigate.

Content type: `application/problem+json`

```json
{
  "type": "https://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "invalid_key",
  "request_id": "string",
  "retry_after": 0,
  "retention_days": 0,
  "scope": "string",
  "resource": "string",
  "errors": [
    {
      "field": "string",
      "reason": "string"
    }
  ]
}
```
