v45

latestOpenAPI 3.0.0raw.githubusercontent.com2026-08-0114775543.6 KB
Agents

Update workflow configuration

Deprecated — use PATCH /agent/{id}/drafts/{draftId}/config instead.

Directly mutates the legacy workflow document for an agent. This write path bypasses the versioning system entirely: the change is not captured as a new version, and future version activations may overwrite the legacy doc back to whatever the version snapshot contains.

Writing here on a versioned agent can silently wipe tools, prompt, or other fields that were missing from the PATCH payload. Only use this if you know the agent is not using versioning, or if you are intentionally hot-patching the legacy doc.

patch/workflow/{id}

Path parameters

idstring required
Example:60d0fe4f5311236168a109ca

The workflow ID (found at agent.workflowId on the agent document).

Request body

type'workflow_graph' | 'single_prompt' required

The type of workflow configuration. workflow_graph uses a node-based visual workflow, single_prompt uses a simple prompt-based configuration.

Example request

{
  "singlePromptConfig": {
    "prompt": "You are a helpful AI assistant that can help users with various tasks.",
    "tools": [
      {
        "name": "end_call",
        "description": "End the conversation when the user is satisfied",
        "transferNumber": "+1234567890",
        "url": "https://api.example.com/orders",
        "method": "GET",
        "headers": {
          "Authorization": "Bearer TOKEN",
          "Content-Type": "application/json"
        },
        "headersArray": [
          {
            "key": "Authorization",
            "value": "Bearer TOKEN"
          }
        ],
        "queryParams": [
          {
            "key": "id",
            "value": "{{order_id}}"
          }
        ],
        "requestBody": "{\"customer_id\": \"{{customer_id}}\"}",
        "responseVariables": [
          {
            "variableName": "orderStatus",
            "jsonPath": "$.data.status"
          }
        ],
        "variablesExtractionSchema": [
          {
            "name": "customer_name",
            "description": "The customer's full name",
            "values": [
              "satisfied",
              "unsatisfied",
              "neutral"
            ]
          }
        ],
        "knowledgeBaseId": "60d0fe4f5311236168a109ca",
        "fillerPhrases": [
          "Let me check that for you",
          "One moment please"
        ]
      }
    ]
  }
}

Response

Workflow updated successfully.