Skip to main content

List Automation Runs

Retrieve a paginated list of an automation's runs. A run is one contact's way through the automation: each time a contact enters, a new run starts.

Test runs started from the dashboard are not listed.

Endpoint​

GET /automations/:id/runs

Returns: 200 OK

Headers​

HeaderValueRequired
AuthorizationBearer <your-api-key>Yes

Path Parameters​

ParameterTypeDescription
idstringThe automation ID

Query Parameters​

ParameterTypeDefaultDescription
limitnumber20Items per page (min: 1, max: 100)
afterstring—Cursor — return items after this id (exclusive).
beforestring—Cursor — return items before this id (exclusive).
statusstring—Only runs in these statuses, comma-separated, e.g. running,waiting. See Run fields.
contact_idstring—Only the runs of this contact

Send after or before, not both. Results are returned most recent first. See Pagination for cursor details.

Response​

{
"object": "list",
"has_more": false,
"data": [
{
"id": "01957e40-1a2b-7c3d-8e4f-5a6b7c8d9e10",
"status": "waiting",
"contact_id": "01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6d",
"current_step_key": "wait_for_order",
"failure": null,
"started_at": "2026-03-08T14:00:00.000Z",
"completed_at": null
},
{
"id": "01957e40-1a2b-7c3d-8e4f-5a6b7c8d9e0f",
"status": "failed",
"contact_id": "01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6c",
"current_step_key": "reminder_email",
"failure": {
"step_key": "reminder_email",
"message": "\"mail.example.com\" is not a verified sender domain"
},
"started_at": "2026-03-08T12:00:00.000Z",
"completed_at": "2026-03-08T16:00:01.000Z"
}
]
}

Run fields​

FieldTypeDescription
idstringThe run ID
statusstringSee the table below
contact_idstringThe contact going through the automation
current_step_keystring | nullThe step the run is on, or the one it failed on. null once it has finished otherwise.
failureobject | nullWhy the run failed: the step_key and a message. null unless status is failed.
started_atstringWhen the contact entered (ISO 8601)
completed_atstring | nullWhen the run finished (ISO 8601). null until it has.
statusMeaning
runningMoving between steps
waitingHeld by a delay or a wait_for_event step
completedReached the end of its branch
failedStopped on a step that could not run
cancelledStopped before the end, for example when its runs were cancelled from the dashboard

A run follows the version of the steps that was published when the contact entered. Disabling the automation does not end it.

To see each step a run has been through, use Get Automation Run.


Examples​

All runs still in progress:

curl "https://api.arsel.sa/v1/automations/01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6b/runs?status=running,waiting" \
-H "Authorization: Bearer $ARSEL_API_KEY"

One contact's runs:

curl "https://api.arsel.sa/v1/automations/01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6b/runs?contact_id=01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6c" \
-H "Authorization: Bearer $ARSEL_API_KEY"

Error Responses​

{
"status_code": 422,
"name": "validation_error",
"message": "each value in status must be one of the following values: running, waiting, completed, failed, cancelled"
}