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

# Post apiworkflow executions



## OpenAPI

````yaml /api-reference/openapi.json post /api/workflow-executions
openapi: 3.0.4
info:
  title: Smartbills.API
  version: v1
servers:
  - url: https://api.smartbills.io
    description: Production
security: []
paths:
  /api/workflow-executions:
    post:
      tags:
        - WorkflowExecution
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkflowsWorkflowExecutionCreateRequest'
          text/json:
            schema:
              $ref: '#/components/schemas/WorkflowsWorkflowExecutionCreateRequest'
          application/*+json:
            schema:
              $ref: '#/components/schemas/WorkflowsWorkflowExecutionCreateRequest'
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/WorkflowsWorkflowExecutionResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowsWorkflowExecutionResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/WorkflowsWorkflowExecutionResponse'
components:
  schemas:
    WorkflowsWorkflowExecutionCreateRequest:
      type: object
      properties:
        workflowId:
          type: string
          format: uuid
        entityId:
          type: string
          nullable: true
        entityData:
          type: object
          additionalProperties: {}
          nullable: true
        triggeredBy:
          type: string
          nullable: true
        correlationId:
          type: string
          nullable: true
      additionalProperties: false
    WorkflowsWorkflowExecutionResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
        workflowId:
          type: string
          format: uuid
        workflowName:
          type: string
          nullable: true
        entityId:
          type: string
          nullable: true
        entityType:
          type: string
          nullable: true
        businessId:
          type: integer
          format: int64
        userId:
          type: integer
          format: int64
          nullable: true
        status:
          type: string
          nullable: true
        currentStepId:
          type: string
          format: uuid
          nullable: true
        currentStepName:
          type: string
          nullable: true
        startedAt:
          type: string
          format: date-time
        completedAt:
          type: string
          format: date-time
          nullable: true
        lastActivityAt:
          type: string
          format: date-time
          nullable: true
        steps:
          type: array
          items:
            $ref: '#/components/schemas/WorkflowsWorkflowStepExecutionResponse'
          nullable: true
        errorMessage:
          type: string
          nullable: true
        totalExecutionTimeMs:
          type: integer
          format: int32
        context:
          type: object
          additionalProperties: {}
          nullable: true
        triggeredBy:
          type: string
          nullable: true
        correlationId:
          type: string
          nullable: true
        retryCount:
          type: integer
          format: int32
        totalSteps:
          type: integer
          format: int32
        completedSteps:
          type: integer
          format: int32
        failedSteps:
          type: integer
          format: int32
        progressPercentage:
          type: number
          format: double
        events:
          type: array
          items:
            $ref: '#/components/schemas/WorkflowsWorkflowExecutionEventResponse'
          nullable: true
      additionalProperties: false
    WorkflowsWorkflowStepExecutionResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
        workflowExecutionId:
          type: string
          format: uuid
        stepId:
          type: string
          format: uuid
        stepName:
          type: string
          nullable: true
        stepType:
          type: string
          nullable: true
        order:
          type: integer
          format: int32
        status:
          type: string
          nullable: true
        startedAt:
          type: string
          format: date-time
        completedAt:
          type: string
          format: date-time
          nullable: true
        input:
          type: string
          nullable: true
        output:
          type: string
          nullable: true
        errorMessage:
          type: string
          nullable: true
        executionTimeMs:
          type: integer
          format: int32
        retryCount:
          type: integer
          format: int32
        metadata:
          type: object
          additionalProperties: {}
          nullable: true
        conditionResults:
          type: array
          items:
            $ref: '#/components/schemas/WorkflowsWorkflowStepConditionResultResponse'
          nullable: true
        actionResults:
          type: array
          items:
            $ref: '#/components/schemas/WorkflowsWorkflowStepActionResultResponse'
          nullable: true
        eventResults:
          type: array
          items:
            $ref: '#/components/schemas/WorkflowsWorkflowStepEventResultResponse'
          nullable: true
        isActive:
          type: boolean
        description:
          type: string
          nullable: true
      additionalProperties: false
    WorkflowsWorkflowExecutionEventResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
        workflowExecutionId:
          type: string
          format: uuid
        eventType:
          type: string
          nullable: true
        eventData:
          type: string
          nullable: true
        timestamp:
          type: string
          format: date-time
        source:
          type: string
          nullable: true
        isProcessed:
          type: boolean
      additionalProperties: false
    WorkflowsWorkflowStepConditionResultResponse:
      type: object
      properties:
        conditionType:
          type: string
          nullable: true
        isMet:
          type: boolean
        details:
          type: string
          nullable: true
        evaluatedAt:
          type: string
          format: date-time
      additionalProperties: false
    WorkflowsWorkflowStepActionResultResponse:
      type: object
      properties:
        actionType:
          type: string
          nullable: true
        isSuccessful:
          type: boolean
        result:
          type: string
          nullable: true
        errorMessage:
          type: string
          nullable: true
        executedAt:
          type: string
          format: date-time
        executionTimeMs:
          type: integer
          format: int32
      additionalProperties: false
    WorkflowsWorkflowStepEventResultResponse:
      type: object
      properties:
        eventType:
          type: string
          nullable: true
        isReceived:
          type: boolean
        eventPayload:
          type: string
          nullable: true
        receivedAt:
          type: string
          format: date-time
          nullable: true
        timeoutAt:
          type: string
          format: date-time
          nullable: true
      additionalProperties: false

````