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
| Header | Value | Required |
|---|---|---|
Authorization | Bearer <your-api-key> | Yes |
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | The automation ID |
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | number | 20 | Items per page (min: 1, max: 100) |
after | string | — | Cursor — return items after this id (exclusive). |
before | string | — | Cursor — return items before this id (exclusive). |
status | string | — | Only runs in these statuses, comma-separated, e.g. running,waiting. See Run fields. |
contact_id | string | — | 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
| Field | Type | Description |
|---|---|---|
id | string | The run ID |
status | string | See the table below |
contact_id | string | The contact going through the automation |
current_step_key | string | null | The step the run is on, or the one it failed on. null once it has finished otherwise. |
failure | object | null | Why the run failed: the step_key and a message. null unless status is failed. |
started_at | string | When the contact entered (ISO 8601) |
completed_at | string | null | When the run finished (ISO 8601). null until it has. |
status | Meaning |
|---|---|
running | Moving between steps |
waiting | Held by a delay or a wait_for_event step |
completed | Reached the end of its branch |
failed | Stopped on a step that could not run |
cancelled | Stopped 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
- JavaScript
- Python
- C#
- PHP
curl "https://api.arsel.sa/v1/automations/01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6b/runs?status=running,waiting" \
-H "Authorization: Bearer $ARSEL_API_KEY"
const response = await fetch("https://api.arsel.sa/v1/automations/01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6b/runs?status=running,waiting", {
headers: {
Authorization: `Bearer ${process.env.ARSEL_API_KEY}`,
},
});
const data = await response.json();
if (!response.ok) {
throw new Error(`${data.name}: ${data.message}`);
}
console.log(data);
import os
import requests
response = requests.get(
"https://api.arsel.sa/v1/automations/01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6b/runs?status=running,waiting",
headers={"Authorization": f"Bearer {os.environ['ARSEL_API_KEY']}"},
)
response.raise_for_status()
print(response.json())
using System.Net.Http.Headers;
var client = new HttpClient(); // share one instance across requests
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(
"Bearer", Environment.GetEnvironmentVariable("ARSEL_API_KEY"));
var response = await client.GetAsync("https://api.arsel.sa/v1/automations/01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6b/runs?status=running,waiting");
var body = await response.Content.ReadAsStringAsync();
if (!response.IsSuccessStatusCode)
throw new HttpRequestException($"{(int)response.StatusCode}: {body}");
Console.WriteLine(body);
<?php
$ch = curl_init("https://api.arsel.sa/v1/automations/01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6b/runs?status=running,waiting");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("ARSEL_API_KEY"),
],
]);
$data = json_decode(curl_exec($ch), true);
if (curl_getinfo($ch, CURLINFO_HTTP_CODE) >= 400) {
throw new Exception("{$data['name']}: {$data['message']}");
}
print_r($data);
One contact's runs:
- cURL
- JavaScript
- Python
- C#
- PHP
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"
const response = await fetch("https://api.arsel.sa/v1/automations/01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6b/runs?contact_id=01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6c", {
headers: {
Authorization: `Bearer ${process.env.ARSEL_API_KEY}`,
},
});
const data = await response.json();
if (!response.ok) {
throw new Error(`${data.name}: ${data.message}`);
}
console.log(data);
import os
import requests
response = requests.get(
"https://api.arsel.sa/v1/automations/01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6b/runs?contact_id=01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6c",
headers={"Authorization": f"Bearer {os.environ['ARSEL_API_KEY']}"},
)
response.raise_for_status()
print(response.json())
using System.Net.Http.Headers;
var client = new HttpClient(); // share one instance across requests
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(
"Bearer", Environment.GetEnvironmentVariable("ARSEL_API_KEY"));
var response = await client.GetAsync("https://api.arsel.sa/v1/automations/01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6b/runs?contact_id=01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6c");
var body = await response.Content.ReadAsStringAsync();
if (!response.IsSuccessStatusCode)
throw new HttpRequestException($"{(int)response.StatusCode}: {body}");
Console.WriteLine(body);
<?php
$ch = curl_init("https://api.arsel.sa/v1/automations/01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6b/runs?contact_id=01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6c");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("ARSEL_API_KEY"),
],
]);
$data = json_decode(curl_exec($ch), true);
if (curl_getinfo($ch, CURLINFO_HTTP_CODE) >= 400) {
throw new Exception("{$data['name']}: {$data['message']}");
}
print_r($data);
Error Responses
- 422 Validation Error
- 403 Forbidden
- 404 Not Found
- 401 Unauthorized
{
"status_code": 422,
"name": "validation_error",
"message": "each value in status must be one of the following values: running, waiting, completed, failed, cancelled"
}
{
"status_code": 403,
"name": "forbidden",
"message": "Automations are not available for this organization"
}
{
"status_code": 404,
"name": "not_found",
"message": "Automation not found"
}
{
"status_code": 401,
"name": "unauthorized",
"message": "Invalid API Key"
}