> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sendrealm.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Retrieve Automation Run

> Inspect a single automation run.

## Operational notes

* Run execution uses at-least-once semantics.
* Step retries are protected with step-level idempotency, so a previously completed step is not re-sent on resume.
* `wait_for_event` timeout handling is scheduler based and near-real-time, not a hard real-time guarantee.
* If a wait times out first, a later matching event does not reopen that completed branch.


## OpenAPI

````yaml api-reference/openapi.json GET /automation-runs/{runId}
openapi: 3.0.1
info:
  title: Sendrealm API
  description: >-
    API for email, push, audience resources, domains, campaign drafts,
    templates, events, topics, and automations
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.sendrealm.com
security:
  - bearerAuth: []
paths:
  /automation-runs/{runId}:
    get:
      summary: Retrieve an automation run
      parameters:
        - name: runId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Run details
          content:
            application/json:
              example:
                data:
                  id: run_123
                  automation_id: aut_123
                  trigger_event_name: order.completed
                  resolved_identity_type: email
                  resolved_identity_value: olivia@example.com
                  status: completed
                  trigger_event:
                    id: evt_123
                    event_name: order.completed
                    payload:
                      order_id: ord_123
                    occurred_at: '2026-06-08T14:15:00.000Z'
                  steps:
                    - id: step_1
                      step_key: send_receipt
                      step_type: send_email_template
                      status: completed
                      linked_emails:
                        - id: email_123
                          subject: Your receipt
                          status: sent
                          last_event: send
                          template_version_id: tmplver_email_123
                          contact_id: contact_123
                          created_at: '2026-06-08T14:15:01.000Z'
                    - id: step_2
                      step_key: wait_for_open
                      step_type: wait_for_event
                      status: completed
                      branch_taken: received
                      waits:
                        - id: wait_123
                          step_id: step_2
                          step_key: wait_for_open
                          step_type: wait_for_event
                          waiting_for_event_name: sendrealm.mail.open
                          status: received
                          resolved_identity_value: olivia@example.com
                          timeout_at: '2026-06-08T14:45:00.000Z'
                          resumed_at: '2026-06-08T14:16:30.000Z'
                          timed_out_at: null
                          outcome_branch: received
                          resumed_by_event:
                            id: evt_124
                            event_name: sendrealm.mail.open
                            occurred_at: '2026-06-08T14:16:30.000Z'
                  waits:
                    - id: wait_123
                      step_id: step_2
                      step_key: wait_for_open
                      step_type: wait_for_event
                      waiting_for_event_name: sendrealm.mail.open
                      status: received
                      resolved_identity_value: olivia@example.com
                      timeout_at: '2026-06-08T14:45:00.000Z'
                      resumed_at: '2026-06-08T14:16:30.000Z'
                      timed_out_at: null
                      outcome_branch: received
                  sent_emails:
                    - id: email_123
                      subject: Your receipt
                      status: sent
                      last_event: send
                      automation_step_key: send_receipt
                      template_version_id: tmplver_email_123
                      created_at: '2026-06-08T14:15:01.000Z'
              schema:
                $ref: '#/components/schemas/AutomationRunDetailResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    AutomationRunDetailResponse:
      type: object
      required:
        - status
        - data
      properties:
        status:
          type: integer
          description: HTTP response status code
        data:
          $ref: '#/components/schemas/AutomationRunDetail'
    AutomationRunDetail:
      allOf:
        - $ref: '#/components/schemas/AutomationRun'
        - type: object
          required:
            - trigger_event
            - steps
            - waits
            - sent_emails
            - sent_push_notifications
          properties:
            trigger_event:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/AutomationRunEvent'
            steps:
              type: array
              items:
                $ref: '#/components/schemas/AutomationRunStep'
            waits:
              type: array
              items:
                $ref: '#/components/schemas/AutomationRunWait'
            sent_emails:
              type: array
              items:
                $ref: '#/components/schemas/AutomationRunMessage'
            sent_push_notifications:
              type: array
              items:
                $ref: '#/components/schemas/AutomationRunMessage'
    Error:
      type: object
      required:
        - status
        - error
      properties:
        status:
          type: integer
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
            message:
              type: string
            details:
              $ref: '#/components/schemas/JsonValue'
            issues:
              type: array
              items:
                $ref: '#/components/schemas/ValidationIssue'
    AutomationRun:
      type: object
      required:
        - id
        - automation_id
        - automation_version_id
        - contact_id
        - trigger_event_name
        - resolved_identity_type
        - resolved_identity_value
        - correlation
        - execution_mode
        - status
        - last_error
        - started_at
        - completed_at
        - virtual_now
        - terminal_reason
        - completed_step_key
        - cancellation_requested_at
        - cancellation_reason
        - canceled_at
        - created_at
        - updated_at
      properties:
        id:
          type: string
          format: uuid
        automation_id:
          type: string
          format: uuid
        automation_version_id:
          type: string
          format: uuid
        contact_id:
          type: string
          format: uuid
          nullable: true
        trigger_event_name:
          type: string
        resolved_identity_type:
          type: string
        resolved_identity_value:
          type: string
        correlation:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Correlation'
        execution_mode:
          type: string
        status:
          type: string
        last_error:
          type: string
          nullable: true
        started_at:
          type: string
          format: date-time
        completed_at:
          type: string
          format: date-time
          nullable: true
        virtual_now:
          type: string
          format: date-time
          nullable: true
        terminal_reason:
          type: string
          nullable: true
        completed_step_key:
          type: string
          nullable: true
        cancellation_requested_at:
          type: string
          format: date-time
          nullable: true
        cancellation_reason:
          type: string
          nullable: true
        canceled_at:
          type: string
          format: date-time
          nullable: true
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    AutomationRunEvent:
      type: object
      required:
        - id
        - event_name
        - payload
        - correlation
        - occurred_at
      properties:
        id:
          type: string
          format: uuid
        event_name:
          type: string
        payload:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/JsonObject'
        correlation:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Correlation'
        occurred_at:
          type: string
          format: date-time
    AutomationRunStep:
      type: object
      required:
        - id
        - step_key
        - step_type
        - status
        - branch_taken
        - input
        - output
        - last_error
        - started_at
        - completed_at
        - waits
        - linked_emails
        - linked_push_notifications
      properties:
        id:
          type: string
          format: uuid
        step_key:
          type: string
        step_type:
          type: string
        status:
          type: string
        branch_taken:
          type: string
          nullable: true
        input:
          $ref: '#/components/schemas/JsonValue'
        output:
          $ref: '#/components/schemas/JsonValue'
        last_error:
          type: string
          nullable: true
        started_at:
          type: string
          format: date-time
          nullable: true
        completed_at:
          type: string
          format: date-time
          nullable: true
        waits:
          type: array
          items:
            $ref: '#/components/schemas/AutomationRunWait'
        linked_emails:
          type: array
          items:
            $ref: '#/components/schemas/AutomationRunMessage'
        linked_push_notifications:
          type: array
          items:
            $ref: '#/components/schemas/AutomationRunMessage'
    AutomationRunWait:
      type: object
      required:
        - id
        - step_id
        - step_key
        - step_type
        - waiting_for_event_name
        - status
        - resolved_identity_value
        - correlation
        - execution_mode
        - timeout_at
        - resumed_at
        - timed_out_at
        - outcome_branch
        - resumed_by_event
      properties:
        id:
          type: string
          format: uuid
        step_id:
          type: string
          format: uuid
        step_key:
          type: string
          nullable: true
        step_type:
          type: string
          nullable: true
        waiting_for_event_name:
          type: string
        status:
          type: string
        resolved_identity_value:
          type: string
        correlation:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Correlation'
        execution_mode:
          type: string
        timeout_at:
          type: string
          format: date-time
          nullable: true
        resumed_at:
          type: string
          format: date-time
          nullable: true
        timed_out_at:
          type: string
          format: date-time
          nullable: true
        outcome_branch:
          type: string
          nullable: true
        resumed_by_event:
          type: object
          required:
            - id
            - event_name
            - occurred_at
          properties:
            id:
              type: string
              format: uuid
            event_name:
              type: string
            occurred_at:
              type: string
              format: date-time
          nullable: true
    AutomationRunMessage:
      type: object
      required:
        - id
        - status
        - last_event
        - created_at
      properties:
        id:
          type: string
          format: uuid
        subject:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: string
        last_event:
          type: string
        automation_step_key:
          type: string
          nullable: true
        template_version_id:
          type: string
          format: uuid
          nullable: true
        contact_id:
          type: string
          format: uuid
          nullable: true
        created_at:
          type: string
          format: date-time
    JsonValue:
      oneOf:
        - type: string
          nullable: true
        - type: number
        - type: boolean
        - type: object
          additionalProperties:
            $ref: '#/components/schemas/JsonValue'
        - type: array
          items:
            $ref: '#/components/schemas/JsonValue'
    ValidationIssue:
      type: object
      required:
        - code
        - path
        - message
      properties:
        code:
          type: string
        path:
          type: string
          nullable: true
        message:
          type: string
    Correlation:
      type: object
      required:
        - key
        - value
      properties:
        key:
          type: string
          maxLength: 100
        value:
          type: string
          maxLength: 255
    JsonObject:
      type: object
      additionalProperties:
        $ref: '#/components/schemas/JsonValue'
  responses:
    Unauthorized:
      description: Invalid or missing API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````