# Update agent (/docs/api-reference/agents/updateAgent)

> Update an existing agent. Send only the fields you want to change.



**PUT** `/agents/{agent_id}`

Update an existing agent. Send only the fields you want to change.

```yaml
operationId: updateAgent
requestBody:
  required: true
  content:
    application/json:
      schema:
        type: object
        description: Agent configuration.
        properties:
          name:
            type: string
            description: Name for the agent.
            example: Customer Support Agent
          welcome_message:
            type: string
            description: Initial message the agent will say when answering a call.
            example: Hello! How can I help you today?
          context_breakdown:
            type: array
            description: >-
              List of context breakdowns, each containing `title`, `body`, and optional
              `is_enabled`.
            items:
              type: object
              required:
                - title
                - body
              properties:
                title:
                  type: string
                  description: Title of the breakdown.
                  example: Purpose
                body:
                  type: string
                  description: Body of the breakdown — the detailed prompt content.
                  example: This agent helps customers with product inquiries and support issues.
                is_enabled:
                  type: boolean
                  default: true
                  description: Whether this section is included in the prompt.
          call_type:
            type: string
            enum:
              - Incoming
              - Outgoing
            description: Call type of the assistant.
          transcriber:
            type: object
            description: Configuration for the speech-to-text transcriber.
            properties:
              provider:
                type: string
                enum:
                  - deepgram_stream
                  - cartesia
                  - sarvam
                  - azure_stream
                description: The speech-to-text provider to use.
                example: deepgram_stream
              model:
                type: string
                enum:
                  - nova-3
                  - nova-2
                description: The model to use for transcription (required when provider is `deepgram_stream`).
                example: nova-3
              silence_timeout_ms:
                type: integer
                description: Silence timeout in milliseconds.
                example: 400
              numerals:
                type: boolean
                description: Convert numbers from words to digits.
              punctuate:
                type: boolean
                description: Add punctuation to the transcript.
              smart_format:
                type: boolean
                description: Apply smart formatting to the transcript.
              diarize:
                type: boolean
                description: Identify different speakers in the transcript.
          model:
            type: object
            description: Configuration for the language model.
            properties:
              model:
                type: string
                enum:
                  - azure-gpt-4.1-mini
                  - azure-gpt-4.1-nano
                  - azure-gpt-4o
                  - azure-gpt-4o-mini
                  - gemini-2.5-flash
                  - gemini-2.5-flash-lite
                  - gpt-3.5-turbo
                  - gpt-4.1-mini
                  - gpt-4.1-nano
                  - gpt-4o
                  - gpt-4o-mini
                  - gpt-5.1
                  - llama-3.3-70b-versatile
                description: The language model to use.
                example: gpt-4o-mini
              temperature:
                type: number
                minimum: 0
                maximum: 1
                description: Controls randomness in the model's output (0.0 to 1.0).
                example: 0.7
          voice:
            type: object
            description: Configuration for the text-to-speech voice.
            properties:
              provider:
                type: string
                enum:
                  - eleven_labs
                  - deepgram
                  - google
                  - cartesia
                  - rime
                description: The voice provider to use.
                example: eleven_labs
              voice_id:
                type: string
                description: The specific external voice identifier from the provider.
                example: JBFqnCBsd6RMkjVDRZzb
          web_search:
            type: object
            description: Configuration for web search capabilities.
            properties:
              enabled:
                type: boolean
                description: Enable or disable web search functionality.
              provider:
                type: string
                enum:
                  - DuckDuckGo
                description: The search provider to use.
                example: DuckDuckGo
          post_call_actions:
            type: object
            description: Side effects that fire once the call ends. Configure email, webhook, or both.
            properties:
              email:
                type: object
                properties:
                  enabled:
                    type: boolean
                  recipients:
                    type: array
                    description: Email addresses that should receive the notification.
                    items:
                      type: string
                      format: email
                    example:
                      - support@example.com
                  include:
                    type: array
                    description: Which sections to include in the email body.
                    items:
                      type: string
                      enum:
                        - summary
                        - extracted_variables
                        - fullConversation
                        - sentiment
                  extracted_variables:
                    type: array
                    description: Variables the model should pull out of the conversation for the email.
                    items:
                      type: object
                      required:
                        - key
                        - prompt
                      properties:
                        key:
                          type: string
                          description: Unique identifier for the variable in the post-call payload.
                          example: customer_issue
                        prompt:
                          type: string
                          description: Instruction for the model on what to pull out of the conversation.
                          example: Identify the main issue the customer is experiencing.
              webhook:
                type: object
                properties:
                  enabled:
                    type: boolean
                  url:
                    type: string
                    format: uri
                    description: Endpoint that receives a POST with the call payload.
                    example: https://your-webhook-endpoint.com/omnidim-callback
                  include:
                    type: array
                    description: Which sections to include in the webhook body.
                    items:
                      type: string
                      enum:
                        - summary
                        - extracted_variables
                        - fullConversation
                        - sentiment
                  extracted_variables:
                    type: array
                    description: Variables the model should pull out of the conversation for the webhook.
                    items:
                      type: object
                      required:
                        - key
                        - prompt
                      properties:
                        key:
                          type: string
                          description: Unique identifier for the variable in the post-call payload.
                          example: customer_issue
                        prompt:
                          type: string
                          description: Instruction for the model on what to pull out of the conversation.
                          example: Identify the main issue the customer is experiencing.
          transfer:
            type: object
            description: Conditional call transfer to a human agent or another number.
            properties:
              enabled:
                type: boolean
              transfer_options:
                type: array
                description: >-
                  Where to transfer the call and under what condition. The first matching condition
                  wins.
                items:
                  type: object
                  required:
                    - number
                    - transfer_condition
                    - transfer_message
                  properties:
                    number:
                      type: string
                      description: Primary phone number to transfer to. Include country code with leading `+`.
                      example: '+15551234567'
                    type:
                      type: string
                      enum:
                        - static
                        - dynamic
                      default: static
                      description: |
                        `static` transfers to `number`. `dynamic` lets the agent
                        pick a number at runtime based on the conversation.
                    backup_numbers:
                      type: array
                      description: Fallback numbers tried if the primary is unreachable.
                      items:
                        type: string
                    transfer_condition:
                      type: string
                      description: Natural-language condition that triggers this transfer option.
                      example: Transfer if the customer asks to speak with a human.
                    transfer_message:
                      type: string
                      description: Message the agent says to the caller before executing the transfer.
                      example: Please hold while I connect you to one of our agents.
          end_call:
            type: object
            description: Hang up automatically when a condition is met.
            properties:
              enabled:
                type: boolean
              condition:
                type: string
                description: >-
                  Natural-language condition that triggers ending the call. Only evaluated when
                  `enabled` is true.
                example: End the call once the customer's issue is resolved.
              message:
                type: string
                description: What the agent says before hanging up.
                example: Thank you for contacting us. Have a great day!
          background_track:
            type: object
            description: Ambient background noise that plays under the agent's voice.
            properties:
              enabled:
                type: boolean
                description: Whether to mix the ambient track under the agent's audio.
              name:
                type: string
                enum:
                  - call_center
                  - filler
                  - office
                  - office_1
                  - restaurant
                description: Ambient track to mix under the agent.
              volume:
                type: number
                minimum: 0
                maximum: 1
                default: 0.2
                description: Volume level on a 0–1 scale. Default 0.2.
          initial_ringing_sound_enabled:
            type: boolean
            description: Plays a ringing tone after the call is picked up, until the agent starts speaking.
          voicemail:
            type: object
            description: Voicemail / answering-machine handling for outbound calls.
            properties:
              enabled:
                type: boolean
                description: Detect voicemail and react instead of speaking to a machine.
              message:
                type: string
                description: Message to leave when voicemail is detected.
          languages:
            type: array
            description: Languages the agent should support. Pass each language as a display-name string.
            items:
              type: string
              enum:
                - English
                - English (India)
                - English (US)
                - Hindi
                - Bengali
                - Spanish
                - Tamil
                - Marathi
                - Telugu
                - Gujarati
                - French
            example:
              - English
              - Hindi
responses:
  '200':
    description: Updated agent.
    content:
      application/json:
        schema:
          type: object
          properties:
            id:
              type: integer
              description: Agent identifier.
            name:
              type: string
            status:
              type: string
              description: >-
                Build state of the agent after the update. Always `Completed` once the operation
                returns.
        example:
          id: 6365
          name: Updated Support Agent
          status: Completed
```

**Python SDK**

```python
from omnidimension import Client
client = Client(api_key)

# Update an existing agent
agent_id = "your_agent_id_here"
update_data = {
    "name": "Updated Support Agent",
    "welcome_message": "Hello! I'm your updated support assistant. How can I help you today?",
    "model": {
        "temperature": 0.8
    }
}
response = client.agent.update(agent_id, update_data)
print(response)
```

**curl**

```bash
curl -X PUT "https://backend.omnidim.io/api/v1/agents/{agent_id}" \
  -H "Authorization: Bearer $OMNIDIM_API_KEY"
```
