v1

latestOpenAPI 3.0.1MIT2026-07-26104203277.0 KB

Update Voice Agent

Updates an existing voice agent with new configuration.

patch/v2/voice-agents/{voiceAgentId}

Path parameters

voiceAgentIdstring uuid required
Example:48f7656f-098b-4c43-b165-7cfd2cc8ac30

UUID of the voice agent.

Request body

type'Single Prompt' | 'Flow Agent'

Type of voice agent.

namestring

Name of the voice agent (max 150 characters).

knowledgeBaseItemsIdsstring[]

Knowledge base item UUIDs (replaces existing).

voiceDictionaryIdsstring[]

Voice dictionary UUIDs (replaces existing).

webhookUrlstring uri
webhookAuthobject
outcomeResponseShapeobject

Example request

{
  "type": "Single Prompt",
  "name": "Updated Customer Support Agent",
  "conversation": {
    "greetingMessage": "Welcome! How may I assist you?",
    "greetingMessageType": "TEXT",
    "preamble": "You are a customer support assistant.",
    "pokeMessages": [
      "Are you still there?"
    ],
    "params": {},
    "alignment": {
      "greetingMessage": "ltr",
      "preamble": "ltr"
    }
  },
  "voice": {
    "voiceId": "en-US-Neural2-B",
    "lang": "en"
  },
  "llm": {
    "provider": "openai",
    "model": "gpt-4-turbo",
    "temperature": 0.8,
    "baseUrl": "https://api.example.com",
    "apiKey": "sk-..."
  },
  "callSettings": {
    "noiseCancellation": "telephony_optimized",
    "cancelNoisePer": "conversation",
    "interrupt": true,
    "responseDelay": 500,
    "minInterruptionDuration": 0.6,
    "vadActivationThreshold": 0.6,
    "userInactivityTimeout": 20,
    "maxCallDuration": 400,
    "silenceThreshold": 1000,
    "backgroundNoise": true,
    "enableAutoGainControl": true,
    "sendDenoisedToStt": true,
    "waitForUserToSpeakFirst": 1,
    "thinkingVoice": true,
    "speakerIdentification": true,
    "agenticRag": true,
    "languageDialectSwitcher": true,
    "genderDetection": true,
    "smartCallEnd": true
  },
  "tools": [
    {
      "persistentId": "tool_123",
      "toolId": "48f7656f-098b-4c43-b165-7cfd2cc8ac30",
      "version": 1,
      "toolType": "FUNCTION",
      "nodeId": "node_1"
    }
  ],
  "knowledgeBaseItemsIds": [
    "48f7656f-098b-4c43-b165-7cfd2cc8ac30"
  ],
  "voiceDictionaryIds": [
    "48f7656f-098b-4c43-b165-7cfd2cc8ac30"
  ],
  "phoneNumber": {
    "type": "TWILIO",
    "id": "48f7656f-098b-4c43-b165-7cfd2cc8ac30"
  },
  "webhookUrl": "https://example.com/webhook",
  "workflow": {
    "nodes": [
      {
        "id": "2ZHj3IUpJFc-83H2-f8d3",
        "type": "start",
        "label": "Start",
        "message": "Hello, how can I help you today?",
        "messageType": "prompt",
        "position": {
          "x": 0,
          "y": 0
        },
        "metadata": {
          "version": 1
        },
        "transitions": []
      }
    ],
    "edges": [],
    "customVariables": [
      {
        "id": "z5QsyxUbrKPjYMGaMj1e1",
        "name": "customer_name",
        "dataType": "string",
        "description": "",
        "defaultValue": "john",
        "extractionPrompt": "",
        "enumValues": []
      }
    ]
  }
}

Response

Successful response

successboolean
messagestring
messageKeystring

Example response

{
  "success": true,
  "message": "Voice agent updated successfully",
  "messageKey": "VoiceAgentUpdatedSuccessfully",
  "data": {
    "id": "48f7656f-098b-4c43-b165-7cfd2cc8ac30",
    "type": "Single Prompt",
    "name": "Customer Support Agent",
    "conversation": {
      "greetingMessage": "Hello, how can I help you today?",
      "preamble": "You are a helpful assistant.",
      "pokeMessages": [],
      "params": {},
      "alignment": {
        "greetingMessage": "ltr",
        "preamble": "ltr"
      }
    },
    "voice": {
      "voiceId": "en-US-Neural2-A",
      "lang": "en"
    },
    "llm": {
      "provider": "openai",
      "model": "gpt-4",
      "temperature": 0.2
    },
    "callSettings": {
      "noiseCancellation": "telephony_optimized",
      "cancelNoisePer": "conversation",
      "interrupt": true,
      "responseDelay": 400,
      "userInactivityTimeout": 15,
      "maxCallDuration": 300,
      "silenceThreshold": 800,
      "minInterruptionDuration": 0.5,
      "vadActivationThreshold": 0.5
    },
    "knowledgeBaseItemsIds": [],
    "voiceDictionaryIds": [],
    "phoneNumber": {
      "type": "TWILIO",
      "id": "48f7656f-098b-4c43-b165-7cfd2cc8ac30"
    },
    "workflow": {
      "nodes": [
        {
          "id": "2ZHj3IUpJFc-83H2-f8d3",
          "type": "start",
          "label": "Start",
          "message": "Hello, how can I help you today?",
          "messageType": "prompt",
          "position": {
            "x": 0,
            "y": 0
          },
          "metadata": {
            "version": 1
          },
          "transitions": []
        }
      ],
      "edges": [],
      "customVariables": [
        {
          "id": "z5QsyxUbrKPjYMGaMj1e1",
          "name": "customer_name",
          "dataType": "string",
          "description": "",
          "defaultValue": "john",
          "extractionPrompt": "",
          "enumValues": []
        }
      ]
    },
    "createdAt": "2024-01-15T10:30:00Z",
    "updatedAt": "2024-01-15T10:30:00Z",
    "account": {
      "plan": "pro"
    }
  }
}