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

# Update Agent



## OpenAPI

````yaml /openapi/openapi.yaml patch /v1/agents/{agent_id}
openapi: 3.1.0
info:
  title: OneInbox API
  version: 1.0.0
servers:
  - url: https://api.oneinbox.ai
    description: Production server
security: []
tags:
  - name: health
  - name: integrations
  - name: llm-models
  - name: tools
  - name: knowledge-bases
  - name: voices
  - name: webhooks
  - name: agents
  - name: phone-numbers
  - name: calls
  - name: workspace
  - name: usage
  - name: audit-events
paths:
  /v1/agents/{agent_id}:
    patch:
      tags:
        - agents
      summary: Update Agent
      operationId: update_agent_v1_agents__agent_id__patch
      parameters:
        - name: agent_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Agent Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgentUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - API Key: []
components:
  schemas:
    AgentUpdate:
      properties:
        name:
          anyOf:
            - type: string
              maxLength: 255
              minLength: 1
            - type: 'null'
          title: Name
        llm_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Llm Id
        webhook_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Webhook Id
        transcriber:
          anyOf:
            - $ref: '#/components/schemas/TranscriberConfig'
            - type: 'null'
        tts:
          anyOf:
            - $ref: '#/components/schemas/TTSConfig'
            - type: 'null'
        first_message:
          anyOf:
            - type: string
            - type: 'null'
          title: First Message
        end_call_phrases:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: End Call Phrases
        max_duration_seconds:
          anyOf:
            - type: integer
              maximum: 7200
              minimum: 30
            - type: 'null'
          title: Max Duration Seconds
        interruption_sensitivity:
          anyOf:
            - type: number
              maximum: 1
              minimum: 0
            - type: 'null'
          title: Interruption Sensitivity
        silence_timeout_seconds:
          anyOf:
            - type: integer
              maximum: 300
              minimum: 1
            - type: 'null'
          title: Silence Timeout Seconds
        enable_recording:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Enable Recording
        language:
          anyOf:
            - type: string
              maxLength: 8
              minLength: 2
            - type: 'null'
          title: Language
        dynamic_variables:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Dynamic Variables
        voicemail_detection:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Voicemail Detection
        voicemail_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Voicemail Message
        responsiveness:
          anyOf:
            - type: number
              maximum: 1
              minimum: 0
            - type: 'null'
          title: Responsiveness
        speed:
          anyOf:
            - type: number
              maximum: 2
              minimum: 0.5
            - type: 'null'
          title: Speed
        background_sound:
          anyOf:
            - type: string
              maxLength: 64
            - type: 'null'
          title: Background Sound
        emotions:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Emotions
        job_description:
          anyOf:
            - type: string
            - type: 'null'
          title: Job Description
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
      type: object
      title: AgentUpdate
    AgentResponse:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
        llm_id:
          type: string
          title: Llm Id
        webhook_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Webhook Id
        transcriber:
          additionalProperties: true
          type: object
          title: Transcriber
        tts:
          additionalProperties: true
          type: object
          title: Tts
        first_message:
          anyOf:
            - type: string
            - type: 'null'
          title: First Message
        end_call_phrases:
          items:
            type: string
          type: array
          title: End Call Phrases
        max_duration_seconds:
          type: integer
          title: Max Duration Seconds
        interruption_sensitivity:
          type: number
          title: Interruption Sensitivity
        silence_timeout_seconds:
          type: integer
          title: Silence Timeout Seconds
        enable_recording:
          type: boolean
          title: Enable Recording
        language:
          type: string
          title: Language
        dynamic_variables:
          additionalProperties: true
          type: object
          title: Dynamic Variables
        voicemail_detection:
          type: boolean
          title: Voicemail Detection
        voicemail_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Voicemail Message
        responsiveness:
          type: number
          title: Responsiveness
        speed:
          type: number
          title: Speed
        background_sound:
          anyOf:
            - type: string
            - type: 'null'
          title: Background Sound
        emotions:
          type: boolean
          title: Emotions
        job_description:
          anyOf:
            - type: string
            - type: 'null'
          title: Job Description
        effective_system_prompt:
          anyOf:
            - type: string
            - type: 'null'
          title: Effective System Prompt
          description: >-
            Read-only. The system prompt the agent is actually given at call
            time: the linked LLM model's `system_prompt` with `job_description`
            prepended as a `# Role` block — exactly as the worker assembles it.
            Per-call dynamic-variable interpolation and knowledge-base chunks
            are resolved at runtime and not reflected here. Populated on GET
            /v1/agents/{id}; null on list responses.
        metadata:
          additionalProperties: true
          type: object
          title: Metadata
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - id
        - name
        - llm_id
        - webhook_id
        - transcriber
        - tts
        - first_message
        - end_call_phrases
        - max_duration_seconds
        - interruption_sensitivity
        - silence_timeout_seconds
        - enable_recording
        - language
        - dynamic_variables
        - voicemail_detection
        - voicemail_message
        - responsiveness
        - speed
        - background_sound
        - emotions
        - job_description
        - metadata
        - created_at
        - updated_at
      title: AgentResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    TranscriberConfig:
      properties:
        provider:
          type: string
          enum:
            - deepgram
            - assembly_ai
            - whisper
            - azure
          title: Provider
          default: deepgram
        model:
          anyOf:
            - type: string
            - type: 'null'
          title: Model
          default: nova-3
          enum:
            - nova-3
            - nova-2
            - nova
            - flux-general-en
            - flux-general-multi
            - enhanced
            - base
            - universal
            - best
            - nano
            - slam-1
            - whisper-1
        language:
          type: string
          title: Language
          default: en
      type: object
      title: TranscriberConfig
    TTSConfig:
      properties:
        provider:
          type: string
          enum:
            - cartesia
            - deepgram
            - elevenlabs
            - openai
            - shisa
            - minimax
          title: Provider
          default: deepgram
        credential_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Credential Id
          description: >-
            Optional. Omit to use the platform's own provider key (default).
            Pass an Integration id (from POST /v1/integrations) to bill TTS to
            your own account — e.g. bring your own ElevenLabs key. When set, the
            integration's provider must match `provider`.
        voice_id:
          anyOf:
            - type: string
              maxLength: 255
            - type: 'null'
          title: Voice Id
          description: >-
            A voice from GET /v1/voices. Accepts EITHER the catalogue id
            (`vc_<uuid>` / bare uuid) OR the provider's native voice name/id
            (e.g. Deepgram `asteria`) — named values are resolved against the
            catalogue for the chosen `provider` and stored as the catalogue id.
            The voice's provider must match `provider` above. Omit to use the
            platform-default voice for the chosen provider.
        model:
          anyOf:
            - type: string
              maxLength: 255
            - type: 'null'
          title: Model
          description: >-
            Optional TTS model override (provider-specific). Cartesia: e.g.
            `sonic-2`, `sonic-english`; OpenAI: `tts-1`, `tts-1-hd`,
            `gpt-4o-mini-tts`; ElevenLabs: e.g. `eleven_flash_v2_5`,
            `eleven_multilingual_v2`. Omit to use the provider's default.
            (Deepgram TTS picks the model via `voice_id`, e.g.
            `aura-2-asteria-en`.)
          enum:
            - sonic-2
            - sonic
            - sonic-turbo
            - sonic-english
            - sonic-multilingual
            - sonic-2-2025-03-07
            - aura-2
            - aura
            - eleven_multilingual_v2
            - eleven_turbo_v2_5
            - eleven_flash_v2_5
            - eleven_turbo_v2
            - eleven_monolingual_v1
            - eleven_multilingual_v1
            - eleven_v3
            - tts-1
            - tts-1-hd
            - gpt-4o-mini-tts
            - speech-02-turbo
            - speech-02-hd
            - speech-01-turbo
            - speech-01-hd
        speed:
          type: number
          maximum: 2
          minimum: 0.5
          title: Speed
          default: 1
        stability:
          type: number
          maximum: 1
          minimum: 0
          title: Stability
          default: 0.5
      type: object
      title: TTSConfig
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    API Key:
      type: http
      description: >-
        Your **API key** sent as a Bearer credential — `Authorization: Bearer
        <api_key>`, where `<api_key>` starts with `oi_sk_` (create one via `POST
        /v1/api-keys`). Although the field is labelled 'token', paste your API
        key here. A dashboard JWT is also accepted on this header for the same
        endpoints.
      scheme: bearer

````