API Reference

Retrieve Automation Run

GET /automations/:id/runs/:runId — retrieve one run including its step-by-step trace.

GET/automations/:id/runs/:runId

Retrieves 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
idstringrequired

The ID of the automation.

runIdstringrequired

The 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:

FieldDescription
keyThe unique key of the step in the automation graph.
typeThe step type (e.g. trigger, send_email, delay).
statusThe step's execution status: completed, failed, or skipped.
started_atWhen the step started executing.
completed_atWhen the step finished.
outputOutput data from the step (if any).
errorError details if the step failed.