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

# Update a voice deployment



## OpenAPI

````yaml /openapi-specs/brainbase-openapi.documented.json patch /api/workers/{workerId}/deployments/voice/{deploymentId}
openapi: 3.0.0
info:
  title: Brainbase REST API
  version: 1.0.3
  description: API documentation for Brainbase REST API
servers:
  - url: https://brainbase-monorepo-api.onrender.com
    description: Production server
security:
  - ApiKeyAuth: []
tags:
  - name: Team
    description: Endpoints related to team functionalities
  - name: Integrations
    description: Endpoints for integrations
  - name: Assets
    description: Endpoints for asset management
  - name: Workers
    description: Endpoints for worker operations
  - name: Flows
    description: Endpoints for flow management
  - name: Voice Deployments
    description: Endpoints for voice deployments
  - name: Voice V1 Deployments
    description: Endpoints for voice v1 deployments
  - name: Voice Deployment Logs
    description: Endpoints for voice deployment logs
  - name: Voice Deployment Outbound Data
    description: Endpoints for voice deployment outbound data
  - name: Chat Deployments
    description: Endpoints for chat deployments
  - name: Chat Deployment Logs
    description: Endpoints for chat deployment logs
  - name: Tags
    description: Endpoints for tag management and worker tag assignment
  - name: Echo
    description: Endpoints for Echo test suites, agents, and scorecards
  - name: Flow Versions
    description: Endpoints for flow version control
  - name: Deployment History
    description: Endpoints for deployment change history
  - name: Deployment Parameters
    description: Endpoints for deployment parameters
  - name: Log Exports
    description: Endpoints for async log export to CSV/JSON
  - name: Logs
    description: >-
      Universal log lookup — fetch any deployment log by ID without needing
      worker or deployment context
  - name: Deployments
    description: >-
      Universal deployment lookup — fetch any deployment by ID without needing
      worker context
paths:
  /api/workers/{workerId}/deployments/voice/{deploymentId}:
    patch:
      tags:
        - Voice Deployments
      summary: Update a voice deployment
      parameters:
        - name: workerId
          in: path
          required: true
          schema:
            type: string
        - name: deploymentId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateVoiceDeploymentRequest'
      responses:
        '200':
          description: Updated voice deployment
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VoiceDeployment'
        '400':
          description: Invalid request body
        '401':
          description: Unauthorized
        '404':
          description: Voice deployment not found
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import BrainbaseLabs from 'brainbase-labs';


            const client = new BrainbaseLabs({
              apiKey: process.env['BRAINBASE_LABS_API_KEY'], // This is the default and can be omitted
            });


            const voiceDeployment = await
            client.workers.deployments.voice.update('deploymentId', {
              workerId: 'workerId',
            });


            console.log(voiceDeployment.id);
        - lang: Python
          source: |-
            import os
            from brainbase_labs import BrainbaseLabs

            client = BrainbaseLabs(
                api_key=os.environ.get("BRAINBASE_LABS_API_KEY"),  # This is the default and can be omitted
            )
            voice_deployment = client.workers.deployments.voice.update(
                deployment_id="deploymentId",
                worker_id="workerId",
            )
            print(voice_deployment.id)
