---
title: "Update Voice Agent"
method: PATCH
path: "/v2/voice-agents/{voiceAgentId}"
---

# Update Voice Agent

`PATCH /v2/voice-agents/{voiceAgentId}`

Updates an existing voice agent with new configuration.

## Path parameters

- `voiceAgentId` string, uuid, required

## Request body

- UpdateVoiceAgentV2Request — All fields are optional for updates. Include only the fields you want to update.
  - `type` 'Single Prompt' | 'Flow Agent' — Type of voice agent.
  - `name` string — Name of the voice agent (max 150 characters).
  - `conversation` object — Conversation settings (partial update supported).
    - `greetingMessage` string
    - `greetingMessageType` string, nullable
    - `preamble` string
    - `pokeMessages` string[]
    - `params` object
    - `alignment` object
      - `greetingMessage` string
      - `preamble` string
  - `voice` object — Voice settings (partial update supported).
    - `voiceId` string, nullable
    - `lang` string
  - `llm` object — LLM configuration (partial update supported).
    - `provider` 'openai' | 'gemini' | 'deepmyst' | 'groq' | 'custom'
    - `model` string
    - `temperature` number
    - `baseUrl` string
    - `apiKey` string
  - `callSettings` object — Call settings (partial update supported).
    - `noiseCancellation` 'disabled' | 'telephony_optimized'
    - `cancelNoisePer` 'conversation' | 'per_utterance'
    - `interrupt` boolean
    - `responseDelay` number
    - `minInterruptionDuration` number
    - `vadActivationThreshold` number
    - `userInactivityTimeout` number
    - `maxCallDuration` number
    - `silenceThreshold` number
    - `backgroundNoise` boolean
    - `enableAutoGainControl` boolean
    - `sendDenoisedToStt` boolean
    - `waitForUserToSpeakFirst` number
    - `thinkingVoice` boolean
    - `speakerIdentification` boolean
    - `agenticRag` boolean
    - `languageDialectSwitcher` boolean
    - `genderDetection` boolean
    - `smartCallEnd` boolean
  - `tools` object[] — Web tools (replaces existing tools).
    - `persistentId` string, required
    - `toolId` string, uuid, required
    - `version` integer, required
    - `toolType` 'FUNCTION' | 'MCP', required
    - `nodeId` string
    - `testResult` object
    - `overrides` object
  - `knowledgeBaseItemsIds` string[] — Knowledge base item UUIDs (replaces existing).
  - `voiceDictionaryIds` string[] — Voice dictionary UUIDs (replaces existing).
  - `phoneNumber` object, nullable
    - `type` string, required
    - `id` string, uuid, required
  - `webhookUrl` string, uri
  - `webhookAuth` object
  - `workflow` Workflow — Flow Agent workflow graph. Stored on the agent and only meaningful when `type` is `"Flow Agent"`. Holds the graph `nodes`, the `edges` connecting them, and workflow-level `customVariables`. Agent-level configuration (voice, llm, call settings, tools, webhooks) lives in the top-level agent fields, **not** inside this object.
    - `nodes` WorkflowNode[], required — The workflow nodes (the flow graph).
      - union — A workflow node. The concrete shape depends on the `type` discriminator.
        - WorkflowConversationNode — Conversation node — the agent speaks/listens.
          - `id` string, required — Unique node id (nanoid or UUID).
          - `type` 'conversation', required — Node type discriminator.
          - `label` string — Display label.
          - `description` string — Optional node description.
          - `isGlobal` boolean — Whether this is a global node.
          - `globalCondition` string — Condition that activates a global node. Supports `{{variable}}` interpolation; may be empty.
          - `globalConditionType` 'prompt' | 'dtmf'
          - `globalDtmfKey` '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '#' | '*' — DTMF key that triggers the global node when `globalConditionType` is `dtmf`.
          - `globalReturnToSource` boolean
          - `requiresDoubleConfirm` boolean
          - `skipResponse` boolean
          - `staticVariables` WorkflowStaticVariable[]
            - `id` string, required
            - `name` string, required
            - `description` string
            - `dataType` 'string' | 'number' | 'boolean' | 'integer' | 'array' | 'object', required
            - `value` unknown, required
          - `metadata` WorkflowNodeMetadata, required — Node metadata.
            - `createdAt` string, date-time
            - `updatedAt` string, date-time
            - `version` integer
          - `transitions` WorkflowTransition[] — Outgoing transitions to other nodes.
            - `id` string, required — Transition id (nanoid or UUID).
            - `name` string
            - `condition` union, required — Transition condition. Shape depends on the `type` discriminator.
              - …
            - `targetNodeId` string, required — Target node id, or an empty string if unconnected.
            - `priority` integer
            - `isEnabled` boolean
            - `metadata` object
              - …
          - `position` WorkflowPosition, required — Canvas position of the node.
            - `x` number, required
            - `y` number, required
          - `messageType` 'static' | 'prompt' — Whether the message is a literal `static` string or a `prompt` for the LLM.
          - `message` string — Node message. May be empty. Supports `{{variable}}` interpolation.
          - `interruptMode` 'inherit' | 'enable' | 'disable'
          - `extractVariables` WorkflowExtractVariablesConfig — Variable extraction config for a node.
            - `enabled` boolean
            - `variables` WorkflowVariable[]
              - …
          - `dtmfInputCapture` WorkflowDtmfInputCapture — Captures DTMF digits into a variable.
            - `enabled` boolean
            - `variableName` string — Variable to store captured digits (required when `enabled`).
            - `digitLimit` integer
            - `terminationKey` '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '#' | '*'
            - `timeoutMs` integer
        - WorkflowStartNode — Entry node of the workflow.
          - `id` string, required — Unique node id (nanoid or UUID).
          - `type` 'start', required — Node type discriminator.
          - `label` string — Display label.
          - `description` string — Optional node description.
          - `isGlobal` boolean — Whether this is a global node.
          - `globalCondition` string — Condition that activates a global node. Supports `{{variable}}` interpolation; may be empty.
          - `globalConditionType` 'prompt' | 'dtmf'
          - `globalDtmfKey` '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '#' | '*' — DTMF key that triggers the global node when `globalConditionType` is `dtmf`.
          - `globalReturnToSource` boolean
          - `requiresDoubleConfirm` boolean
          - `skipResponse` boolean
          - `staticVariables` WorkflowStaticVariable[]
            - `id` string, required
            - `name` string, required
            - `description` string
            - `dataType` 'string' | 'number' | 'boolean' | 'integer' | 'array' | 'object', required
            - `value` unknown, required
          - `metadata` WorkflowNodeMetadata, required — Node metadata.
            - `createdAt` string, date-time
            - `updatedAt` string, date-time
            - `version` integer
          - `transitions` WorkflowTransition[] — Outgoing transitions to other nodes.
            - `id` string, required — Transition id (nanoid or UUID).
            - `name` string
            - `condition` union, required — Transition condition. Shape depends on the `type` discriminator.
              - …
            - `targetNodeId` string, required — Target node id, or an empty string if unconnected.
            - `priority` integer
            - `isEnabled` boolean
            - `metadata` object
              - …
          - `position` WorkflowPosition, required — Canvas position of the node.
            - `x` number, required
            - `y` number, required
          - `subType` 'conversation' | 'tool'
          - `messageType` 'static' | 'prompt' — Whether the message is a literal `static` string or a `prompt` for the LLM.
          - `message` string — Node message. May be empty. Supports `{{variable}}` interpolation.
          - `interrupt` boolean — Allow user to interrupt.
          - `extractVariables` WorkflowExtractVariablesConfig — Variable extraction config for a node.
            - `enabled` boolean
            - `variables` WorkflowVariable[]
              - …
          - `dtmfInputCapture` WorkflowDtmfInputCapture — Captures DTMF digits into a variable.
            - `enabled` boolean
            - `variableName` string — Variable to store captured digits (required when `enabled`).
            - `digitLimit` integer
            - `terminationKey` '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '#' | '*'
            - `timeoutMs` integer
          - `timeout` integer — Timeout in milliseconds.
          - `overrideResponse` boolean — Override the default response with `customResponse`.
          - `customResponse` string — Custom response shown instead of the default. Required when `overrideResponse` is true. Supports `{{variable}}` interpolation; may be empty.
          - `outputMapping` object — Maps tool output fields to workflow variables.
          - `onErrorBehavior` 'continue' | 'retry' | 'fail'
          - `errorMessage` string — Message spoken when the node errors. Supports `{{variable}}` interpolation; may be empty.
          - `processingMessage` string — Message spoken while the node runs.
          - `processingMessageType` 'static' | 'prompt' — Whether the message is a literal `static` string or a `prompt` for the LLM.
        - WorkflowToolNode — Function-tool execution node.
          - `id` string, required — Unique node id (nanoid or UUID).
          - `type` 'tool', required — Node type discriminator.
          - `label` string — Display label.
          - `description` string — Optional node description.
          - `isGlobal` boolean — Whether this is a global node.
          - `globalCondition` string — Condition that activates a global node. Supports `{{variable}}` interpolation; may be empty.
          - `globalConditionType` 'prompt' | 'dtmf'
          - `globalDtmfKey` '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '#' | '*' — DTMF key that triggers the global node when `globalConditionType` is `dtmf`.
          - `globalReturnToSource` boolean
          - `requiresDoubleConfirm` boolean
          - `skipResponse` boolean
          - `staticVariables` WorkflowStaticVariable[]
            - `id` string, required
            - `name` string, required
            - `description` string
            - `dataType` 'string' | 'number' | 'boolean' | 'integer' | 'array' | 'object', required
            - `value` unknown, required
          - `metadata` WorkflowNodeMetadata, required — Node metadata.
            - `createdAt` string, date-time
            - `updatedAt` string, date-time
            - `version` integer
          - `transitions` WorkflowTransition[] — Outgoing transitions to other nodes.
            - `id` string, required — Transition id (nanoid or UUID).
            - `name` string
            - `condition` union, required — Transition condition. Shape depends on the `type` discriminator.
              - …
            - `targetNodeId` string, required — Target node id, or an empty string if unconnected.
            - `priority` integer
            - `isEnabled` boolean
            - `metadata` object
              - …
          - `position` WorkflowPosition, required — Canvas position of the node.
            - `x` number, required
            - `y` number, required
          - `parameters` WorkflowToolParameter[]
            - `name` string, required
            - `value` string, required — Parameter value. Supports `{{variable}}` interpolation; may be empty.
            - `type` 'string' | 'number' | 'boolean' | 'object'
            - `required` boolean
          - `timeout` integer — Timeout in milliseconds.
          - `extractVariables` WorkflowExtractVariablesConfig — Variable extraction config for a node.
            - `enabled` boolean
            - `variables` WorkflowVariable[]
              - …
          - `overrideResponse` boolean — Override the default response with `customResponse`.
          - `customResponse` string — Custom response shown instead of the default. Required when `overrideResponse` is true. Supports `{{variable}}` interpolation; may be empty.
          - `outputMapping` object — Maps tool output fields to workflow variables.
          - `onErrorBehavior` 'continue' | 'retry' | 'fail'
          - `errorMessage` string — Message spoken when the node errors. Supports `{{variable}}` interpolation; may be empty.
          - `processingMessage` string — Message spoken while the node runs.
          - `processingMessageType` 'static' | 'prompt' — Whether the message is a literal `static` string or a `prompt` for the LLM.
        - WorkflowWebToolNode — Web-tool execution node.
          - `id` string, required — Unique node id (nanoid or UUID).
          - `type` 'web_tool', required — Node type discriminator.
          - `label` string — Display label.
          - `description` string — Optional node description.
          - `isGlobal` boolean — Whether this is a global node.
          - `globalCondition` string — Condition that activates a global node. Supports `{{variable}}` interpolation; may be empty.
          - `globalConditionType` 'prompt' | 'dtmf'
          - `globalDtmfKey` '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '#' | '*' — DTMF key that triggers the global node when `globalConditionType` is `dtmf`.
          - `globalReturnToSource` boolean
          - `requiresDoubleConfirm` boolean
          - `skipResponse` boolean
          - `staticVariables` WorkflowStaticVariable[]
            - `id` string, required
            - `name` string, required
            - `description` string
            - `dataType` 'string' | 'number' | 'boolean' | 'integer' | 'array' | 'object', required
            - `value` unknown, required
          - `metadata` WorkflowNodeMetadata, required — Node metadata.
            - `createdAt` string, date-time
            - `updatedAt` string, date-time
            - `version` integer
          - `transitions` WorkflowTransition[] — Outgoing transitions to other nodes.
            - `id` string, required — Transition id (nanoid or UUID).
            - `name` string
            - `condition` union, required — Transition condition. Shape depends on the `type` discriminator.
              - …
            - `targetNodeId` string, required — Target node id, or an empty string if unconnected.
            - `priority` integer
            - `isEnabled` boolean
            - `metadata` object
              - …
          - `position` WorkflowPosition, required — Canvas position of the node.
            - `x` number, required
            - `y` number, required
          - `processingMessage` string — Message spoken while the web tool runs.
          - `processingMessageType` 'static' | 'prompt' — Whether the message is a literal `static` string or a `prompt` for the LLM.
        - WorkflowTransferCallNode — Transfer the call to a phone number.
          - `id` string, required — Unique node id (nanoid or UUID).
          - `type` 'transfer_call', required — Node type discriminator.
          - `label` string — Display label.
          - `description` string — Optional node description.
          - `isGlobal` boolean — Whether this is a global node.
          - `globalCondition` string — Condition that activates a global node. Supports `{{variable}}` interpolation; may be empty.
          - `globalConditionType` 'prompt' | 'dtmf'
          - `globalDtmfKey` '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '#' | '*' — DTMF key that triggers the global node when `globalConditionType` is `dtmf`.
          - `globalReturnToSource` boolean
          - `requiresDoubleConfirm` boolean
          - `skipResponse` boolean
          - `staticVariables` WorkflowStaticVariable[]
            - `id` string, required
            - `name` string, required
            - `description` string
            - `dataType` 'string' | 'number' | 'boolean' | 'integer' | 'array' | 'object', required
            - `value` unknown, required
          - `metadata` WorkflowNodeMetadata, required — Node metadata.
            - `createdAt` string, date-time
            - `updatedAt` string, date-time
            - `version` integer
          - `transitions` WorkflowTransition[] — Outgoing transitions to other nodes.
            - `id` string, required — Transition id (nanoid or UUID).
            - `name` string
            - `condition` union, required — Transition condition. Shape depends on the `type` discriminator.
              - …
            - `targetNodeId` string, required — Target node id, or an empty string if unconnected.
            - `priority` integer
            - `isEnabled` boolean
            - `metadata` object
              - …
          - `position` WorkflowPosition, required — Canvas position of the node.
            - `x` number, required
            - `y` number, required
          - `phoneNumber` string, required — Destination phone number (E.164).
          - `transferType` 'warm' | 'cold'
          - `transferMessage` string — Message spoken before transferring. Supports `{{variable}}` interpolation; may be empty.
          - `transferMessageType` 'static' | 'prompt' — Whether the message is a literal `static` string or a `prompt` for the LLM.
          - `timeout` integer — Timeout in milliseconds.
          - `sipHeaders` WorkflowSipHeader[] — Custom SIP headers to attach to the transfer.
            - `id` string, required
            - `name` string, required
            - `value` string, required
        - WorkflowEndCallNode — End the call.
          - `id` string, required — Unique node id (nanoid or UUID).
          - `type` 'end_call', required — Node type discriminator.
          - `label` string — Display label.
          - `description` string — Optional node description.
          - `isGlobal` boolean — Whether this is a global node.
          - `globalCondition` string — Condition that activates a global node. Supports `{{variable}}` interpolation; may be empty.
          - `globalConditionType` 'prompt' | 'dtmf'
          - `globalDtmfKey` '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '#' | '*' — DTMF key that triggers the global node when `globalConditionType` is `dtmf`.
          - `globalReturnToSource` boolean
          - `requiresDoubleConfirm` boolean
          - `skipResponse` boolean
          - `staticVariables` WorkflowStaticVariable[]
            - `id` string, required
            - `name` string, required
            - `description` string
            - `dataType` 'string' | 'number' | 'boolean' | 'integer' | 'array' | 'object', required
            - `value` unknown, required
          - `metadata` WorkflowNodeMetadata, required — Node metadata.
            - `createdAt` string, date-time
            - `updatedAt` string, date-time
            - `version` integer
          - `transitions` WorkflowTransition[] — Outgoing transitions to other nodes.
            - `id` string, required — Transition id (nanoid or UUID).
            - `name` string
            - `condition` union, required — Transition condition. Shape depends on the `type` discriminator.
              - …
            - `targetNodeId` string, required — Target node id, or an empty string if unconnected.
            - `priority` integer
            - `isEnabled` boolean
            - `metadata` object
              - …
          - `position` WorkflowPosition, required — Canvas position of the node.
            - `x` number, required
            - `y` number, required
          - `finalMessage` string — Final message before ending the call. Supports `{{variable}}` interpolation; may be empty.
          - `messageType` 'static' | 'prompt' — Whether the message is a literal `static` string or a `prompt` for the LLM.
          - `reason` 'completed' | 'user_requested' | 'error' | 'timeout'
        - WorkflowTransferAgentNode — Hand off to another voice agent.
          - `id` string, required — Unique node id (nanoid or UUID).
          - `type` 'transfer_agent', required — Node type discriminator.
          - `label` string — Display label.
          - `description` string — Optional node description.
          - `isGlobal` boolean — Whether this is a global node.
          - `globalCondition` string — Condition that activates a global node. Supports `{{variable}}` interpolation; may be empty.
          - `globalConditionType` 'prompt' | 'dtmf'
          - `globalDtmfKey` '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '#' | '*' — DTMF key that triggers the global node when `globalConditionType` is `dtmf`.
          - `globalReturnToSource` boolean
          - `requiresDoubleConfirm` boolean
          - `skipResponse` boolean
          - `staticVariables` WorkflowStaticVariable[]
            - `id` string, required
            - `name` string, required
            - `description` string
            - `dataType` 'string' | 'number' | 'boolean' | 'integer' | 'array' | 'object', required
            - `value` unknown, required
          - `metadata` WorkflowNodeMetadata, required — Node metadata.
            - `createdAt` string, date-time
            - `updatedAt` string, date-time
            - `version` integer
          - `transitions` WorkflowTransition[] — Outgoing transitions to other nodes.
            - `id` string, required — Transition id (nanoid or UUID).
            - `name` string
            - `condition` union, required — Transition condition. Shape depends on the `type` discriminator.
              - …
            - `targetNodeId` string, required — Target node id, or an empty string if unconnected.
            - `priority` integer
            - `isEnabled` boolean
            - `metadata` object
              - …
          - `position` WorkflowPosition, required — Canvas position of the node.
            - `x` number, required
            - `y` number, required
          - `agentId` string, required — Target voice agent id.
          - `timeout` integer — Timeout in milliseconds.
          - `transferMessage` string — Message spoken before handing off. Supports `{{variable}}` interpolation; may be empty.
          - `transferMessageType` 'static' | 'prompt' — Whether the message is a literal `static` string or a `prompt` for the LLM.
          - `handoffConversation` boolean — Pass the conversation transcript to the target agent.
          - `handoffVariables` boolean — Pass workflow variables to the target agent.
        - WorkflowRouterNode — Routes to a branch based on its transitions.
          - `id` string, required — Unique node id (nanoid or UUID).
          - `type` 'router', required — Node type discriminator.
          - `label` string — Display label.
          - `description` string — Optional node description.
          - `isGlobal` boolean — Whether this is a global node.
          - `globalCondition` string — Condition that activates a global node. Supports `{{variable}}` interpolation; may be empty.
          - `globalConditionType` 'prompt' | 'dtmf'
          - `globalDtmfKey` '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '#' | '*' — DTMF key that triggers the global node when `globalConditionType` is `dtmf`.
          - `globalReturnToSource` boolean
          - `requiresDoubleConfirm` boolean
          - `skipResponse` boolean
          - `staticVariables` WorkflowStaticVariable[]
            - `id` string, required
            - `name` string, required
            - `description` string
            - `dataType` 'string' | 'number' | 'boolean' | 'integer' | 'array' | 'object', required
            - `value` unknown, required
          - `metadata` WorkflowNodeMetadata, required — Node metadata.
            - `createdAt` string, date-time
            - `updatedAt` string, date-time
            - `version` integer
          - `transitions` WorkflowTransition[] — Outgoing transitions to other nodes.
            - `id` string, required — Transition id (nanoid or UUID).
            - `name` string
            - `condition` union, required — Transition condition. Shape depends on the `type` discriminator.
              - …
            - `targetNodeId` string, required — Target node id, or an empty string if unconnected.
            - `priority` integer
            - `isEnabled` boolean
            - `metadata` object
              - …
          - `position` WorkflowPosition, required — Canvas position of the node.
            - `x` number, required
            - `y` number, required
        - WorkflowSetLocalVariablesNode — Sets local/static variables (see base `staticVariables`).
          - `id` string, required — Unique node id (nanoid or UUID).
          - `type` 'set_local_variables', required — Node type discriminator.
          - `label` string — Display label.
          - `description` string — Optional node description.
          - `isGlobal` boolean — Whether this is a global node.
          - `globalCondition` string — Condition that activates a global node. Supports `{{variable}}` interpolation; may be empty.
          - `globalConditionType` 'prompt' | 'dtmf'
          - `globalDtmfKey` '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '#' | '*' — DTMF key that triggers the global node when `globalConditionType` is `dtmf`.
          - `globalReturnToSource` boolean
          - `requiresDoubleConfirm` boolean
          - `skipResponse` boolean
          - `staticVariables` WorkflowStaticVariable[]
            - `id` string, required
            - `name` string, required
            - `description` string
            - `dataType` 'string' | 'number' | 'boolean' | 'integer' | 'array' | 'object', required
            - `value` unknown, required
          - `metadata` WorkflowNodeMetadata, required — Node metadata.
            - `createdAt` string, date-time
            - `updatedAt` string, date-time
            - `version` integer
          - `transitions` WorkflowTransition[] — Outgoing transitions to other nodes.
            - `id` string, required — Transition id (nanoid or UUID).
            - `name` string
            - `condition` union, required — Transition condition. Shape depends on the `type` discriminator.
              - …
            - `targetNodeId` string, required — Target node id, or an empty string if unconnected.
            - `priority` integer
            - `isEnabled` boolean
            - `metadata` object
              - …
          - `position` WorkflowPosition, required — Canvas position of the node.
            - `x` number, required
            - `y` number, required
        - WorkflowChangeAgentSettingsNode — Overrides agent settings mid-flow.
          - `id` string, required — Unique node id (nanoid or UUID).
          - `type` 'change_agent_settings', required — Node type discriminator.
          - `label` string — Display label.
          - `description` string — Optional node description.
          - `isGlobal` boolean — Whether this is a global node.
          - `globalCondition` string — Condition that activates a global node. Supports `{{variable}}` interpolation; may be empty.
          - `globalConditionType` 'prompt' | 'dtmf'
          - `globalDtmfKey` '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '#' | '*' — DTMF key that triggers the global node when `globalConditionType` is `dtmf`.
          - `globalReturnToSource` boolean
          - `requiresDoubleConfirm` boolean
          - `skipResponse` boolean
          - `staticVariables` WorkflowStaticVariable[]
            - `id` string, required
            - `name` string, required
            - `description` string
            - `dataType` 'string' | 'number' | 'boolean' | 'integer' | 'array' | 'object', required
            - `value` unknown, required
          - `metadata` WorkflowNodeMetadata, required — Node metadata.
            - `createdAt` string, date-time
            - `updatedAt` string, date-time
            - `version` integer
          - `transitions` WorkflowTransition[] — Outgoing transitions to other nodes.
            - `id` string, required — Transition id (nanoid or UUID).
            - `name` string
            - `condition` union, required — Transition condition. Shape depends on the `type` discriminator.
              - …
            - `targetNodeId` string, required — Target node id, or an empty string if unconnected.
            - `priority` integer
            - `isEnabled` boolean
            - `metadata` object
              - …
          - `position` WorkflowPosition, required — Canvas position of the node.
            - `x` number, required
            - `y` number, required
          - `settingsOverrides` object — Agent-setting overrides applied at this node. Stored as-is and not field-validated (mirrors agent-level config).
    - `edges` WorkflowEdge[], required — Edges connecting nodes in the builder canvas.
      - `id` string, required — Edge id (nanoid or UUID).
      - `source` string, required — Source node id.
      - `target` string, required — Target node id.
      - `sourceHandle` string
      - `targetHandle` string
      - `type` string — Edge render type (custom ReactFlow types like `deletable` are allowed).
      - `selected` boolean — Canvas selection state.
      - `animated` boolean
      - `hidden` boolean
      - `metadata` object
        - `transitionId` string
        - `label` string
        - `style` object
    - `customVariables` WorkflowVariable[] — Workflow-level variables available across nodes.
      - `id` string, required — Variable id — nanoid or author slug (e.g. `out_var_flights`).
      - `name` string, required — Variable name (snake_case).
      - `description` string
      - `dataType` 'string' | 'number' | 'boolean' | 'integer' | 'array' | 'object', required
      - `enumValues` WorkflowEnumValue[]
        - `value` string, required
        - `label` string
      - `isEnumEnabled` boolean
      - `isRequired` boolean
      - `defaultValue` unknown
      - `extractionPrompt` string
      - `sourceNodeId` string
      - `sourceNodeType` string
      - `properties` WorkflowVariable[] — Child variables (for `object` types).
      - `item` WorkflowVariable — recursive
  - `outcomeResponseShape` object

