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

# Delete workflow block

> Deletes a whole block, which is removed from the workflow with the links into it. Send `expectedSteps` as your last read returned them, so a changed block is not deleted by mistake. The response lists the links that were cleared and the links that now run.



## OpenAPI

````yaml /specs-prettified/realtime/openapi.stable.json delete /v1/stable/workflow/{workflowID}/block/{blockID}
openapi: 3.0.0
info:
  title: Realtime
  description: Realtime gateway API service
  version: 1.0.0
  contact: {}
servers:
  - url: https://realtime-api.voiceflow.com
security: []
tags: []
paths:
  /v1/stable/workflow/{workflowID}/block/{blockID}:
    delete:
      tags:
        - Workflow
      summary: Delete workflow block
      description: Deletes a whole block, which is removed from the workflow with the
        links into it. Send `expectedSteps` as your last read returned them, so
        a changed block is not deleted by mistake. The response lists the links
        that were cleared and the links that now run.
      operationId: StableWorkflowController_deleteBlock
      parameters:
        - name: workflowID
          required: true
          in: path
          schema:
            type: string
          x-vf-doc:
            description: The ID of the workflow to operate on.
          description: The ID of the workflow to operate on.
        - name: blockID
          required: true
          in: path
          schema:
            type: string
          x-vf-doc:
            description: The ID of the block to operate on.
          description: The ID of the block to operate on.
        - name: projectID
          required: true
          in: query
          schema:
            type: string
            description: The ID of the project to operate on.
        - name: environmentAlias
          required: true
          in: query
          schema:
            type: string
            description: The alias of the environment to operate on (e.g. `main`).
        - name: expectedSteps
          required: true
          in: query
          schema:
            description: "The block's step IDs exactly as your last read returned them, in
              order, as an array: [\"m1\", \"e1\"]. For an action, the action
              IDs of its exit. If they changed, nothing is written."
            type: array
            items:
              type: string
      responses:
        "200":
          description: Confirms the block was deleted. Returns what was removed, the links
            into it that were cleared, and the links that now run.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StableWorkflowRemovalResponse"
          x-vf-doc:
            description: Confirms the block was deleted. Returns what was removed, the links
              into it that were cleared, and the links that now run.
      security:
        - token: []
components:
  schemas:
    StableWorkflowRemovalResponse:
      type: object
      properties:
        message:
          type: string
          description: What was deleted.
        removed:
          type: object
          properties:
            blocks:
              type: array
              items:
                type: string
              description: Blocks removed, including a block whose only step was removed.
            steps:
              type: array
              items:
                type: string
              description: Steps removed, including actions on removed exits.
          required:
            - blocks
            - steps
        clearedLinks:
          type: array
          items:
            $ref: "#/components/schemas/StableWorkflowInbound"
          description: Exits of the steps that remain whose path led to a removed block or
            step. Each is now unlinked. An exit whose actions led there is named
            by its step and port.
        linksNowRunning:
          type: array
          items:
            type: object
            properties:
              stepID:
                type: string
              port:
                type: string
              to:
                nullable: true
                type: string
            required:
              - stepID
              - port
              - to
          description: Hidden links of a step that became the last step of its block. They
            did not run before the delete and run now, as on the canvas.
      required:
        - message
        - removed
        - clearedLinks
        - linksNowRunning
    StableWorkflowInbound:
      type: object
      properties:
        stepID:
          type: string
        port:
          type: string
      required:
        - stepID
        - port
  securitySchemes:
    token:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: Voiceflow bearer token
````