components:
  schemas:
    UpdateVoiceDeploymentRequest:
      type: object
      properties:
        name:
          type: string
        phoneNumber:
          type: string
        backupPhoneNumber:
          type: string
        backupPhoneMessage:
          type: string
        flowId:
          type: string
        flowVersionId:
          type: string
          nullable: true
        changeComment:
          type: string
        externalConfig:
          type: object
          properties:
            language:
              type: string
              nullable: true
            voiceId:
              type: string
              nullable: true
            voiceModel:
              type: string
              enum:
                - eleven_turbo_v2
                - eleven_flash_v2
                - eleven_turbo_v2_5
                - eleven_flash_v2_5
                - eleven_multilingual_v2
                - Play3.0-mini
                - PlayDialog
              nullable: true
            fallbackVoiceIds:
              type: array
              items:
                type: string
              nullable: true
            voiceTemperature:
              type: number
              nullable: true
            voiceSpeed:
              type: number
              nullable: true
            volume:
              type: number
              nullable: true
            responsiveness:
              type: number
              nullable: true
            interruptibility:
              type: number
              nullable: true
            enableResponsiveReactions:
              type: boolean
              nullable: true
            responsiveReactionsFrequency:
              type: number
              nullable: true
            responsiveReactionsWords:
              type: array
              items:
                type: string
              nullable: true
            reminderTriggerMs:
              type: number
              nullable: true
            reminderMaxCount:
              type: number
              nullable: true
            ambientSound:
              type: string
              nullable: true
            ambientSoundVolume:
              type: number
              nullable: true
            boostedKeywords:
              type: array
              items:
                type: string
              nullable: true
            enableTranscriptionFormatting:
              type: boolean
              nullable: true
            optOutSensitiveDataStorage:
              type: boolean
              nullable: true
            pronunciationDictionary:
              type: array
              items:
                type: object
                properties:
                  word:
                    type: string
                    nullable: false
                  alphabet:
                    type: string
                    enum:
                      - ipa
                      - cmu
                    nullable: false
                  phoneme:
                    type: string
                    nullable: false
                required:
                  - word
                  - alphabet
                  - phoneme
              nullable: true
            normalizeForSpeech:
              type: boolean
              nullable: true
            endCallAfterSilenceMs:
              type: number
              nullable: true
            maxCallDurationMs:
              type: number
              nullable: true
            enableVoicemailDetection:
              type: boolean
              nullable: true
            voicemailMessage:
              type: string
              nullable: true
            voicemailDetectionTimeoutMs:
              type: number
              nullable: true
            voiceEmotionEnabled:
              type: boolean
              nullable: true
            beginMessageDelayMs:
              type: number
              nullable: true
            ringDurationMs:
              type: number
              nullable: true
            audioEncoding:
              type: string
              nullable: true
            sampleRate:
              type: number
              nullable: true
            reduceSilence:
              type: boolean
              nullable: true
            fillerAudioEnabled:
              type: boolean
              nullable: true
            enableBackchannel:
              type: boolean
              nullable: true
            backchannelFrequency:
              type: number
              nullable: true
            backchannelWords:
              type: array
              items:
                type: string
              nullable: true
            piiConfig:
              type: object
              properties:
                mode:
                  type: string
                  enum:
                    - 'off'
                    - streaming
                    - post_call
                  nullable: false
                categories:
                  type: array
                  items:
                    type: string
              required:
                - mode
              nullable: true
            engineVersion:
              type: string
              nullable: true
            includeReason:
              type: boolean
              nullable: true
            voiceInfra:
              type: string
              enum:
                - v1
                - v2
              nullable: true
            filters:
              type: string
              nullable: true
        enableVoiceSentiment:
          type: boolean
        engineModel:
          type: string
          nullable: true
        extractions:
          type: object
          additionalProperties:
            type: object
            properties:
              type:
                type: string
                enum:
                  - string
                  - number
                  - boolean
                nullable: false
              description:
                type: string
                nullable: false
              required:
                type: boolean
            required:
              - type
              - description
        customWebhooks:
          type: array
          items:
            type: object
            properties:
              url:
                type: string
                nullable: false
            required:
              - url
        successCriteria:
          type: array
          items:
            type: object
            properties:
              title:
                type: string
                nullable: false
              description:
                type: string
              items:
                type: array
                items:
                  type: object
                  properties:
                    title:
                      type: string
                      nullable: false
                    description:
                      type: string
                      nullable: false
                    type:
                      type: string
                      enum:
                        - BINARY
                        - SCORE
                      nullable: false
                    threshold:
                      type: number
                      nullable: false
                  required:
                    - title
                    - description
                    - type
                    - threshold
                nullable: false
            required:
              - title
              - items
    VoiceDeployment:
      type: object
      properties:
        id:
          type: string
          nullable: false
        phoneNumber:
          type: string
          nullable: true
        voiceProvider:
          type: string
          nullable: true
        voiceId:
          type: string
          nullable: true
        enableVoiceSentiment:
          type: boolean
          nullable: false
        agentId:
          type: string
          nullable: true
        externalConfig:
          type: object
          nullable: true
        backupPhoneNumber:
          type: string
          nullable: true
        backupPhoneMessage:
          type: string
          nullable: true
        twilmlBinSid:
          type: string
          nullable: true
        allowedCountries:
          type: string
          nullable: false
      required:
        - id
        - enableVoiceSentiment
        - allowedCountries
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key authentication

````