# List a run's steps

> Documentation index: https://exomations.com/llms.txt

`GET /api/v1/runs/{runId}/steps`

The steps of one run in the order they started, with their status and error.

Returns the run's steps in the order they started, without their input or output. Up to 300 steps; `truncated` is `true` when the run has more. Use it to find the step that failed.

## Authorization

The REST API is being rolled out and is not yet available to every workspace. Send an API key with the `read` permission in the `X-Api-Key` header. REST API access must be switched on for the workspace; see the REST API overview.

## Path parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `runId` | string | yes | The run's ID: the `executionId` a trigger call returned, or an `id` from a run list. |

## Response

The answer is `{ data, truncated }`; each item of `data` has these fields:

| Name | Type | Description |
|---|---|---|
| `nodeId` | string | The step's ID in the flow (the `id` in `steps` of Get a flow). |
| `nodeType` | string | The step's type, for example `http_request`. |
| `status` | string | The step's status (the same values as a run's). |
| `startedAt` | string (date-time) \| null | When the step started. |
| `completedAt` | string (date-time) \| null | When the step finished. |
| `error` | string \| null | The step's error message, or `null`. At most 2,000 characters, masked like a run's `error`, so do not parse it. |
| `data` (envelope) | array | The run's steps, in the order they started. |
| `truncated` (envelope) | boolean | `true` when the run has more than 300 steps and only the first 300 are listed. |

### 200

```json
{
  "data": [
    {
      "nodeId": "trigger_1",
      "nodeType": "trigger",
      "status": "success",
      "startedAt": "2026-11-16T08:30:12.010Z",
      "completedAt": "2026-11-16T08:30:12.014Z",
      "error": null
    },
    {
      "nodeId": "http_1",
      "nodeType": "http_request",
      "status": "failed",
      "startedAt": "2026-11-16T08:30:12.020Z",
      "completedAt": "2026-11-16T08:30:13.830Z",
      "error": "Request failed with status 503"
    }
  ],
  "truncated": false
}
```

## Errors

Every error is JSON with three fields: `error` (a short title), `code` (a fixed name your code can rely on) and `message` (a sentence for people). An unknown path under `/api/v1` answers `404` with `NOT_FOUND`.

| Status | Code | When | Message |
|---|---|---|---|
| 404 | `NOT_FOUND` | No such flow or run in the key's workspace (another workspace's IDs and withheld flows answer the same), or an unknown path. | `The requested resource was not found.` |
| 401 | `UNAUTHENTICATED` | The key is missing, not an Exomations API key, unknown, inactive, expired or deleted, or it was sent in the URL or an `Authorization` header. | `A valid API key is required in the X-Api-Key header.` |
| 402 | `PENDING_PAYMENT` | The workspace is awaiting its card verification (every endpoint except `GET /usage`). | `Payment required. Complete the 1 SAR card verification on the Billing page to activate your account.` |
| 403 | `FORBIDDEN` | The key does not carry `read`. | `This API key does not have the Read permission.` |
| 403 | `FORBIDDEN` | The workspace is suspended. | `This workspace is suspended.` |
| 403 | `API_NOT_ENABLED` | REST API access is off for the workspace. | `REST API access is turned off for this workspace. An admin or the owner can turn it on on the API Keys page.` |
| 405 | `METHOD_NOT_ALLOWED` | A method other than `GET` or `HEAD`. The `Allow` header lists the methods. | `This endpoint does not support this method. See the Allow header.` |
| 429 | `RATE_LIMITED` | Too many calls in a minute (calls without a valid key are limited too). | `Rate limit reached. Retry after the number of seconds in the Retry-After header.` |
| 500 | `INTERNAL` | Something failed on our side. Retry; if it happens again, contact support. | `Something went wrong on our side. Please try again.` |

## Examples

### cURL

```bash
curl https://exomations.com/api/v1/runs/YOUR_RUN_ID/steps \
  -H "X-Api-Key: exo_your_key"
```

### JavaScript

```javascript
const res = await fetch("https://exomations.com/api/v1/runs/YOUR_RUN_ID/steps", {
  headers: { "X-Api-Key": process.env.EXOMATIONS_KEY }, // exo_...
});
const body = await res.json();
if (!res.ok) throw new Error(`${body.code}: ${body.message}`);
console.log(body.data.length, body.truncated);
```

### Python

```python
import os, requests

res = requests.get(
    "https://exomations.com/api/v1/runs/YOUR_RUN_ID/steps",
    headers={"X-Api-Key": os.environ["EXOMATIONS_KEY"]},  # exo_...
    timeout=15,
)
body = res.json()
if res.status_code != 200:
    raise RuntimeError(f"{body['code']}: {body['message']}")
print(len(body["data"]), body["truncated"])
```
