Get Automation Run
Retrieve one run of an automation: what started it, and each step it has been through. A step is completed, skipped (with the reason a message was not sent) or failed.
Endpoint
GET /automations/:id/runs/:run_id
Returns: 200 OK
Headers
| Header | Value | Required |
|---|---|---|
Authorization | Bearer <your-api-key> | Yes |
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | The automation ID |
run_id | string | The run ID |
Response
{
"id": "01957e40-1a2b-7c3d-8e4f-5a6b7c8d9e0f",
"status": "completed",
"contact_id": "01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6c",
"current_step_key": null,
"failure": null,
"started_at": "2026-03-08T12:00:00.000Z",
"completed_at": "2026-03-08T16:00:02.000Z",
"trigger": {
"event": "custom_event",
"event_name": "cart_abandoned",
"timestamp": "2026-03-08T12:00:00.000Z"
},
"steps": [
{
"key": "trigger",
"type": "trigger",
"status": "completed",
"outcome": "default",
"skip_reason": null,
"error": null,
"completed_at": "2026-03-08T12:00:00.000Z"
},
{
"key": "wait_for_order",
"type": "wait_for_event",
"status": "completed",
"outcome": "timeout",
"skip_reason": null,
"error": null,
"completed_at": "2026-03-08T16:00:00.000Z"
},
{
"key": "reminder_email",
"type": "send_email",
"status": "completed",
"outcome": "default",
"skip_reason": null,
"error": null,
"completed_at": "2026-03-08T16:00:01.000Z"
},
{
"key": "reminder_sms",
"type": "send_sms",
"status": "skipped",
"outcome": "default",
"skip_reason": "no_phone",
"error": null,
"completed_at": "2026-03-08T16:00:02.000Z"
}
]
}
The run fields are described in List Automation Runs. A run also carries:
| Field | Type | Description |
|---|---|---|
trigger.event | string | The trigger event that started the run, such as custom_event. See Trigger events. |
trigger.event_name | string | null | For a custom_event trigger, the event's name |
trigger.timestamp | string | When the trigger event happened (ISO 8601) |
steps | array | The steps the run has been through, in order, starting with the trigger. A step the run is waiting on is added once the wait ends. |
Each entry in steps:
| Field | Type | Description |
|---|---|---|
key | string | The step's key |
type | string | The step's type |
status | string | completed, skipped or failed |
outcome | string | null | The connection the run left by: default, or the branch a condition or wait_for_event took. null when the step failed. |
skip_reason | string | null | Why a send step sent nothing, such as no_email, no_phone, suppressed or smart_sending. null unless status is skipped. |
error | string | null | What went wrong. null unless status is failed. |
completed_at | string | When the step finished (ISO 8601) |
A skipped step does not stop the run: it carries on to the next step.
Examples
- cURL
- JavaScript
- Python
- C#
- PHP
curl "https://api.arsel.sa/v1/automations/01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6b/runs/01957e40-1a2b-7c3d-8e4f-5a6b7c8d9e0f" \
-H "Authorization: Bearer $ARSEL_API_KEY"
const response = await fetch("https://api.arsel.sa/v1/automations/01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6b/runs/01957e40-1a2b-7c3d-8e4f-5a6b7c8d9e0f", {
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/01957e40-1a2b-7c3d-8e4f-5a6b7c8d9e0f",
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/01957e40-1a2b-7c3d-8e4f-5a6b7c8d9e0f");
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/01957e40-1a2b-7c3d-8e4f-5a6b7c8d9e0f");
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
- 403 Forbidden
- 404 Not Found
- 401 Unauthorized
{
"status_code": 403,
"name": "forbidden",
"message": "Automations are not available for this organization"
}
{
"status_code": 404,
"name": "not_found",
"message": "Run not found"
}
{
"status_code": 401,
"name": "unauthorized",
"message": "Invalid API Key"
}
When the automation itself does not exist, the 404 message is Automation not found.