Create a workflow node
Create a new default workflow node and return it with the latest workflow
insertMode:
betweenplaces it between an existingfromNodeId->toNodeIdconnectionbeforeplaces it beforetoNodeIdafterplaces it afterfromNodeIdwhen that node has exactly one outgoing connection.
after for simple linear paths when you do not want to fetch and pass the current child node ID. after is invalid when fromNodeId has no outgoing nodes, multiple outgoing nodes, or is an exit node. When the source has multiple outgoing nodes, use between with the exact toNodeId instead. For before, deprecated beforeNodeId requests are still accepted for compatibility, but new callers should use toNodeId.
New nodes start with default settings; update the node after creation to configure it. Branch nodes create their default paths too: BranchNode creates two AudienceFilter children, and ExperimentBranchNode creates two regular VariantNode children plus one control VariantNode.
Public workflows can have up to 300 nodes. Generated children count toward that limit, so a normal create adds 1 node, BranchNode adds 3, and ExperimentBranchNode adds 4. To add a sibling child path to a branch or experiment branch, use the POST /v1/workflows/{workflowId}/nodes/{nodeId}/add-branch endpoint. Branch paths can be edited with create-node, but a workflow cannot be started unless each direct BranchNode child is an AudienceFilter. For experiments, use create-node only to insert a missing VariantNode before non-variant content; use add-branch for another variant path.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The ID of the workflow.
Body
- Option 1
- Option 2
- Option 3
- Option 4
Create a new workflow node with an explicit insertMode. To configure the node after creation, use the POST /v1/workflows/{workflowId}/nodes/{nodeId} endpoint.
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.
between Node types that can be created with the API. *Trigger nodes and ExitAction nodes cannot be created.
AudienceFilter, BranchNode, ExperimentBranchNode, TimerAction, SendEmailAction, VariantNode The node to insert after. This node must currently point to toNodeId. If this is an ExperimentBranchNode, nodeTypeName must be VariantNode and toNodeId cannot already be a VariantNode.
The node to insert before.
Related topics
API IntroductionCreate a workflowWorkflowsDelete a workflow nodeUpdate a workflow node
