> ## Documentation Index
> Fetch the complete documentation index at: https://vida.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Agent

> Update an agent



## OpenAPI

````yaml post /api/v2/agent
openapi: 3.0.0
info:
  version: 2.0.0
  title: Vida API
  description: Vida API Documentation
servers:
  - url: https://api.vida.dev
    description: Vida Production
    variables:
      baseUrl:
        default: api.vida.dev
        description: Production API Root
security: []
paths:
  /api/v2/agent:
    post:
      tags:
        - Agents
      summary: Update Agent
      description: Update an agent
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - type
                - title
                - description
              properties:
                type:
                  description: Type for this agent
                  type: string
                  enum:
                    - chatAgent
                title:
                  description: Title for Agent
                  type: string
                  example: Call Screener
                description:
                  description: Some description
                  type: string
                  example: Description
                welcomeMessage:
                  description: Message users see when initially visiting a agent
                  type: string
                  example: This brought to you by Wolf Cola
                links:
                  description: >-
                    Array of any http links to reference for external knowledge
                    for your agent
                  type: array
                  items:
                    type: string
                  example:
                    - https://vida.io/faq
                actions:
                  description: >-
                    Actions that your agent can take including instructions and
                    settings
                  type: array
                  items:
                    type: string
                  example:
                    - transfer
                timezone:
                  description: >-
                    The IANA (Internet Assigned Numbers Authority) formatted
                    timezone your AI agent operates in.
                  type: string
                  example: America/Chicago, America/New_York, Europe/London, etc
                agentVoice:
                  description: Agent voice model to use
                  type: string
                  example: en-US Female
                agentLang:
                  description: Agent language to be used for voice and transcriptions
                  type: string
                  enum:
                    - en-US
                    - multi
                    - es-MX
                    - es-ES
                    - es-US
                  default: en-US
                agentInstructions:
                  description: >-
                    Agent instructions for user interaction. This is for
                    chatAgents only
                  type: string
                  example: >-
                    I want you to payout rewards for users that answer a few
                    questions about this promotional video.
                agentModel:
                  description: Agent LLM model to use for its intelligence
                  type: string
                  example: gpt-4o-2024-08-06
                agentThinking:
                  description: >-
                    Optional reasoning budget for models that support thinking.
                    Use null to disable or low for short thinking.
                  type: string
                  enum:
                    - low
                  nullable: true
                agentThinkingModel:
                  description: >-
                    Model to use for pauseAndThink function reasoning. Defaults
                    to gpt-5.2.
                  type: string
                  example: gpt-5.2
                postConvoForceThinking:
                  description: >-
                    Force post-conversation summary/reporting/spam detection to
                    use a thinking-capable model when agentThinking is off and
                    the selected model does not support thinking. Uses
                    agentThinkingModel (default gpt-5.2).
                  type: boolean
                  example: false
                agentS2SEngine:
                  description: >-
                    (Requires Specific Paid Plan) The Speech-to-Speech Voice
                    engine to use for voice, AI, and transcriptions
                  type: string
                  enum:
                    - null
                    - openai
                    - gemini
                  default: null
                agentSttEngine:
                  description: Speech to text engine for this agent
                  type: string
                  enum:
                    - google
                    - deepgram
                    - deepgramflux
                    - openai
                  default: deepgram
                agentSttSmartFormatting:
                  description: >-
                    Enable Deepgram smart formatting for speech-to-text
                    (punctuation + numerals stay enabled regardless). Default
                    true.
                  type: boolean
                  default: true
                postAnswerDtmf:
                  description: >-
                    DTMF your agent will send upon answering a call. Useful if
                    you are forwarding calls to your agent from a platform that
                    requires a DTMF verification before the call is connected.
                  type: string
                waitOnAnswer:
                  description: >-
                    The amount of time in milliseconds your Agent will wait
                    before speaking the greeting (welcomeMessage).
                  type: integer
                backgroundAudio:
                  description: >-
                    Optional background audio to play on calls. Accepts a URL
                    string or an object with url, loop (true or false), gain,
                    and startAfterGreeting fields. Only HTTP(S) URLs are
                    supported.
                  oneOf:
                    - type: string
                    - type: object
                      properties:
                        url:
                          type: string
                        loop:
                          type: boolean
                          default: true
                        gain:
                          type: integer
                          default: 0
                        startAfterGreeting:
                          type: boolean
                          default: true
                        track:
                          type: string
                          enum:
                            - bg
                            - fx
                          description: >-
                            Advanced: choose track name; bg = ambient, fx =
                            foreground.
                      required:
                        - url
                interruptionWordCount:
                  description: >-
                    how many words a caller needs to speak before it is treated
                    as an interruption
                  type: integer
                  default: 3
                interruptionMinimumSpeakingTime:
                  description: >-
                    (in seconds) How long the agent needs to be speaking before
                    it can be interrupted
                  type: integer
                  default: 3
                speakingTimeout:
                  description: >-
                    (in milliseconds) the default amount of time between words
                    before we consider caller speaking to be finished.
                    Increasing this can help prevent unintentional interruptions
                    for slow talkers. 
                  type: integer
                  default: 1200
                speechProcessingDelay:
                  description: >-
                    (in milliseconds) the default amount of delay before
                    processed speech is sent to the LLM for a response.
                    Increasing this can help prevent unintentional interruptions
                    for slow talkers. Note that this delay automatically
                    increases and decreases depending on the number of
                    interruptions over a period of time.
                  type: integer
                  default: 500
                speechProcessingDelayInterruptionStep:
                  description: >-
                    (in milliseconds) how much speech processing delay is added
                    per interruption.
                  type: integer
                  default: 500
                speechProcessingDelayMaxMultiplier:
                  description: >-
                    the maximum number of interruptions that will influence the
                    speech processing delay.
                  type: integer
                  default: 4
                callerResponseTimeout:
                  description: >-
                    (in seconds) how much silence (nothing said by the caller)
                    before the agent asks _are you still there?_.
                  type: integer
                  default: 13
                callerResponseTimeoutHangupCounter:
                  description: >-
                    the maximum number of times your agent can ask _are you
                    there_ (callerResponseTimeout) before hanging up the call.
                  type: integer
                  default: 3
                noContactInjection:
                  description: >-
                    Whether the contact card for the caller should be injected
                    into the agent context
                  type: boolean
                  default: false
                noConvoHistory:
                  description: >-
                    Whether the call summary history for the caller should be
                    injected into the agent context
                  type: boolean
                  default: false
                autoRecordingNotification:
                  description: >-
                    Whether to automatically notify callers that recording is
                    happening: _true (string)_ means notify callers from area
                    codes where it is legally required. _false (string)_ means
                    never notify callers. _always (string)_ means notify every
                    caller whether legally required or not that recording is in
                    progress.
                  type: string
                  default: 'true'
                recordingNotificationPhrase:
                  description: >-
                    The phrase that will be spoken to the caller notifying them
                    that recording is in progress: _This call is being recorded_
                    is the default.
                  type: string
                  default: This call is being recorded.
                preAnswerRingTime:
                  description: >-
                    In seconds. How many seconds should the caller experience
                    ringing before the agent answers. Valid value range is 1-60
                  type: integer
                  default: null
                preAnswerSkipProcessingResults:
                  description: >-
                    When true, pre-answer functions return their raw results
                    directly to agent context instead of sending those results
                    back to the LLM for another processing step.
                  type: boolean
                  default: false
                cnamAutoRejectRegex:
                  description: >-
                    Optional JavaScript regex string. On inbound voice calls, if
                    the inbound SIP CNAM matches this pattern, the call is
                    immediately rejected before answer. Reject wins if both
                    reject and transfer match.
                  type: string
                  default: null
                cnamAutoRejectCode:
                  description: >-
                    Optional SIP reject code to use when cnamAutoRejectRegex
                    matches. Defaults to 603 when omitted.
                  type: integer
                  default: 603
                cnamAutoTransferRegex:
                  description: >-
                    Optional JavaScript regex string. On inbound voice calls, if
                    the inbound SIP CNAM matches this pattern and reject did not
                    match, the call is immediately transferred silently.
                  type: string
                  default: null
                cnamAutoTransferDestination:
                  description: >-
                    Destination used when cnamAutoTransferRegex matches. Accepts
                    E.164 phone numbers or PBX/extension targets like ext:1234
                    or pbx:1234.
                  type: string
                  default: null
                confirmTransfers:
                  description: Require callee to press 1 before a transfer is completed
                  type: boolean
                  default: false
                monitorTransfers:
                  description: Continue to monitor and transcribe transferred calls.
                  type: boolean
                  default: false
                attendedTransfers:
                  description: >-
                    Your agent will stay on the line with the caller while
                    transfer attempts are made. Those answering the transfer
                    attempts will need to say Yes to accept the call. This will
                    override the confirmTransfers option.
                  type: boolean
                  default: false
                attendedTransferBridgeTrigger:
                  description: >-
                    What is required to be spoken by the transferee in order for
                    the call to be bridged. Values can be null (defaults to
                    Yes), any, or a regex.
                  type: string
                  default: null
                transferConfirmTimeout:
                  description: >-
                    The length of time in seconds we will wait for confirmation
                    after a transferred call with confirmTransfers or
                    attendedTransfers is answered.
                  type: integer
                  default: 30
                apps:
                  description: Array of apps to enable for this given agent
                  type: array
                  default: []
                  items:
                    type: object
                    required:
                      - appId
                      - version
                      - instructions
                    properties:
                      appId:
                        type: string
                        example: squareUp
                        description: The identifier for the integrated app.
                      version:
                        type: string
                        example: v1
                        description: The version of the app integration.
                      instructions:
                        type: string
                        example: Use this app to book appointments from the user.
                        description: Instructions for how to use the app.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Agent created.
                  campaignId:
                    type: string
                    example: camp931829b5857f....
      security:
        - apiKeyAuth: []
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: query
      name: token
      description: Vida API Token

````