---
title: "Delete a workflow node"
method: DELETE
path: "/v1/workflows/{workflowId}/nodes/{nodeId}"
tags: ["Workflow nodes"]
---

# Delete a workflow node

`DELETE /v1/workflows/{workflowId}/nodes/{nodeId}`

Delete a single workflow node. If contacts are queued at the node, Loops returns with `"status": "queuedContactsFound"` instead of deleting. Retry with `queuedContactPolicy: "discard"` to delete the node and discard those queued contacts. Confirmed deletion responses include the simplified workflow after the node is removed.

## Request body

- DeleteWorkflowNodeRequest
  - `expectedRevisionId` string, nullable, required — The workflow revision token returned by the latest workflow read or mutation. Older workflows may return `null` before their first revision-aware mutation; pass `null` back as `expectedRevisionId` in that case. If the token is stale, the API returns a `409 Conflict` error.
  - `dryRun` boolean — If `true`, the request will be validated but the workflow will not be modified.
  - `queuedContactPolicy` 'fail' | 'discard' — `fail` returns queued-contact impact instead of mutating. `discard` confirms that matching queued contacts should be discarded. Defaults to `fail` when omitted.

## Response `200`

Delete dry run, queued-contact warning, or deletion result. Confirmed deletion responses include the simplified workflow after the node is removed.

- union
  - WorkflowQueuedContactDeletePreview
    - `status` 'dryRun' | 'queuedContactsFound', required
    - `nodeIds` string[], required — The IDs of the nodes that would be deleted.
    - `queuedContactCount` number, required — The number of queued contacts that would be removed from the workflow due to the node deletion.
  - WorkflowDeletedResponse
    - `status` 'deleted', required
    - `nodeIds` string[], required
    - `workflowRevisionId` string, required — The current workflow revision token. Pass the latest value as `expectedRevisionId` on the next workflow mutation.
    - `queuedContactCount` number, required — The number of queued contacts that were removed from the workflow due to the node deletion.
    - `workflow` SimplifiedWorkflow, required
      - `id` string, required — The ID of the workflow.
      - `workflowRevisionId` string, nullable, required — The current workflow revision token. Pass the latest value as `expectedRevisionId` on the next workflow mutation. Will be `null` for workflows without a revision token yet.
      - `status` 'Draft' | 'Sending' | 'Paused' | 'PausedAndQueueing', required
      - `name` string — The name of the workflow.
      - `description` string — The description of the workflow.
      - `mailingListId` string, nullable, required — The ID of the mailing list the workflow sends to.
      - `rootNodeId` string, required — The ID of the root node in the workflow graph.
      - `nodes` object, required — A map of node IDs to simplified node objects. Each node includes `typeName` and `nextNodeIds`, plus type-specific fields when present. To get the full node object, use the `GET /v1/workflows/{workflowId}/nodes/{nodeId}` endpoint.

## Other responses

- `400` — Invalid `workflowId`, `nodeId`, request body, or delete target.
- `401` — Invalid API key.
- `404` — Workflow or workflow node not found.
- `405` — Wrong HTTP request method.
- `409` — `expectedRevisionId` is stale.

---

[API](https://skmtc.net/loops/apis/loops-openapi-spec.md) · [All operations](https://skmtc.net/loops/apis/loops-openapi-spec/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/loops/loops-openapi-spec/revisions/9cc087257f0d/schema)
