> ## Documentation Index
> Fetch the complete documentation index at: https://polyai-mintlify-665e356f.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Create or update a deployed voice

> Add a new voice to the rotation, or update the probability of an existing deployed voice. Probabilities across all deployed voices must sum to 1.0.



## OpenAPI

````yaml PUT /v1/agents/{agentId}/deployed-voices
openapi: 3.1.0
info:
  title: PolyAI Agents API
  version: 1.0.4
  description: >-
    Build and deploy PolyAI agents programmatically. Create agents, manage
    branches, update behavior rules, configure knowledge bases, provision
    telephony, configure voices, publish deployments, and update real-time
    configs.
servers:
  - url: https://api.us.poly.ai
    description: US region
  - url: https://api.uk.poly.ai
    description: UK region
  - url: https://api.eu.poly.ai
    description: EU region
security:
  - ApiKeyAuth: []
tags:
  - name: Agents
    description: Create, list, duplicate, and delete agents.
  - name: Branches
    description: Create isolated branches for parallel development and merge back to main.
  - name: Agent Behavior
    description: >-
      Read and update an agent's behavior rules (system prompt, interaction
      style, edge cases).
  - name: Knowledge Base
    description: Manage knowledge base topics used for retrieval and tool invocation.
  - name: Variants
    description: Manage site-specific variations of an agent using attributes and variants.
  - name: Deployments
    description: Publish drafts, promote across environments, and roll back deployments.
  - name: Connectors
    description: >-
      Manage telephony connectors that bind phone numbers to voice
      infrastructure.
  - name: Phone Numbers
    description: Provision, reassign, and delete phone numbers on an agent's connectors.
  - name: Real-Time Configs
    description: Update runtime values (e.g. opening hours) outside the publish workflow.
  - name: Voices
    description: >-
      Configure agent voices: pick the active voice, run multi-voice rotations,
      tune stability and speed, and generate audio previews.
paths:
  /v1/agents/{agentId}/deployed-voices:
    parameters:
      - name: agentId
        in: path
        required: true
        schema:
          type: string
    put:
      tags:
        - Voices
      summary: Create or update a deployed voice
      description: >-
        Add a new voice to the rotation, or update the probability of an
        existing deployed voice. Probabilities across all deployed voices must
        sum to 1.0.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpsertDeployedVoiceBody'
      responses:
        '200':
          description: The created or updated deployed voice
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeployedVoiceResponse'
        '400':
          description: Validation error
        '401':
          description: Unauthorized – missing or invalid API key
        '403':
          description: Forbidden – insufficient permissions
components:
  schemas:
    UpsertDeployedVoiceBody:
      description: >-
        Create or update a deployed voice. Omit `id` to create a new deployed
        voice; provide `id` to update an existing one.
      type: object
      properties:
        voiceId:
          description: ID of the voice (from the voice library) to deploy
          type: string
        probability:
          description: >-
            Traffic weight in the rotation, between 0.0 and 1.0. The sum of
            probabilities across all deployed voices must equal 1.0.
          type: number
          format: float
          minimum: 0
          maximum: 1
        id:
          description: >-
            Deployed voice ID. Omit to create a new entry; include to update an
            existing entry.
          type: string
      required:
        - voiceId
        - probability
      additionalProperties: false
      title: UpsertDeployedVoiceBody
    DeployedVoiceResponse:
      description: A single deployed voice in a project's voice rotation.
      type: object
      properties:
        id:
          description: Deployed voice ID
          type: string
        genaiProjectId:
          description: Project ID this deployed voice belongs to
          type: string
        voiceId:
          description: ID of the underlying voice in the voice library
          type: string
        probability:
          description: Traffic weight in the rotation, between 0.0 and 1.0
          type: number
          format: float
      required:
        - id
        - genaiProjectId
        - voiceId
        - probability
      additionalProperties: false
      title: DeployedVoiceResponse
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````