Appearance
List automation runs
Every run of one automation — one contact's pass through the graph — newest first.
http
GET /v1/automations/{id}/runsRequires a Full access API key.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The automation id (auto_…) whose runs you want. |
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
status | string | No | Only runs in these states, comma-separated — any of running, completed, failed, cancelled. |
limit | number | No | How many to return. Default 20, min 1, max 100. |
after | string | No | Return runs after this run id. Cannot be combined with before. |
before | string | No | Return runs before this run id. Cannot be combined with after. |
Example
bash
# runs that are still going or that failed
curl "https://api.sendgrail.com/v1/automations/$AUTOMATION_ID/runs?status=running,failed" \
-H "Authorization: Bearer $SENDGRAIL_API_KEY"js
const res = await fetch(
`https://api.sendgrail.com/v1/automations/${id}/runs?status=running,failed`,
{ headers: { Authorization: `Bearer ${process.env.SENDGRAIL_API_KEY}` } },
);
const { data, has_more } = await res.json();Response
Each row is a lean run object — no per-step breakdown:
json
{
"object": "list",
"has_more": true,
"data": [
{
"object": "automation_run",
"id": "run_8Vc1Za4Ht1Nb",
"status": "running",
"started_at": "2026-07-16T08:12:04+00:00",
"completed_at": null,
"created_at": "2026-07-16T08:12:04+00:00"
},
{
"object": "automation_run",
"id": "run_2AqK5PmT9wRx",
"status": "completed",
"started_at": "2026-07-15T14:03:19+00:00",
"completed_at": "2026-07-17T14:03:22+00:00",
"created_at": "2026-07-15T14:03:19+00:00"
}
]
}The step-by-step breakdown is omitted here — fetch one run with Retrieve an automation run to see where in the graph it is. For what each field means, see The automation run object.
status filters on more than one state at once — status=running,failed returns runs that are either. has_more tells you whether another page exists; walk pages by passing the last run id as after until it's false. See Pagination.