v7

latestOpenAPI 3.1.02026-08-0664219301.2 KB
Workflow nodes

Reroute a node connection

Reroute the source node's existing connection to another valid target node. Returns the updated source node and the latest workflow.

post/v1/workflows/{workflowId}/nodes/{nodeId}/reroute

Request body

expectedRevisionIdstring 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.

newTargetNodeIdstring required

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

Example request

{
  "expectedRevisionId": "clx7a3b5c7d9e1f3g5h7i9j1",
  "newTargetNodeId": "cln3c5d7e9f1g3h5i7j9k1l3"
}

Response

Node connection rerouted.

OR
OR
OR
OR
OR
OR
OR
OR
OR
OR
OR

Example response

{
  "id": "cln8p0q2r4s6t8u0v2w4x6z8",
  "typeName": "SignupTrigger",
  "nextNodeIds": [
    "cln3c5d7e9f1g3h5i7j9k1l3"
  ],
  "workflowRevisionId": "clx7a3b5c7d9e1f3g5h7i9j2",
  "workflow": {
    "id": "clw1a3b5c7d9e1f3g5h7i9j1",
    "workflowRevisionId": "clx7a3b5c7d9e1f3g5h7i9j2",
    "status": "Draft",
    "name": "Welcome series",
    "description": "Onboarding emails for new signups",
    "mailingListId": "clm2k8j4h6g0f8d6s4a2b0z8",
    "rootNodeId": "cln8p0q2r4s6t8u0v2w4x6z8",
    "nodes": {
      "cln8p0q2r4s6t8u0v2w4x6z8": {
        "typeName": "SignupTrigger",
        "nextNodeIds": [
          "cln3c5d7e9f1g3h5i7j9k1l3"
        ]
      },
      "cln1a3b5c7d9e1f3g5h7i9j1": {
        "typeName": "AudienceFilter",
        "nextNodeIds": [
          "cln3c5d7e9f1g3h5i7j9k1l3"
        ]
      },
      "cln3c5d7e9f1g3h5i7j9k1l3": {
        "typeName": "SendEmailAction",
        "nextNodeIds": [],
        "emailMessageId": "cle5f7g9h1i3j5k7l9m1n3p5",
        "subject": "Welcome to Acme!"
      }
    }
  }
}