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

# Resume waiting workflow execution

> Resume a workflow execution that is in 'waiting' status. Workflows enter waiting status when they reach a wait_for_response step or are explicitly paused.

Send a message with:
- `kind`: Message type, defaults to "payload" if omitted
- `data`: The actual payload - can be a string for simple text responses (e.g., "yes", "no") or an object for structured data (e.g., button clicks, form submissions)

Optionally include variables to update the execution context:
- `variables`: Key-value pairs to merge into the execution context. These will be available in subsequent workflow steps as `{{var_name}}`. Existing variables with the same key will be overwritten.

After resuming, the workflow will continue processing from the waiting step with the provided message data and updated variables.

**Response**: Returns minimal execution 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.




## OpenAPI

````yaml /api/platform/v1/openapi-workflows.yaml post /workflow_executions/{execution_id}/resume
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}/resume:
    parameters:
      - name: execution_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
        description: Execution identifier
    post:
      tags:
        - Workflows
      summary: Resume waiting workflow execution
      description: >
        Resume a workflow execution that is in 'waiting' status. Workflows enter
        waiting status when they reach a wait_for_response step or are
        explicitly paused.


        Send a message with:

        - `kind`: Message type, defaults to "payload" if omitted

        - `data`: The actual payload - can be a string for simple text responses
        (e.g., "yes", "no") or an object for structured data (e.g., button
        clicks, form submissions)


        Optionally include variables to update the execution context:

        - `variables`: Key-value pairs to merge into the execution context.
        These will be available in subsequent workflow steps as `{{var_name}}`.
        Existing variables with the same key will be overwritten.


        After resuming, the workflow will continue processing from the waiting
        step with the provided message data and updated variables.


        **Response**: Returns minimal execution 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.
      operationId: resumeWorkflowExecution
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkflowExecutionResumeRequest'
      responses:
        '200':
          description: Execution resumed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowExecutionMinimalResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '422':
          $ref: '#/components/responses/ValidationError'
components:
  schemas:
    WorkflowExecutionResumeRequest:
      type: object
      required:
        - message
      properties:
        message:
          type: object
          required:
            - data
          properties:
            kind:
              type: string
              default: payload
              description: |
                Message kind. Defaults to "payload" if omitted.
              example: payload
            data:
              description: >
                Message data. Can be any JSON value - string, object, or array.
                This is passed to the workflow step that is waiting for input.
              oneOf:
                - type: string
                  example: yes, proceed
                - type: object
                  example:
                    type: interactive_reply
                    button_id: btn_confirm
                    payload: Please proceed
                - type: array
                  example:
                    - option1
                    - option2
        variables:
          type: object
          description: >
            Optional variables to merge into the execution context. These
            variables will be added to the `vars` section of the execution
            context, making them available throughout the workflow. New
            variables are merged with existing ones - duplicate keys will be
            overwritten with new values.
          additionalProperties: true
          example:
            estado: retomado
            custom_var: 123
            user_response: confirmed
      description: >
        Request to resume a workflow execution that is in 'waiting' status.
        Executions wait when they reach a wait_for_response step or when
        explicitly paused. The message data can be a simple string for text
        responses or a structured object for complex interactions.


        You can optionally include variables to update the execution context
        with new or modified variables that will be available to subsequent
        workflow steps.
    WorkflowExecutionMinimalResponse:
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/WorkflowExecution'
      description: >-
        Minimal workflow execution response (without execution_context and
        events)
    WorkflowExecution:
      allOf:
        - $ref: '#/components/schemas/WorkflowExecutionSummary'
        - type: object
          properties:
            error_details:
              type:
                - object
                - 'null'
              description: >-
                Error information when status is 'failed' (error message, stack
                trace, step identifier)
              additionalProperties: true
      description: Base workflow execution schema
    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
    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)
  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'
    ValidationError:
      description: Request validation failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````