Get Flow
/api/v1/ai-agents/{id}/flowReturns the agent's draft (default) or live flow. The response is shaped so you can edit it and send it back to Update Flow: keep the node ids and send toolIds. tools and providerTools are for reading only.
Request
Authorization
Bearer Token
Provide your API token in the Authorization header. See Authentication to issue one.
Example:Authorization: Bearer ********************
idstringrequiredAI agent ID.
Example:6ad97ee52845b4f2c8daca55
versionstringoptionaldraft(default) orlive.Allowed values:"draft", "live"
Default:"draft"
Example:draft
Responses
200OK
OK
requestIdstringrequiredUnique ID for this request. Quote it when reporting a problem.
dataobjectrequiredChild attributes
idstringrequiredFlow version ID.
statusstringrequiredAllowed values:"draft", "live"
versionstringrequireddraft, or the label given at publish.modelstringrequiredsavedAtstring | nulloptionalISO 8601.
nodesarray[object]requiredChild attributes
idstringrequiredYour own unique ID, e.g.
agent-main. Keep it stable across saves: settings added in the dashboard are kept per node ID.typestringrequiredstartingPointentry (exactly one per flow) ·agentNodethe AI that replies,instructionis its prompt ·conditionNodea decision,instructionis the condition in plain language ·humanAgentNodehands the chat to human agents (may only follow aconditionNode) ·knowledgeBaseNodeanswers fromknowledgeSourceIds.endingPoint,waitNodeandreplyCheckerNodeare best configured in the dashboard builder.Allowed values:"startingPoint", "agentNode", "conditionNode", "humanAgentNode", "knowledgeBaseNode", "endingPoint", "waitNode", "replyCheckerNode"
labelstringrequiredName shown in the dashboard builder.
positionobject | nulloptionalChild attributes
xnumberoptionalynumberoptional
instructionstringrequiredPlain text, newlines allowed. Prompt for
agentNode, condition forconditionNode, handoff note forhumanAgentNode. Use[contact name]for the customer's name.toolIdsarray[string]requiredIDs of tools already set up in this workspace (copy them from an existing flow). Unknown IDs are rejected with
422.toolsarray[object]requiredNames of the attached tools, read only. Send
toolIdswhen saving.Child attributes
idstringoptionalnamestring | nulloptionaldescriptionstring | nulloptional
providerToolsarray[object]requiredIntegration tools, read only. Attached in the dashboard and kept when you save, as long as the node
idandtypeare unchanged.Child attributes
idstring | nulloptionalnamestring | nulloptional
knowledgeSourceIdsarray[string]requiredKnowledge base source IDs already set up in this workspace.
vectorStoreIdsarray[string]requiredOpenAI vector store IDs (
vs_...) attached in this workspace.correctionbooleanrequiredApply saved corrections.
correctionGroupIdsarray[string]requiredLimit corrections to these groups. Empty = all.
waitSecondsinteger | nulloptional
edgesarray[object]requiredChild attributes
idstringrequiredUnique edge ID.
sourcestringrequiredNode ID the edge leaves.
targetstringrequiredNode ID the edge enters.
sourceHandlestring | nulloptionalReply-checker branch:
repliedortimeout. Otherwise omit.targetHandlestring | nulloptional
400Invalid body or parameters, e.g. an empty name, an unknown node type or a malformed ID.
Invalid body or parameters, e.g. an empty name, an unknown node type or a malformed ID.
messagestringrequired
401API key missing, invalid, revoked or expired.
API key missing, invalid, revoked or expired.
messagestringrequired
404Unknown agent, or the agent has no flow of that version yet (no draft saved / never published).
Unknown agent, or the agent has no flow of that version yet (no draft saved / never published).
messagestringrequired
429Rate limit reached. Retry after a short pause.
Rate limit reached. Retry after a short pause.
messagestringrequired
502The AI agent service is temporarily unavailable. Retry shortly.
The AI agent service is temporarily unavailable. Retry shortly.
messagestringrequired