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

# Cancel Workflow Execution API

> Stop one contact's execution before its next external action. Cancelling an already-terminal execution is a no-op.



## OpenAPI

````yaml POST /workflow-executions/{execution_id}:cancel
openapi: 3.1.0
info:
  title: Bolna API
  description: >-
    Use and leverage Bolna Voice AI using APIs through HTTP requests from any
    language in your applications and workflows.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.bolna.ai
    description: Production server
security:
  - bearerAuth: []
paths:
  /workflow-executions/{execution_id}:cancel:
    post:
      description: >-
        Stops one execution before its next external action. Cancelling an
        already-terminal execution is a no-op that returns its current status.
      parameters:
        - in: path
          name: execution_id
          required: true
          schema:
            type: string
          description: The `execution_id` to cancel
      requestBody:
        description: Optional cancellation reason.
        content:
          application/json:
            schema:
              type: object
              properties:
                reason:
                  type: string
                  description: Free-form reason recorded on the cancellation.
        required: false
      responses:
        '200':
          description: Execution cancelled (or already terminal)
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: The execution status after the cancel.
                    enum:
                      - pending
                      - running
                      - completed
                      - failed
                      - cancelled
                      - aborted
                required:
                  - status
        '404':
          description: Execution not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowError'
components:
  schemas:
    WorkflowError:
      type: object
      description: >-
        Error envelope returned by every workflow endpoint. `detail.code` is a
        stable machine-readable code; extra keys (such as `current_revision` on
        `revision_conflict`, `execution_id` on `duplicate_run`, or `issues` on
        `invalid_definition`) ride alongside it.
      required:
        - detail
      properties:
        detail:
          type: object
          additionalProperties: true
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: Machine-readable error code.
              example: revision_conflict
            message:
              type: string
              description: Human-readable explanation.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````