Workflow Edges
Add Edge
Connect two workflow nodes with a directed transition, optionally labelled for conditional branches.
POST
Add an edge to a workflow
Creates a directed edge between two nodes in a workflow. Edges encode the “what happens next” decision: after a lead finishes the step at
Common
from_node_id, the workflow checks each outgoing edge in order, picks the first edge whose label matches the outcome, and moves the lead to to_node_id. Unlabelled edges always match, they are the default next step for sequential flows. Labelled edges are required for CONDITIONAL nodes and recommended for any node where the outcome can branch.
When to use this
- Building a new workflow: connect freshly created nodes into a graph after using Create Node.
- Adding a branch: split a sequential workflow into multiple outcome-based paths.
- Rewiring a workflow: after deleting an obsolete edge, create the replacement transition.
active, be aware that edge changes take effect on the next scheduling tick. In-flight leads already past from_node_id are not affected.
Basic transition
For simple linear workflows, create one edge from each node to the next:Conditional transitions
ForCONDITIONAL nodes, create one edge per branch and set the label to match the branch name:
label values for call-outcome branches are COMPLETED, FAILED, NO_ANSWER, and BUSY. For boolean conditions, use true and false. Custom values are accepted, but they must match what your CONDITIONAL node emits.
Path parameters
| Parameter | Description |
|---|---|
id | The workflow ID, for example wfl_m3v7zb9rk2px. |
Errors
404 Not Foundis returned when either node does not exist or does not belong to this workflow.409 Conflictis returned when an edge with the samefrom_node_id,to_node_id, andlabelalready exists.
Request
Response
Related endpoints
- List Edges: fetch all transitions in a workflow.
- Delete Edge: remove a transition.
- Create Node: add a node before connecting it.
- List Nodes: confirm node IDs before creating an edge.
Authorizations
Pass your API key as a Bearer token in the Authorization header.
Path Parameters
Body
application/json
Add an edge to a workflow