Update Node Flow
Write the graph's live fields without validating.
Replaces the fields you send and leaves the others as they are. Each field is replaced as a whole: send the complete nodes array, not just the node you changed. Read the current graph with Get Node Flow, change it and send it back.
This route does not validate the graph, and it does not change what calls run. Calls use the last published version, so run Validate and then Publish to put your change live.
If the graph has an open draft, the fields you send are merged into the draft as well, so a publish does not bring back an older draft over your update. Draft fields you did not send are kept.
This route changes the graph only. Voice, model, phone numbers, transfers, webhooks, post-call analysis and other settings belong to the companion call flow: use Update Call Flow with the call flow ID from Get Node Flow.
Headers
x-workspace-idstringrequiredWorkspace identifier for the API.
Path Parameters
idstringrequiredThe graph _id.
Request Body
Send any of these. Other fields are ignored. Shapes are described in Graph fields.
namestringThe flow's name. The companion call flow takes the new name when you publish.
descriptionstringA description of the flow.
startNodeIdstringThe first node.
variablesarrayReplaces the declared variables.
globalsobjectReplaces persona, guardrails, knowledgeBases and interrupts together. Knowledge bases you add must belong to your workspace.
routerobjectReplaces the router settings.
nodesarrayReplaces all nodes.
edgesarrayReplaces all edges.
dataSourcesarrayReplaces the data sources.
Errors
| Status | Body | When |
|---|---|---|
400 | {"code": "WORKSPACE_ID_REQUIRED"} | No x-workspace-id |
400 | {"code": "KNOWLEDGE_BASE_NOT_IN_WORKSPACE", "params": {"knowledgeBaseIds": [...]}} | A knowledge base you add is not in your workspace |
404 | {"code": "NODE_GRAPH_NOT_FOUND"} | No graph with that ID in the workspace |
500 | {"code": "NODE_GRAPH_UPDATE_FAILED"} | Unexpected server error |
Response Fields
The body is the updated graph, in the same shape as Create Node Flow.
curl -X PUT "https://api.trillet.ai/v2/api/node-graphs/{id}" \
-H "x-api-key: YOUR_API_KEY" \
-H "x-workspace-id: YOUR_WORKSPACE_ID" \
-H "Content-Type: application/json" \
-d '{
"name": "Front desk v2",
"globals": {
"persona": "You are the friendly front desk assistant for Acme Plumbing.",
"guardrails": "Never quote prices.",
"knowledgeBases": [],
"interrupts": []
}
}'{
"_id": "a1a1a1a1a1a1a1a1a1a1a1a1",
"workspaceId": "c1c1c1c1c1c1c1c1c1c1c1c1",
"name": "Front desk v2",
"status": "draft",
"startNodeId": "start",
"globals": {
"persona": "You are the friendly front desk assistant for Acme Plumbing.",
"guardrails": "Never quote prices.",
"knowledgeBases": [],
"interrupts": []
},
"hasDraft": false,
"publishedVersion": 0,
"updatedAt": "2025-01-03T11:20:00Z"
}Last updated on