---
title: "Retrieve workflow execution"
method: GET
path: "/workflow_executions/{execution_id}"
tags: ["Workflows"]
---

# Retrieve workflow execution

`GET /workflow_executions/{execution_id}`

Get complete details for a workflow execution including current status, execution context, variables, and full event history.

**This is the only endpoint that returns the full execution_context** (vars, system, context, metadata) along with the complete event history.

Use this endpoint to:
- Monitor execution progress and current step
- Debug failed executions with full event log
- Review execution variables and context
- Check error details when status is 'failed'

The response includes:
- Current status and step
- Complete event chronology (step transitions, agent actions, variable updates)
- Full execution_context with standard structure (vars, system, context, metadata)
- Error details if execution failed

## Response `200`

Execution details retrieved successfully

- WorkflowExecutionResponse — Single workflow execution with full details
  - `data` WorkflowExecutionDetail, required — Detailed execution with full context and event history (only returned by show endpoint)
    - `id` string, uuid, required — Unique execution identifier
    - `status` 'running' | 'waiting' | 'ended' | 'failed' | 'handoff', required — Execution status: - `running`: Currently executing workflow steps - `waiting`: Paused, awaiting user input or timeout - `ended`: Successfully completed - `failed`: Terminated due to error - `handoff`: Transferred to human agent
    - `started_at` string, date-time, required — Execution start timestamp
    - `ended_at` string, date-time, nullable — Execution completion timestamp, null if still active
    - `last_event_at` string, date-time, required — Timestamp of most recent workflow event or activity
    - `tracking_id` string, uuid, nullable — Optional external tracking identifier for correlating with external systems
    - `whatsapp_conversation_id` string, uuid, nullable — Associated WhatsApp conversation identifier, links execution to its conversation
    - `workflow` WorkflowMinimal — Compact workflow reference used in execution objects
      - `id` string, uuid, required — Workflow identifier
      - `name` string, required — Workflow name
      - `status` string, required — Workflow status
    - `current_step` WorkflowStepReference — Reference to a workflow step (used in execution current_step tracking)
      - `id` string, uuid, required — Internal ID of the workflow step
      - `identifier` string, required — Step identifier within the workflow (e.g., 'start', 'step1', 'agent_greeting')
      - `stepable_type` string, nullable — Ruby class name of the step type (e.g., 'FlowAgentStep', 'FlowActionStep', 'FlowWaitStep', 'FlowDecideStep')
      - `position` object, nullable — Canvas position for visual editor
        - `x` number
        - `y` number
    - `error_details` object, nullable — Error information when status is 'failed' (error message, stack trace, step identifier)
    - `execution_context` object — Full execution context with standard structure. This is the exact execution context stored on the execution.
      - `vars` object, nullable — User-defined variables set during workflow execution (key-value pairs)
      - `system` object, nullable — System fields including trigger_type, tracking_id, and other internal metadata
        - `trigger_type` string — How the execution was initiated
        - `tracking_id` string, uuid — External tracking identifier for correlation
      - `context` object, nullable — Contextual data about the execution environment (channel, phone_number, etc.)
        - `channel` string — Communication channel
        - `phone_number` string — Phone number associated with execution
      - `metadata` object, nullable — Optional extra data (request details, timestamps, etc.)
        - `request` object — Request metadata
          - `ip` string
          - `user_agent` string
          - `timestamp` string, date-time
    - `events` WorkflowEvent[] — Chronological log of workflow events (step transitions, variable updates, agent actions)
      - `id` string, uuid, required — Event identifier
      - `event_type` string, required — Event type indicating what happened in the workflow execution. Common types: - `execution_started`, `execution_ended`, `execution_failed`: Execution lifecycle - `step_entered`, `step_completed`, `step_failed`: Step lifecycle - `decision_evaluating`, `decision_evaluated`: Conditional branching - `action_executing`, `action_performed`, `action_failed`: Action execution - `variables_set`, `variables_merged`: Variable updates - `wait_timeout`, `user_input_received`: Wait step events - `agent_iteration_started`, `agent_tool_called`, `agent_message_sent`: Agent step events
      - `direction` string, nullable — Edge direction/label for transition events (used when moving between steps)
      - `edge_label` string, nullable — Label of the edge taken during decision or transition events
      - `created_at` string, date-time, required — Event timestamp
      - `payload` object — Event-specific data (varies by event_type)
      - `step` WorkflowStepReference — Reference to a workflow step (used in execution current_step tracking)
        - `id` string, uuid, required — Internal ID of the workflow step
        - `identifier` string, required — Step identifier within the workflow (e.g., 'start', 'step1', 'agent_greeting')
        - `stepable_type` string, nullable — Ruby class name of the step type (e.g., 'FlowAgentStep', 'FlowActionStep', 'FlowWaitStep', 'FlowDecideStep')
        - `position` object, nullable — Canvas position for visual editor
          - `x` number
          - `y` number

## Other responses

- `401` — Missing or invalid API key
- `404` — Resource not found

---

[API](https://skmtc.net/kapso/apis/kapso-platform-api.md) · [All operations](https://skmtc.net/kapso/apis/kapso-platform-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/kapso/kapso-platform-api/revisions/18ff5548a33f/schema)
