---
title: "Update an existing voice agent"
method: PATCH
path: "/v1/voice-agents/{voiceAgentId}"
deprecated: true
---

# Update an existing voice agent

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

> **Deprecated.**

## Path parameters

- `voiceAgentId` string, required

## Request body

- UpdateVoiceAgentRequest
  - `agentName` string
  - `greetingMessage` string, nullable — Greeting Message can be customized by adding params like: {{name}}, to make the message more personal!
  - `greetingMessageType` string, nullable
  - `preamble` string — Preamble can be customized by adding params like: {{agentName}}, to make the prompt more specific and context aware!
  - `lang` 'ar' | 'en'
  - `pokeMessages` string[] — The messages to say to the user when he doesn't respond!
  - `realTime` boolean
  - `silenceThreshold` integer
  - `interrupt` boolean
  - `outcome` string, nullable — A prompt to take the conversation and transform it to anything you like, like creating an article out of the conversation!
  - `outcomeResponseShape` object — Recursive OpenAPI-style shape with 'type', 'properties', 'required', 'items', ...etc. Please refer to the `OpenAPI Outcome Response Instructions` above for more information.
  - `webhookUrl` string, uri, nullable
  - `webhookAuth` ExternalWebhookAuthScheme — Authorization header to be sent in this format: `Authorization: [authKey] [authSecret]`
    - `authKey` string, nullable
    - `authSecret` string, nullable
  - `voiceId` string — For trying voices and choosing one by yourself, or event cloning a voice, please visit Hamsa Agents platform voices tab [here](https://agents.tryhamsa.com/app/voices).
  - `description` string
  - `isTemplate` boolean
  - `icon` string
  - `tools` object
    - `genderDetection` boolean
    - `smartCallEnd` boolean
  - `params` object — Set the params you define in the greeting message or preamble fields here, the key is the same as the param and the value is the param value. Press 'Add new property' below to set the param name then press enter, after that add the value.
  - `alignment` object
    - `greetingMessage` string
    - `preamble` string
  - `knowledgeBaseItemsIds` string[]
  - `webToolsIds` string[]
  - `voiceDictionaryIds` string[]
  - `userInactivityTimeout` number
  - `maxCallDuration` number
  - `responseDelay` number
  - `backgroundNoise` boolean
  - `waitForUserToSpeakFirst` integer
  - `thinkingVoice` boolean
  - `speakerIdentification` boolean
  - `llmConfig` VoiceAgentLlmConfig — Configuration for the LLM (Large Language Model) used by the voice agent
    - `provider` 'OpenAI' | 'Gemini' | 'deepmyst' | 'Custom' | 'Groq' — The LLM provider to use
    - `modelName` string — The model name to use. Valid models depend on the provider: OpenAI (GPT-5, GPT-5-Mini, GPT-5-Nano, GPT-4.1, GPT-4.1-Mini, GPT-4.1-Nano, GPT-4o, GPT-4o-mini), Gemini (Gemini 2.5-Pro, Gemini 2.5-Flash, gemini-3-flash-preview), deepmyst (gpt-4.1-optimize, gpt-4.1-mini-optimize), Groq (openai/gpt-oss-120b, openai/gpt-oss-20b)
    - `baseUrl` string — Custom base URL for the LLM API. Required when provider is 'Custom'
    - `apiKey` string — API key for authentication with the LLM provider. Required when provider is 'Custom'
    - `temperature` number — Controls randomness in the model's responses. Lower values make output more deterministic, higher values make it more creative. Note: GPT-5, GPT-5-Mini, and GPT-5-Nano models require temperature to be exactly 1.
  - `webToolsOverrides` object
  - `agenticRag` boolean
  - `languageDialectSwitcher` boolean
  - `noiseCancellation` string
  - `cancelNoisePer` string, nullable
  - `minInterruptionDuration` number
  - `vadActivationThreshold` number
  - `enableAutoGainControl` boolean
  - `sendDenoisedToStt` boolean

## Response `200`

Successful response

- VoiceAgentResponse
  - `success` boolean
  - `message` string
  - `data` VoiceAgentResponseData
    - `id` string
    - `agentName` string
    - `greetingMessage` string
    - `greetingMessageType` 'STATIC' | 'PROMPT', nullable
    - `description` string
    - `preamble` string
    - `lang` string
    - `pokeMessages` string[]
    - `realTime` boolean
    - `silenceThreshold` integer
    - `interrupt` boolean
    - `type` string
    - `outcome` string, nullable
    - `outcomeResponseShape` object, nullable
    - `projectId` string
    - `apiKeyId` string
    - `voiceId` string, nullable
    - `voiceRecordId` string, nullable
    - `voiceRecord` object, nullable — The voice record object which is connected to this agent.
    - `collectionId` string, nullable
    - `isTemplate` boolean
    - `icon` string, nullable
    - `webhookUrl` string, uri, nullable
    - `webhookAuth` ExternalWebhookAuthScheme — Authorization header to be sent in this format: `Authorization: [authKey] [authSecret]`
      - `authKey` string, nullable
      - `authSecret` string, nullable
    - `params` object — The parameters that are created for this agent.
    - `alignment` object
      - `greetingMessage` string
      - `preamble` string
    - `tools` object
      - `genderDetection` boolean
      - `smartCallEnd` boolean
    - `webToolsIds` string[]
    - `voiceDictionaryIds` string[]
    - `knowledgeBaseItemsIds` string[]
    - `webToolsOverrides` object
    - `userInactivityTimeout` number
    - `maxCallDuration` number
    - `responseDelay` number
    - `backgroundNoise` boolean
    - `waitForUserToSpeakFirst` integer
    - `thinkingVoice` boolean
    - `speakerIdentification` boolean
    - `llmConfig` VoiceAgentLlmConfig — Configuration for the LLM (Large Language Model) used by the voice agent
      - `provider` 'OpenAI' | 'Gemini' | 'deepmyst' | 'Custom' | 'Groq' — The LLM provider to use
      - `modelName` string — The model name to use. Valid models depend on the provider: OpenAI (GPT-5, GPT-5-Mini, GPT-5-Nano, GPT-4.1, GPT-4.1-Mini, GPT-4.1-Nano, GPT-4o, GPT-4o-mini), Gemini (Gemini 2.5-Pro, Gemini 2.5-Flash, gemini-3-flash-preview), deepmyst (gpt-4.1-optimize, gpt-4.1-mini-optimize), Groq (openai/gpt-oss-120b, openai/gpt-oss-20b)
      - `baseUrl` string — Custom base URL for the LLM API. Required when provider is 'Custom'
      - `apiKey` string — API key for authentication with the LLM provider. Required when provider is 'Custom'
      - `temperature` number — Controls randomness in the model's responses. Lower values make output more deterministic, higher values make it more creative. Note: GPT-5, GPT-5-Mini, and GPT-5-Nano models require temperature to be exactly 1.
    - `noiseCancellation` string
    - `cancelNoisePer` string, nullable
    - `agenticRag` boolean
    - `languageDialectSwitcher` boolean
    - `minInterruptionDuration` number
    - `vadActivationThreshold` number
    - `enableAutoGainControl` boolean
    - `sendDenoisedToStt` boolean
    - `createdAt` string, date-time
    - `updatedAt` string, date-time

## Other responses

- `400` — Bad Request
- `401` — Bad Request
- `403` — Bad Request
- `404` — Not Found
- `500` — Internal Server 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)
