> ## 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.

# Advance Automation Test Run



## OpenAPI

````yaml api-reference/openapi.json POST /automation-test-runs/{runId}/advance
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-test-runs/{runId}/advance:
    post:
      summary: Advance a test run virtual clock
      parameters:
        - $ref: '#/components/parameters/RunId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - seconds
              properties:
                seconds:
                  type: integer
                  minimum: 1
      responses:
        '200':
          description: Updated test trace
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutomationRunDetailResponse'
components:
  parameters:
    RunId:
      name: runId
      in: path
      required: true
      schema:
        type: string
        format: uuid
  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'
    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
    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'
    JsonValue:
      oneOf:
        - type: string
          nullable: true
        - type: number
        - type: boolean
        - type: object
          additionalProperties:
            $ref: '#/components/schemas/JsonValue'
        - type: array
          items:
            $ref: '#/components/schemas/JsonValue'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````