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

> Retrieve workflow executions associated with a WhatsApp conversation. Executions are returned in reverse chronological order (most recent first).

Use this endpoint to map a conversation to its workflow executions and track automation history for a specific conversation.

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




## OpenAPI

````yaml /api/platform/v1/openapi-workflows.yaml get /whatsapp/conversations/{conversation_id}/flow_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:
  /whatsapp/conversations/{conversation_id}/flow_executions:
    parameters:
      - name: conversation_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
        description: WhatsApp conversation identifier
    get:
      tags:
        - WhatsApp Conversations
      summary: List conversation workflow executions
      description: >
        Retrieve workflow executions associated with a WhatsApp conversation.
        Executions are returned in reverse chronological order (most recent
        first).


        Use this endpoint to map a conversation to its workflow executions and
        track automation history for a specific conversation.


        **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.
      operationId: listConversationFlowExecutions
      parameters:
        - name: status
          in: query
          schema:
            type: string
            enum:
              - running
              - waiting
              - ended
              - failed
              - handoff
          description: Filter by execution status
        - 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'
              example:
                data:
                  - id: 550e8400-e29b-41d4-a716-446655440000
                    status: running
                    tracking_id: 8b1c9d2e-3f4a-5b6c-7d8e-9f0a1b2c3d4e
                    whatsapp_conversation_id: 8c9c7a6b-5d4e-3f2a-1b0c-9d8e7f6a5b4c
                    started_at: '2025-12-05T17:20:00.000Z'
                    last_event_at: '2025-12-05T17:25:00.000Z'
                    ended_at: null
                    workflow:
                      id: flow_789
                      name: Order Support
                      status: active
                    current_step:
                      identifier: wait_response
                      stepable_type: FlowWaitStep
                paging:
                  cursors:
                    before: >-
                      eyJ2YWx1ZXMiOlsiMjAyNi0wNS0xNVQxMzowNTowMC4wMDAwMDBaIiwiNTUwZTg0MDAtZTI5Yi00MWQ0LWE3MTYtNDQ2NjU1NDQwMDAwIl0sImNvbHVtbnMiOlsiY3JlYXRlZF9hdCIsImlkIl19
                    after: >-
                      eyJ2YWx1ZXMiOlsiMjAyNi0wNS0xNVQxMjowNTowMC4wMDAwMDBaIiwiNTUwZTg0MDAtZTI5Yi00MWQ0LWE3MTYtNDQ2NjU1NDQwMDAwIl0sImNvbHVtbnMiOlsiY3JlYXRlZF9hdCIsImlkIl19
                  next: null
                  previous: null
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          description: Conversation not found or doesn't belong to project
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: Conversation not found
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
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Human-readable error message
    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
    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'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````