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

# List workflow execution events

> Retrieve events for a workflow execution in reverse chronological order (most recent first).

Use `limit`, `after`, and `before` for cursor pagination. Cursors are returned in the `paging` object.




## OpenAPI

````yaml /api/platform/v1/openapi-workflows.yaml get /workflow_executions/{execution_id}/events
openapi: 3.1.0
info:
  title: Kapso Platform API – Advanced Resources
  version: 0.1.0
  description: >
    Build WhatsApp automation workflows and serverless functions. Create
    multi-step conversation flows, inspect executions, and deploy custom logic.
servers:
  - url: https://api.kapso.ai/platform/v1
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Workflows
    description: Create and manage conversation workflows and executions
  - name: Workflow Triggers
    description: Configure workflow triggers to automate execution
  - name: Functions
    description: Manage serverless functions, deployments, and secrets
  - name: WhatsApp Conversations
    description: Query WhatsApp conversation data and related resources
paths:
  /workflow_executions/{execution_id}/events:
    parameters:
      - name: execution_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
        description: Execution identifier
    get:
      tags:
        - Workflows
      summary: List workflow execution events
      description: >
        Retrieve events for a workflow execution in reverse chronological order
        (most recent first).


        Use `limit`, `after`, and `before` for cursor pagination. Cursors are
        returned in the `paging` object.
      operationId: listWorkflowExecutionEvents
      parameters:
        - name: event_type
          in: query
          schema:
            type: string
          description: Filter by event type
        - name: limit
          in: query
          description: >-
            Maximum number of results per cursor-paginated page (default 20, max
            100).
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 20
        - name: before
          in: query
          description: Cursor for the previous page (Base64 encoded).
          schema:
            type: string
        - name: after
          in: query
          description: Cursor for the next page (Base64 encoded).
          schema:
            type: string
      responses:
        '200':
          description: Events retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowEventListResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
components:
  schemas:
    WorkflowEventListResponse:
      type: object
      required:
        - data
        - paging
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/WorkflowEvent'
        paging:
          $ref: '#/components/schemas/Paging'
      description: List of workflow execution events with cursor pagination metadata
    WorkflowEvent:
      type: object
      required:
        - id
        - event_type
        - created_at
      properties:
        id:
          type: string
          format: uuid
          description: Event identifier
        event_type:
          type: string
          description: >
            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:
          type:
            - string
            - 'null'
          description: >-
            Edge direction/label for transition events (used when moving between
            steps)
        edge_label:
          type:
            - string
            - 'null'
          description: Label of the edge taken during decision or transition events
        created_at:
          type: string
          format: date-time
          description: Event timestamp
        payload:
          type: object
          additionalProperties: true
          description: Event-specific data (varies by event_type)
        step:
          $ref: '#/components/schemas/WorkflowStepReference'
      description: Workflow execution event capturing state changes and transitions
    Paging:
      type: object
      properties:
        cursors:
          $ref: '#/components/schemas/PaginationCursor'
        next:
          type:
            - string
            - 'null'
          description: Cursor for next page
        previous:
          type:
            - string
            - 'null'
          description: Cursor for previous page
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Human-readable error message
    WorkflowStepReference:
      type: object
      required:
        - id
        - identifier
      properties:
        id:
          type: string
          format: uuid
          description: Internal ID of the workflow step
        identifier:
          type: string
          description: >-
            Step identifier within the workflow (e.g., 'start', 'step1',
            'agent_greeting')
        stepable_type:
          type:
            - string
            - 'null'
          description: >
            Ruby class name of the step type (e.g., 'FlowAgentStep',
            'FlowActionStep', 'FlowWaitStep', 'FlowDecideStep')
        position:
          type:
            - object
            - 'null'
          description: Canvas position for visual editor
          properties:
            x:
              type: number
            'y':
              type: number
          additionalProperties: true
      additionalProperties: true
      description: Reference to a workflow step (used in execution current_step tracking)
    PaginationCursor:
      type: object
      properties:
        before:
          type: string
          description: Cursor for previous page (Base64 encoded)
        after:
          type: string
          description: Cursor for next page (Base64 encoded)
  responses:
    UnauthorizedError:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFoundError:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````