workflows
Attach Tool To Node
Attach a CONFIGURED tool instance to a workflow node.
Workflow nodes never reference tool types (registry keys) directly —
they only reference instances that already exist in agent_tools. The
rule: a user cannot attach cold_transfer to a node; they must first
create a configured instance like transfer_to_billing (with its
sip_trunk_id, target_number, etc.) on an agent, then attach that
instance_name here.
Validation:
- If
?agent_id=is provided, the (agent_id, instance_name) pair MUST exist inagent_tools(active + enabled). Strict. - Otherwise, the instance_name MUST exist on at least one agent
currently using this workflow (i.e.
agents.workflow_id == this). - If the workflow is not yet attached to any agent, the request is rejected with 422 — bind the workflow to an agent first, then attach instances. (Avoids accumulating dangling string refs that only fail at runtime.)
POST
Attach Tool To Node
Authorizations
Body
application/json
Response
Successful Response