AI Agent

Get Flow

GET/api/v1/ai-agents/{id}/flow

Returns 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 ********************

Path Params
  • idstringrequired

    AI agent ID.

    Example:6ad97ee52845b4f2c8daca55

Query Params
  • versionstringoptional

    draft (default) or live.

    Allowed values:"draft", "live"

    Default:"draft"

    Example:draft

Responses

200

OK

  • requestIdstringrequired

    Unique ID for this request. Quote it when reporting a problem.

  • dataobjectrequired
    Child attributes
    • idstringrequired

      Flow version ID.

    • statusstringrequired

      Allowed values:"draft", "live"

    • versionstringrequired

      draft, or the label given at publish.

    • modelstringrequired
    • savedAtstring | nulloptional

      ISO 8601.

    • nodesarray[object]required
      Child attributes
      • idstringrequired

        Your own unique ID, e.g. agent-main. Keep it stable across saves: settings added in the dashboard are kept per node ID.

      • typestringrequired

        startingPoint entry (exactly one per flow) · agentNode the AI that replies, instruction is its prompt · conditionNode a decision, instruction is the condition in plain language · humanAgentNode hands the chat to human agents (may only follow a conditionNode) · knowledgeBaseNode answers from knowledgeSourceIds. endingPoint, waitNode and replyCheckerNode are best configured in the dashboard builder.

        Allowed values:"startingPoint", "agentNode", "conditionNode", "humanAgentNode", "knowledgeBaseNode", "endingPoint", "waitNode", "replyCheckerNode"

      • labelstringrequired

        Name shown in the dashboard builder.

      • positionobject | nulloptional
        Child attributes
        • xnumberoptional
        • ynumberoptional
      • instructionstringrequired

        Plain text, newlines allowed. Prompt for agentNode, condition for conditionNode, handoff note for humanAgentNode. Use [contact name] for the customer's name.

      • toolIdsarray[string]required

        IDs of tools already set up in this workspace (copy them from an existing flow). Unknown IDs are rejected with 422.

      • toolsarray[object]required

        Names of the attached tools, read only. Send toolIds when saving.

        Child attributes
        • idstringoptional
        • namestring | nulloptional
        • descriptionstring | nulloptional
      • providerToolsarray[object]required

        Integration tools, read only. Attached in the dashboard and kept when you save, as long as the node id and type are unchanged.

        Child attributes
        • idstring | nulloptional
        • namestring | nulloptional
      • knowledgeSourceIdsarray[string]required

        Knowledge base source IDs already set up in this workspace.

      • vectorStoreIdsarray[string]required

        OpenAI vector store IDs (vs_...) attached in this workspace.

      • correctionbooleanrequired

        Apply saved corrections.

      • correctionGroupIdsarray[string]required

        Limit corrections to these groups. Empty = all.

      • waitSecondsinteger | nulloptional
    • edgesarray[object]required
      Child attributes
      • idstringrequired

        Unique edge ID.

      • sourcestringrequired

        Node ID the edge leaves.

      • targetstringrequired

        Node ID the edge enters.

      • sourceHandlestring | nulloptional

        Reply-checker branch: replied or timeout. Otherwise omit.

      • targetHandlestring | nulloptional
400

Invalid body or parameters, e.g. an empty name, an unknown node type or a malformed ID.

  • messagestringrequired
401

API key missing, invalid, revoked or expired.

  • messagestringrequired
404

Unknown agent, or the agent has no flow of that version yet (no draft saved / never published).

  • messagestringrequired
429

Rate limit reached. Retry after a short pause.

  • messagestringrequired
502

The AI agent service is temporarily unavailable. Retry shortly.

  • messagestringrequired