# List Automation Runs

> GET /automations/:id/runs — list the runs of an automation, with optional status filtering.

`GET /automations/:id/runs`

Lists the [runs](https://www.sendping.co/docs/automations/runs) of an automation, newest first. Filter by one or more statuses with a comma-separated `status` query parameter. The list is **paginated** — at most 20 runs come back unless you raise `limit`, and `has_more` tells you whether to keep walking with `after`.

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | Yes | The ID of the automation. |

**Query parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `status` | string | No | Filter to one or more run statuses, comma-separated (e.g. `status=running,completed`). Possible values: `running`, `completed`, `failed`, `skipped`. |
| `limit` | integer | No | How many runs to return. An integer between 1 and 100, defaulting to **20** — this endpoint always applies the limit, so an automation with 500 runs returns 20 with `has_more: true`. |
| `after` | string | No | Cursor: return the runs that follow this run id. See [Pagination](https://www.sendping.co/docs/api/pagination). |
| `before` | string | No | Cursor: return the runs that precede this run id. Cannot be combined with `after`. |

**Node.js**

```js
import { SendPing } from 'sendping';

const mb = new SendPing('mb_xxxxxxxxx');

const { data, error } = await mb.automations.runs('c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd');
console.log({ data, error });
```

**Ruby**

```ruby
require "sendping"

SendPing.api_key = "mb_xxxxxxxxx"

SendPing::Automations.runs("c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd")
```

**PHP**

```php
<?php
require 'vendor/autoload.php';

use SendPing\SendPing;

$sendping = SendPing::client('mb_xxxxxxxxx');

$sendping->automations->runs('c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd');
```

**Python**

```python
import sendping

sendping.api_key = "mb_xxxxxxxxx"

sendping.Automations.runs("c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd")
```

**Go**

```go
import "github.com/shekhu10/sendping-sdks/sendping-go"

client := sendping.NewClient("mb_xxxxxxxxx")

runs, err := client.Automations.Runs("c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd", nil)
```

**Rust**

```rust
use sendping::SendPing;

let mb = SendPing::new("mb_xxxxxxxxx");

let _runs = mb.automations.runs("c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd", None).await?;
```

**Java**

```java
import co.sendping.SendPing;
import co.sendping.SendPingResponse;

SendPing sendping = new SendPing("mb_xxxxxxxxx");

SendPingResponse response = sendping.automations().runs("c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd");
```

**.NET**

```csharp
using SendPing;

ISendPing sendping = SendPingClient.Create("mb_xxxxxxxxx");

var resp = await sendping.AutomationListRunsAsync("c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd");
```

**cURL**

```bash
curl -X GET 'https://www.sendping.co/api/automations/c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd/runs' \
  -H 'Authorization: Bearer mb_xxxxxxxxx'
```

**CLI**

```bash
sendping automations runs c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd
```

**Node.js**

```js
import { SendPing } from 'sendping';

const mb = new SendPing('mb_xxxxxxxxx');

const { data, error } = await mb.automations.runs('c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd', { status: running,completed });
console.log({ data, error });
```

**Ruby**

```ruby
require "sendping"

SendPing.api_key = "mb_xxxxxxxxx"

SendPing::Automations.runs("c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd", {
  "status": "running,completed"
})
```

**PHP**

```php
<?php
require 'vendor/autoload.php';

use SendPing\SendPing;

$sendping = SendPing::client('mb_xxxxxxxxx');

$sendping->automations->runs('c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd', [
  'status' => "running,completed"
]);
```

**Python**

```python
import sendping

sendping.api_key = "mb_xxxxxxxxx"

sendping.Automations.runs("c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd", {
  "status": "running,completed"
})
```

**Go**

```go
import "github.com/shekhu10/sendping-sdks/sendping-go"

client := sendping.NewClient("mb_xxxxxxxxx")

runs, err := client.Automations.RunsFiltered("c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd", &sendping.ListAutomationRunsRequest{
    Status: []string{"running", "completed"},
})
```

**Rust**

```rust
use sendping::{ListAutomationRunsParams, SendPing};

let mb = SendPing::new("mb_xxxxxxxxx");

let params = Some(ListAutomationRunsParams::new().with_status(["running", "completed"]));
let _runs = mb.automations.runs_filtered("c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd", params).await?;
```

**Java**

```java
import co.sendping.SendPing;
import co.sendping.SendPingResponse;
import co.sendping.requests.ListAutomationRunsParams;

SendPing sendping = new SendPing("mb_xxxxxxxxx");

SendPingResponse response = sendping.automations().runs(
        "c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd",
        ListAutomationRunsParams.builder().status("running", "completed").build());
```

**.NET**

```csharp
using SendPing;

ISendPing sendping = SendPingClient.Create("mb_xxxxxxxxx");

var resp = await sendping.AutomationListRunsAsync("c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd", new AutomationRunListOptions
{
    Status = new[] { "running", "completed" },
});
```

**cURL**

```bash
curl -X GET 'https://www.sendping.co/api/automations/c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd/runs?status=running,completed' \
  -H 'Authorization: Bearer mb_xxxxxxxxx'
```

**CLI**

```bash
sendping automations runs c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd \
  --status 'running,completed'
```

A `limit` outside 1-100 (or a non-integer), or `after` and `before` together, returns `422 validation_error`. An unknown cursor returns an empty page rather than an error. See [Pagination](https://www.sendping.co/docs/api/pagination) and [Errors](https://www.sendping.co/docs/api/errors).

### Response

```json
{
  "object": "list",
  "has_more": false,
  "data": [
    {
      "object": "automation_run",
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "contact_id": "26e2b838-bf6d-4515-b6a7-17525b12b05a",
      "contact_email": "jordan@acme.com",
      "status": "completed",
      "started_at": "2026-10-01T12:00:00.000Z",
      "completed_at": "2026-10-01T12:05:00.000Z",
      "created_at": "2026-10-01T12:00:00.000Z"
    }
  ]
}
```
