---
title: "Run log"
description: "Everything an automation did, newest first: each person entering, every step it ran for them, and each person finishing."
url: "https://nextmail.sh/docs/api/automations/runs"
area: "API"
category: "Mailbox"
---

# Run log

Everything an automation did, newest first: each person entering, every step it ran for them, and each person finishing.

`GET /automations/{id}/runs`

## GET /automations/{id}/runs

Everything an automation did, newest first: each person entering, every step it ran for them, and each person finishing.

## Example

Needs `automations:read`. `event` is `entered`, `step`, `completed` or `exited`, `stepKey` keeps the runs of one step, and `outcome` keeps the steps that ended one way, such as `failed`. `limit` goes up to 200 and defaults to 50.

**curl**

```
curl "$OE/automations/aut_7c2e9a1f4b8d30c65e1a9f27/runs?outcome=failed" -H "$AUTH"
```

**Response**

```
{
  "object": "list",
  "data": [
    {
      "object": "automation_run",
      "id": "asr_6b1d9f3a7c2e48d05e9a1c74",
      "automationId": "aut_7c2e9a1f4b8d30c65e1a9f27",
      "enrollmentId": "aen_2d8f1b6c9e3a47d05b1c8e62",
      "contact": { "id": "con_8a3c1e7b5d9f42061c8e3a5b", "email": "ana@example.com", "name": "Ana" },
      "event": "step",
      "stepKey": "welcome",
      "kind": "send_email",
      "outcome": "failed",
      "source": null,
      "exitReason": null,
      "emailId": null,
      "detail": "The template could not be sent.",
      "at": "2026-10-11T09:12:44.000Z"
    }
  ],
  "hasMore": false,
  "nextCursor": null,
  "automationId": "aut_7c2e9a1f4b8d30c65e1a9f27"
}
```

> A `step` entry carries the step’s `stepKey`, `kind` and `outcome`, the `emailId` of a send and, for a step that was skipped or failed, the reason in `detail`.

> An `entered` entry says how the person got in, in `source`. A `completed` or `exited` entry says why they finished, in `exitReason`.

> Pass `nextCursor` back as `cursor` to read on. One person’s whole way through, oldest first, is the enrollment its `enrollmentId` names.

## Reference

- [`GET /automations/{id}/runs`](https://nextmail.sh/docs/api/reference/automations#get-automations-id-runs): full reference
