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

> Retrieve execution history for a workflow. Executions are returned in reverse chronological order (most recent first). Use query parameters to filter by status, time range, or cursor.

**Response**: Returns summary data (id, status, tracking_id, timestamps, workflow, current_step). Does not include execution_context or events. Use GET /workflow_executions/{id} to retrieve full execution details.

**Pagination**: Use `limit`, `after`, and `before`. Pagination cursors are returned in the `paging` object.

Common use cases:
- Monitor active executions for a workflow
- Review failed executions for debugging
- Audit execution history over time
- Find waiting executions that need user input




## OpenAPI

````yaml /api/platform/v1/openapi-workflows.yaml get /workflows/{workflow_id}/executions
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:
  /workflows/{workflow_id}/executions:
    parameters:
      - name: workflow_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
        description: Workflow identifier
    get:
      tags:
        - Workflows
      summary: List workflow executions
      description: >
        Retrieve execution history for a workflow. Executions are returned in
        reverse chronological order (most recent first). Use query parameters to
        filter by status, time range, or cursor.


        **Response**: Returns summary data (id, status, tracking_id, timestamps,
        workflow, current_step). Does not include execution_context or events.
        Use GET /workflow_executions/{id} to retrieve full execution details.


        **Pagination**: Use `limit`, `after`, and `before`. Pagination cursors
        are returned in the `paging` object.


        Common use cases:

        - Monitor active executions for a workflow

        - Review failed executions for debugging

        - Audit execution history over time

        - Find waiting executions that need user input
      operationId: listWorkflowExecutions
      parameters:
        - name: status
          in: query
          schema:
            type: string
            enum:
              - running
              - waiting
              - ended
              - failed
              - handoff
          description: Filter by execution status
        - name: waiting_reason
          in: query
          schema:
            type: string
          description: >-
            Filter waiting executions by reason (e.g., 'wait_for_response',
            'timeout')
        - name: created_after
          in: query
          schema:
            type: string
            format: date-time
          description: Only return executions started on or after this timestamp
        - name: created_before
          in: query
          schema:
            type: string
            format: date-time
          description: Only return executions started on or before this timestamp
        - name: whatsapp_conversation_id
          in: query
          schema:
            type: string
            format: uuid
          description: Filter by associated WhatsApp conversation
        - 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: Executions retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowExecutionListResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
components:
  schemas:
    WorkflowExecutionListResponse:
      type: object
      required:
        - data
        - paging
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/WorkflowExecutionSummary'
        paging:
          $ref: '#/components/schemas/Paging'
      description: List of workflow executions with cursor pagination metadata
    WorkflowExecutionSummary:
      type: object
      required:
        - id
        - status
        - started_at
        - last_event_at
      properties:
        id:
          type: string
          format: uuid
          description: Unique execution identifier
        status:
          type: string
          enum:
            - running
            - waiting
            - ended
            - failed
            - handoff
          description: |
            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:
          type: string
          format: date-time
          description: Execution start timestamp
        ended_at:
          type:
            - string
            - 'null'
          format: date-time
          description: Execution completion timestamp, null if still active
        last_event_at:
          type: string
          format: date-time
          description: Timestamp of most recent workflow event or activity
        tracking_id:
          type:
            - string
            - 'null'
          format: uuid
          description: >-
            Optional external tracking identifier for correlating with external
            systems
        whatsapp_conversation_id:
          type:
            - string
            - 'null'
          format: uuid
          description: >-
            Associated WhatsApp conversation identifier, links execution to its
            conversation
        workflow:
          $ref: '#/components/schemas/WorkflowMinimal'
        current_step:
          $ref: '#/components/schemas/WorkflowStepReference'
      description: Minimal execution representation for list endpoints
    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
    WorkflowMinimal:
      type: object
      required:
        - id
        - name
        - status
      properties:
        id:
          type: string
          format: uuid
          description: Workflow identifier
        name:
          type: string
          description: Workflow name
        status:
          type: string
          description: Workflow status
      description: Compact workflow reference used in execution objects
    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

````