Unable to Recreate Exported Workflow via API
# support
t
I'm trying to recreate a workflow in Vapi via the /workflow API, using a JSON export of a workflow I previously built entirely through the Vapi UI. All I did was make a few slight changes to the prompt content — no changes to the nodes or edges structure. However, when I try to send the exported (and slightly modified) JSON back to the /workflow API, I get this error: { "message": [ "Node introduction has more than one default edge" ], "error": "Bad Request", "statusCode": 400 } This is confusing because: I built the entire flow in the Vapi UI I exported it directly from the platform (no structural changes) I expected it to be valid for re-import, but it’s not It seems like the UI allows creating multiple edges from a node (like introduction) without explicit condition fields, but the API does not accept that. If conditions are required, shouldn't they either: Be included in the export, or Be enforced in the builder itself? 📌 What I want: I just want to create the same workflow via API, with small changes to prompt text — not changes to the flow itself. But I can’t do that right now without manually editing conditions for edges, which I didn't even define originally. Can you advise how I can export and reuse a workflow JSON for API creation without breaking validation? Thanks!
v
To resolve the "more than one default edge" error, add explicit conditions to each edge in your workflow JSON before sending it to the API. For example, update your edges like this:
Copy code
json
"edges": [
  { "from": "introduction", "to": "optionA", "condition": { "type": "logic", "matches": { "field": "choice", "equals": "A" } } },
  { "from": "introduction", "to": "optionB", "condition": { "type": "logic", "matches": { "field": "choice", "equals": "B" } } }
]
Each outgoing edge from a node must have a unique, explicit condition (
matches
for logic/semantic edges) to pass API validation. Adjust your exported JSON accordingly before import. [See changelog for details](https://docs.vapi.ai/changelog/2025/2/1). Source: - [Changelog: February 1, 2025](https://docs.vapi.ai/changelog/2025/2/1)
c
Add unique explicit conditions to each outgoing edge from nodes like “introduction” in your exported workflow JSON before importing via API, since the UI allows multiple default edges but the API requires conditions for validation..
3 Views