Skip to main content
POST
Reroute a node connection
Use this endpoint to modify an existing node connection to another target. Send the source node in the URL path and the new target in the request body. The source node must have exactly one outgoing connection. Branch and experiment branch nodes cannot be rerouted with this endpoint because they have multiple branch-specific outputs. The current target must still have another incoming connection after the reroute, and the new target must be valid for the source node. The workflow cannot be edited while in a SENDING state.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

workflowId
string
required

The ID of the workflow.

Example:

"clw1a3b5c7d9e1f3g5h7i9j1"

nodeId
string
required

The ID of the source workflow node whose outgoing connection should be moved.

Example:

"cln1a3b5c7d9e1f3g5h7i9j1"

Body

application/json

Reroute the source node's only outgoing connection to newTargetNodeId.

expectedRevisionId
string | null
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.

newTargetNodeId
string
required

The valid workflow node that should receive the connection from the source node.

Example:

"cln3c5d7e9f1g3h5i7j9k1l3"

Response

Node connection rerouted.

The updated source node, plus the latest workflow.

id
string
required
typeName
enum<string>
required
Available options:
SignupTrigger
nextNodeIds
string[]
required

The IDs of the nodes that are downstream of this node.

workflowRevisionId
string
required

The current workflow revision token. Pass the latest value as expectedRevisionId on the next workflow mutation.

workflow
object
required
Example:
Last modified on August 6, 2026