API Reference
Retrieve Automation Run
GET /automations/:id/runs/:runId — retrieve one run including its step-by-step trace.
GET
/automations/:id/runs/:runIdRetrieves the full details of a single run, including the steps array — the execution trace of every step in the run. The first entry is the trigger step.
Path parameters
idstringrequiredThe ID of the automation.
runIdstringrequiredThe ID of the run to retrieve.
import { MailBlastr } from 'mailblastr';
const mb = new MailBlastr('mb_xxxxxxxxx');
const { data, error } = await mb.automations.getRun('c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd', 'a1b2c3d4-e5f6-7890-abcd-ef1234567890');
console.log({ data, error });Response
{
"object": "automation_run",
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"automation_id": "c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd",
"contact_id": "26e2b838-bf6d-4515-b6a7-17525b12b05a",
"contact_email": "jordan@acme.com",
"status": "completed",
"error": null,
"started_at": "2026-10-01T12:00:00.000Z",
"completed_at": "2026-10-01T12:05:00.000Z",
"created_at": "2026-10-01T12:00:00.000Z",
"steps": [
{
"key": "start",
"type": "trigger",
"status": "completed",
"started_at": "2026-10-01T12:00:00.000Z",
"completed_at": "2026-10-01T12:00:01.000Z",
"output": null,
"error": null
},
{
"key": "welcome",
"type": "send_email",
"status": "completed",
"started_at": "2026-10-01T12:00:01.000Z",
"completed_at": "2026-10-01T12:00:02.000Z",
"output": {
"to": "user@example.com",
"email_id": "6278820d-2421-42d0-85f0-80e9e28c1c69",
"template": {
"id": "caa9851e-e7bf-4a50-a408-56024edc19c0",
"variables": null
}
},
"error": null
}
]
}Each step in the response includes:
| Field | Description |
|---|---|
key | The unique key of the step in the automation graph. |
type | The step type (e.g. trigger, send_email, delay). |
status | The step's execution status: completed, failed, or skipped. |
started_at | When the step started executing. |
completed_at | When the step finished. |
output | Output data from the step (if any). |
error | Error details if the step failed. |