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

# Update Agent

> Update an existing agent's configuration



## OpenAPI

````yaml PATCH /agent/{agent_id}/
openapi: 3.1.0
info:
  title: Outbox AI API
  description: API for managing AI agents (chatbots and voicebots) on the Outbox platform
  version: 1.0.0
servers:
  - url: https://api.getoutbox.ai
security: []
paths:
  /agent/{agent_id}/:
    patch:
      summary: Update Agent
      description: Update an existing agent's configuration
      parameters:
        - name: agent_id
          in: path
          description: The ID of the agent to update
          required: true
          schema:
            type: string
      requestBody:
        description: Agent fields to update
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgentUpdate'
      responses:
        '200':
          description: Agent updated successfully
        '400':
          description: Bad Request - Invalid data or failed to retrieve assistant
        '401':
          description: Unauthorized - Invalid or missing API key
        '403':
          description: Forbidden - Insufficient permissions (requires level 2)
        '404':
          description: Agent not found
      security:
        - CompanyApiKey: []
components:
  schemas:
    AgentUpdate:
      oneOf:
        - $ref: '#/components/schemas/ChatAgentUpdate'
        - $ref: '#/components/schemas/VoiceAgentUpdate'
    ChatAgentUpdate:
      title: Chat Agent
      type: object
      properties:
        name:
          type: string
          description: Agent name
        timezone:
          type: string
          description: Timezone name (e.g. "America/New_York")
        first_message:
          type: string
          description: First message shown in supported chat surfaces
        webhook_url:
          type: string
          description: Webhook URL (if applicable)
        branding_colour:
          type: string
          description: '"" or hex #RGB / #RRGGBB'
        interrupt_mode:
          type: string
          enum:
            - 'true'
            - 'false'
          description: Chat agent interrupt mode toggle
        prompt:
          type: string
          description: Full prompt replacement
        line_edits:
          type: array
          description: Incremental prompt edits applied server-side
          items:
            type: object
    VoiceAgentUpdate:
      title: Voice Agent
      type: object
      properties:
        name:
          type: string
          description: Agent name
        timezone:
          type: string
          description: Timezone name (e.g. "America/New_York")
        first_message:
          type: string
          description: First spoken message (blank means wait for caller)
        webhook_url:
          type: string
          description: Webhook URL to receive call completion payloads
        branding_colour:
          type: string
          description: '"" or hex #RGB / #RRGGBB'
        prompt:
          type: string
          description: Full prompt replacement
        line_edits:
          type: array
          description: Incremental prompt edits applied server-side
          items:
            type: object
        model:
          type: object
          description: LLM configuration for voice calls
          properties:
            model:
              type: string
              description: Model name
            max_tokens:
              type: integer
              description: Max tokens for responses
            temperature:
              type: number
              description: Sampling temperature
        voice:
          type: object
          description: Voice provider + voice id (+ optional 11labs tuning knobs)
          properties:
            provider:
              type: string
              enum:
                - 11labs
                - openai
              description: Voice provider
            id:
              type: string
              description: Provider voice id
            model:
              type: string
            similarityBoost:
              type: number
            style:
              type: number
            stability:
              type: number
            optimizeStreamingLatency:
              type: integer
            useSpeakerBoost:
              type: boolean
            autoMode:
              type: boolean
            speed:
              type: number
        language:
          type: string
          description: Language code (e.g. "en")
        keyterms:
          type: string
          description: >-
            Space-separated transcription hints (names, brands, locations) to
            improve speech-to-text accuracy ("" clears)
        background:
          type: string
          description: >-
            Background audio preset: "office", "lounge", or "off"; or a custom
            MP3 URL
        hipaa_enabled:
          type: string
          enum:
            - 'true'
            - 'false'
        zdr_enabled:
          type: boolean
          description: >-
            Enable Zero Data Retention where supported so no call data is stored
            for this agent
        recording_enabled:
          type: boolean
          description: Controls whether call audio recordings are stored
        transcript_enabled:
          type: boolean
          description: Controls whether call transcripts are stored
        voicemail_message:
          type: string
          description: Voicemail message
        end_call_message:
          type: string
          description: End call message
        recording_consent_message:
          type: string
          description: >-
            What the agent says to inform the caller the call may be recorded
            ("" clears)
        unqualified_prompt:
          type: string
        success_prompt:
          type: string
          description: Prompt used to evaluate whether the call achieved the agent's goal
        scoring_prompt:
          type: string
        summary_prompt:
          type: string
        idle_messages:
          type: array
          nullable: true
          items:
            type: string
          description: Idle messages plan (null clears)
        idle_message_max_spoken_count:
          type: integer
          minimum: 1
          maximum: 10
          description: Max number of idle messages per call
        idle_timeout_seconds:
          type: integer
          minimum: 0
          maximum: 60
          description: Seconds of silence before idle messages are eligible
        llm_request_delay_seconds:
          type: number
          minimum: 0
          maximum: 10
        max_call_duration_seconds:
          type: integer
          minimum: 10
          maximum: 7200
        interrupt_num_words:
          type: integer
          minimum: 0
          maximum: 50
          description: 'Interrupt tuning: number of words before allowing interruption'
        speech_end_of_turn:
          type: object
          properties:
            threshold:
              type: number
              minimum: 0
              maximum: 1
            timeout_ms:
              type: integer
              minimum: 0
              maximum: 60000
        speech_stop:
          type: object
          properties:
            num_words:
              type: integer
              minimum: 0
              maximum: 50
            voice_seconds:
              type: number
              minimum: 0
              maximum: 10
            backoff_seconds:
              type: number
              minimum: 0
              maximum: 30
        speech_start:
          type: object
          properties:
            wait_seconds:
              type: number
              minimum: 0
              maximum: 10
  securitySchemes:
    CompanyApiKey:
      type: apiKey
      in: header
      name: Authorization
      description: Company API Key

````