## Response `200`

Successful response

- UpdateVoiceAgentV2Response
  - `success` boolean
  - `message` string
  - `messageKey` string
  - `data` VoiceAgentV2Data — Voice agent data structure
    - `id` string, uuid
    - `type` string, nullable
    - `name` string
    - `conversation` object
      - `greetingMessage` string
      - `greetingMessageType` string, nullable
      - `preamble` string
      - `pokeMessages` string[]
      - `params` object
      - `alignment` object
        - `greetingMessage` string
        - `preamble` string
    - `voice` object
      - `voiceId` string, nullable
      - `voiceRecordId` string, nullable
      - `voiceRecord` object, nullable — TTS voice details
        - `id` string, uuid
        - `name` string
        - `provider` string
        - `language` string
        - `image` string, nullable
        - `languageCode` string, nullable
        - `voiceRecord` object, nullable
      - `lang` string, nullable
      - `ttsParams` object, nullable
    - `llm` object
      - `provider` string
      - `model` string
      - `temperature` number
      - `baseUrl` string, nullable
      - `apiKey` string, nullable
    - `callSettings` object
      - `noiseCancellation` string
      - `cancelNoisePer` string, nullable
      - `interrupt` boolean
      - `responseDelay` number
      - `userInactivityTimeout` number
      - `maxCallDuration` number
      - `silenceThreshold` number
      - `backgroundNoise` boolean
      - `thinkingVoice` boolean
      - `speakerIdentification` boolean
      - `agenticRag` boolean
      - `languageDialectSwitcher` boolean
      - `minInterruptionDuration` number
      - `vadActivationThreshold` number
      - `enableAutoGainControl` boolean
      - `sendDenoisedToStt` boolean
      - `genderDetection` boolean
      - `smartCallEnd` boolean
      - `waitForUserToSpeakFirst` number
    - `tools` object[], nullable — Agent tools configuration
    - `knowledgeBaseItemsIds` string[]
    - `voiceDictionaryIds` string[]
    - `phoneNumber` object, nullable
      - `type` string
      - `id` string, uuid
    - `webhookUrl` string, nullable
    - `webhookAuth` object, nullable
    - `workflow` Workflow — Flow Agent workflow graph. Stored on the agent and only meaningful when `type` is `"Flow Agent"`. Holds the graph `nodes`, the `edges` connecting them, and workflow-level `customVariables`. Agent-level configuration (voice, llm, call settings, tools, webhooks) lives in the top-level agent fields, **not** inside this object.
      - `nodes` WorkflowNode[], required — The workflow nodes (the flow graph).
        - union — A workflow node. The concrete shape depends on the `type` discriminator.
          - WorkflowConversationNode — Conversation node — the agent speaks/listens.
            - `id` string, required — Unique node id (nanoid or UUID).
            - `type` 'conversation', required — Node type discriminator.
            - `label` string — Display label.
            - `description` string — Optional node description.
            - `isGlobal` boolean — Whether this is a global node.
            - `globalCondition` string — Condition that activates a global node. Supports `{{variable}}` interpolation; may be empty.
            - `globalConditionType` 'prompt' | 'dtmf'
            - `globalDtmfKey` '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '#' | '*' — DTMF key that triggers the global node when `globalConditionType` is `dtmf`.
            - `globalReturnToSource` boolean
            - `requiresDoubleConfirm` boolean
            - `skipResponse` boolean
            - `staticVariables` WorkflowStaticVariable[]
              - …
            - `metadata` WorkflowNodeMetadata, required — Node metadata.
              - …
            - `transitions` WorkflowTransition[] — Outgoing transitions to other nodes.
              - …
            - `position` WorkflowPosition, required — Canvas position of the node.
              - …
            - `messageType` 'static' | 'prompt' — Whether the message is a literal `static` string or a `prompt` for the LLM.
            - `message` string — Node message. May be empty. Supports `{{variable}}` interpolation.
            - `interruptMode` 'inherit' | 'enable' | 'disable'
            - `extractVariables` WorkflowExtractVariablesConfig — Variable extraction config for a node.
              - …
            - `dtmfInputCapture` WorkflowDtmfInputCapture — Captures DTMF digits into a variable.
              - …
          - WorkflowStartNode — Entry node of the workflow.
            - `id` string, required — Unique node id (nanoid or UUID).
            - `type` 'start', required — Node type discriminator.
            - `label` string — Display label.
            - `description` string — Optional node description.
            - `isGlobal` boolean — Whether this is a global node.
            - `globalCondition` string — Condition that activates a global node. Supports `{{variable}}` interpolation; may be empty.
            - `globalConditionType` 'prompt' | 'dtmf'
            - `globalDtmfKey` '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '#' | '*' — DTMF key that triggers the global node when `globalConditionType` is `dtmf`.
            - `globalReturnToSource` boolean
            - `requiresDoubleConfirm` boolean
            - `skipResponse` boolean
            - `staticVariables` WorkflowStaticVariable[]
              - …
            - `metadata` WorkflowNodeMetadata, required — Node metadata.
              - …
            - `transitions` WorkflowTransition[] — Outgoing transitions to other nodes.
              - …
            - `position` WorkflowPosition, required — Canvas position of the node.
              - …
            - `subType` 'conversation' | 'tool'
            - `messageType` 'static' | 'prompt' — Whether the message is a literal `static` string or a `prompt` for the LLM.
            - `message` string — Node message. May be empty. Supports `{{variable}}` interpolation.
            - `interrupt` boolean — Allow user to interrupt.
            - `extractVariables` WorkflowExtractVariablesConfig — Variable extraction config for a node.
              - …
            - `dtmfInputCapture` WorkflowDtmfInputCapture — Captures DTMF digits into a variable.
              - …
            - `timeout` integer — Timeout in milliseconds.
            - `overrideResponse` boolean — Override the default response with `customResponse`.
            - `customResponse` string — Custom response shown instead of the default. Required when `overrideResponse` is true. Supports `{{variable}}` interpolation; may be empty.
            - `outputMapping` object — Maps tool output fields to workflow variables.
            - `onErrorBehavior` 'continue' | 'retry' | 'fail'
            - `errorMessage` string — Message spoken when the node errors. Supports `{{variable}}` interpolation; may be empty.
            - `processingMessage` string — Message spoken while the node runs.
            - `processingMessageType` 'static' | 'prompt' — Whether the message is a literal `static` string or a `prompt` for the LLM.
          - WorkflowToolNode — Function-tool execution node.
            - `id` string, required — Unique node id (nanoid or UUID).
            - `type` 'tool', required — Node type discriminator.
            - `label` string — Display label.
            - `description` string — Optional node description.
            - `isGlobal` boolean — Whether this is a global node.
            - `globalCondition` string — Condition that activates a global node. Supports `{{variable}}` interpolation; may be empty.
            - `globalConditionType` 'prompt' | 'dtmf'
            - `globalDtmfKey` '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '#' | '*' — DTMF key that triggers the global node when `globalConditionType` is `dtmf`.
            - `globalReturnToSource` boolean
            - `requiresDoubleConfirm` boolean
            - `skipResponse` boolean
            - `staticVariables` WorkflowStaticVariable[]
              - …
            - `metadata` WorkflowNodeMetadata, required — Node metadata.
              - …
            - `transitions` WorkflowTransition[] — Outgoing transitions to other nodes.
              - …
            - `position` WorkflowPosition, required — Canvas position of the node.
              - …
            - `parameters` WorkflowToolParameter[]
              - …
            - `timeout` integer — Timeout in milliseconds.
            - `extractVariables` WorkflowExtractVariablesConfig — Variable extraction config for a node.
              - …
            - `overrideResponse` boolean — Override the default response with `customResponse`.
            - `customResponse` string — Custom response shown instead of the default. Required when `overrideResponse` is true. Supports `{{variable}}` interpolation; may be empty.
            - `outputMapping` object — Maps tool output fields to workflow variables.
            - `onErrorBehavior` 'continue' | 'retry' | 'fail'
            - `errorMessage` string — Message spoken when the node errors. Supports `{{variable}}` interpolation; may be empty.
            - `processingMessage` string — Message spoken while the node runs.
            - `processingMessageType` 'static' | 'prompt' — Whether the message is a literal `static` string or a `prompt` for the LLM.
          - WorkflowWebToolNode — Web-tool execution node.
            - `id` string, required — Unique node id (nanoid or UUID).
            - `type` 'web_tool', required — Node type discriminator.
            - `label` string — Display label.
            - `description` string — Optional node description.
            - `isGlobal` boolean — Whether this is a global node.
            - `globalCondition` string — Condition that activates a global node. Supports `{{variable}}` interpolation; may be empty.
            - `globalConditionType` 'prompt' | 'dtmf'
            - `globalDtmfKey` '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '#' | '*' — DTMF key that triggers the global node when `globalConditionType` is `dtmf`.
            - `globalReturnToSource` boolean
            - `requiresDoubleConfirm` boolean
            - `skipResponse` boolean
            - `staticVariables` WorkflowStaticVariable[]
              - …
            - `metadata` WorkflowNodeMetadata, required — Node metadata.
              - …
            - `transitions` WorkflowTransition[] — Outgoing transitions to other nodes.
              - …
            - `position` WorkflowPosition, required — Canvas position of the node.
              - …
            - `processingMessage` string — Message spoken while the web tool runs.
            - `processingMessageType` 'static' | 'prompt' — Whether the message is a literal `static` string or a `prompt` for the LLM.
          - WorkflowTransferCallNode — Transfer the call to a phone number.
            - `id` string, required — Unique node id (nanoid or UUID).
            - `type` 'transfer_call', required — Node type discriminator.
            - `label` string — Display label.
            - `description` string — Optional node description.
            - `isGlobal` boolean — Whether this is a global node.
            - `globalCondition` string — Condition that activates a global node. Supports `{{variable}}` interpolation; may be empty.
            - `globalConditionType` 'prompt' | 'dtmf'
            - `globalDtmfKey` '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '#' | '*' — DTMF key that triggers the global node when `globalConditionType` is `dtmf`.
            - `globalReturnToSource` boolean
            - `requiresDoubleConfirm` boolean
            - `skipResponse` boolean
            - `staticVariables` WorkflowStaticVariable[]
              - …
            - `metadata` WorkflowNodeMetadata, required — Node metadata.
              - …
            - `transitions` WorkflowTransition[] — Outgoing transitions to other nodes.
              - …
            - `position` WorkflowPosition, required — Canvas position of the node.
              - …
            - `phoneNumber` string, required — Destination phone number (E.164).
            - `transferType` 'warm' | 'cold'
            - `transferMessage` string — Message spoken before transferring. Supports `{{variable}}` interpolation; may be empty.
            - `transferMessageType` 'static' | 'prompt' — Whether the message is a literal `static` string or a `prompt` for the LLM.
            - `timeout` integer — Timeout in milliseconds.
            - `sipHeaders` WorkflowSipHeader[] — Custom SIP headers to attach to the transfer.
              - …
          - WorkflowEndCallNode — End the call.
            - `id` string, required — Unique node id (nanoid or UUID).
            - `type` 'end_call', required — Node type discriminator.
            - `label` string — Display label.
            - `description` string — Optional node description.
            - `isGlobal` boolean — Whether this is a global node.
            - `globalCondition` string — Condition that activates a global node. Supports `{{variable}}` interpolation; may be empty.
            - `globalConditionType` 'prompt' | 'dtmf'
            - `globalDtmfKey` '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '#' | '*' — DTMF key that triggers the global node when `globalConditionType` is `dtmf`.
            - `globalReturnToSource` boolean
            - `requiresDoubleConfirm` boolean
            - `skipResponse` boolean
            - `staticVariables` WorkflowStaticVariable[]
              - …
            - `metadata` WorkflowNodeMetadata, required — Node metadata.
              - …
            - `transitions` WorkflowTransition[] — Outgoing transitions to other nodes.
              - …
            - `position` WorkflowPosition, required — Canvas position of the node.
              - …
            - `finalMessage` string — Final message before ending the call. Supports `{{variable}}` interpolation; may be empty.
            - `messageType` 'static' | 'prompt' — Whether the message is a literal `static` string or a `prompt` for the LLM.
            - `reason` 'completed' | 'user_requested' | 'error' | 'timeout'
          - WorkflowTransferAgentNode — Hand off to another voice agent.
            - `id` string, required — Unique node id (nanoid or UUID).
            - `type` 'transfer_agent', required — Node type discriminator.
            - `label` string — Display label.
            - `description` string — Optional node description.
            - `isGlobal` boolean — Whether this is a global node.
            - `globalCondition` string — Condition that activates a global node. Supports `{{variable}}` interpolation; may be empty.
            - `globalConditionType` 'prompt' | 'dtmf'
            - `globalDtmfKey` '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '#' | '*' — DTMF key that triggers the global node when `globalConditionType` is `dtmf`.
            - `globalReturnToSource` boolean
            - `requiresDoubleConfirm` boolean
            - `skipResponse` boolean
            - `staticVariables` WorkflowStaticVariable[]
              - …
            - `metadata` WorkflowNodeMetadata, required — Node metadata.
              - …
            - `transitions` WorkflowTransition[] — Outgoing transitions to other nodes.
              - …
            - `position` WorkflowPosition, required — Canvas position of the node.
              - …
            - `agentId` string, required — Target voice agent id.
            - `timeout` integer — Timeout in milliseconds.
            - `transferMessage` string — Message spoken before handing off. Supports `{{variable}}` interpolation; may be empty.
            - `transferMessageType` 'static' | 'prompt' — Whether the message is a literal `static` string or a `prompt` for the LLM.
            - `handoffConversation` boolean — Pass the conversation transcript to the target agent.
            - `handoffVariables` boolean — Pass workflow variables to the target agent.
          - WorkflowRouterNode — Routes to a branch based on its transitions.
            - `id` string, required — Unique node id (nanoid or UUID).
            - `type` 'router', required — Node type discriminator.
            - `label` string — Display label.
            - `description` string — Optional node description.
            - `isGlobal` boolean — Whether this is a global node.
            - `globalCondition` string — Condition that activates a global node. Supports `{{variable}}` interpolation; may be empty.
            - `globalConditionType` 'prompt' | 'dtmf'
            - `globalDtmfKey` '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '#' | '*' — DTMF key that triggers the global node when `globalConditionType` is `dtmf`.
            - `globalReturnToSource` boolean
            - `requiresDoubleConfirm` boolean
            - `skipResponse` boolean
            - `staticVariables` WorkflowStaticVariable[]
              - …
            - `metadata` WorkflowNodeMetadata, required — Node metadata.
              - …
            - `transitions` WorkflowTransition[] — Outgoing transitions to other nodes.
              - …
            - `position` WorkflowPosition, required — Canvas position of the node.
              - …
          - WorkflowSetLocalVariablesNode — Sets local/static variables (see base `staticVariables`).
            - `id` string, required — Unique node id (nanoid or UUID).
            - `type` 'set_local_variables', required — Node type discriminator.
            - `label` string — Display label.
            - `description` string — Optional node description.
            - `isGlobal` boolean — Whether this is a global node.
            - `globalCondition` string — Condition that activates a global node. Supports `{{variable}}` interpolation; may be empty.
            - `globalConditionType` 'prompt' | 'dtmf'
            - `globalDtmfKey` '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '#' | '*' — DTMF key that triggers the global node when `globalConditionType` is `dtmf`.
            - `globalReturnToSource` boolean
            - `requiresDoubleConfirm` boolean
            - `skipResponse` boolean
            - `staticVariables` WorkflowStaticVariable[]
              - …
            - `metadata` WorkflowNodeMetadata, required — Node metadata.
              - …
            - `transitions` WorkflowTransition[] — Outgoing transitions to other nodes.
              - …
            - `position` WorkflowPosition, required — Canvas position of the node.
              - …
          - WorkflowChangeAgentSettingsNode — Overrides agent settings mid-flow.
            - `id` string, required — Unique node id (nanoid or UUID).
            - `type` 'change_agent_settings', required — Node type discriminator.
            - `label` string — Display label.
            - `description` string — Optional node description.
            - `isGlobal` boolean — Whether this is a global node.
            - `globalCondition` string — Condition that activates a global node. Supports `{{variable}}` interpolation; may be empty.
            - `globalConditionType` 'prompt' | 'dtmf'
            - `globalDtmfKey` '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '#' | '*' — DTMF key that triggers the global node when `globalConditionType` is `dtmf`.
            - `globalReturnToSource` boolean
            - `requiresDoubleConfirm` boolean
            - `skipResponse` boolean
            - `staticVariables` WorkflowStaticVariable[]
              - …
            - `metadata` WorkflowNodeMetadata, required — Node metadata.
              - …
            - `transitions` WorkflowTransition[] — Outgoing transitions to other nodes.
              - …
            - `position` WorkflowPosition, required — Canvas position of the node.
              - …
            - `settingsOverrides` object — Agent-setting overrides applied at this node. Stored as-is and not field-validated (mirrors agent-level config).
      - `edges` WorkflowEdge[], required — Edges connecting nodes in the builder canvas.
        - `id` string, required — Edge id (nanoid or UUID).
        - `source` string, required — Source node id.
        - `target` string, required — Target node id.
        - `sourceHandle` string
        - `targetHandle` string
        - `type` string — Edge render type (custom ReactFlow types like `deletable` are allowed).
        - `selected` boolean — Canvas selection state.
        - `animated` boolean
        - `hidden` boolean
        - `metadata` object
          - `transitionId` string
          - `label` string
          - `style` object
      - `customVariables` WorkflowVariable[] — Workflow-level variables available across nodes.
        - `id` string, required — Variable id — nanoid or author slug (e.g. `out_var_flights`).
        - `name` string, required — Variable name (snake_case).
        - `description` string
        - `dataType` 'string' | 'number' | 'boolean' | 'integer' | 'array' | 'object', required
        - `enumValues` WorkflowEnumValue[]
          - `value` string, required
          - `label` string
        - `isEnumEnabled` boolean
        - `isRequired` boolean
        - `defaultValue` unknown
        - `extractionPrompt` string
        - `sourceNodeId` string
        - `sourceNodeType` string
        - `properties` WorkflowVariable[] — Child variables (for `object` types).
        - `item` WorkflowVariable — recursive
    - `outcomeResponseShape` object, nullable — Expected outcome response structure
    - `resolvedWebTools` object[], nullable — Resolved web tools with overrides applied
    - `createdAt` string, date-time
    - `updatedAt` string, date-time
    - `account` object — User account plan information
      - `plan` string, nullable

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `403` — Forbidden - not authorized to update this voice agent
- `404` — Voice agent not found
- `500` — Server Side Error

---

[API](https://skmtc.net/tryhamsa/apis/hamsa-api.md) · [All operations](https://skmtc.net/tryhamsa/apis/hamsa-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tryhamsa/hamsa-api/versions/ecbeb5d8dc13/schema)
