> ## 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.

# Set the project's active voice

> Set the project's primary voice. The voice must already exist in the project's voice library. This replaces the agent's default voice; for multi-voice rotations, use the deployed voices endpoints instead.



## OpenAPI

````yaml PUT /v1/agents/{agentId}/voice
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}/voice:
    parameters:
      - name: agentId
        in: path
        required: true
        schema:
          type: string
    put:
      tags:
        - Voices
      summary: Set the project's active voice
      description: >-
        Set the project's primary voice. The voice must already exist in the
        project's voice library. This replaces the agent's default voice; for
        multi-voice rotations, use the deployed voices endpoints instead.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateProjectVoiceBody'
      responses:
        '200':
          description: Updated project voice
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectVoiceResponse'
        '400':
          description: Validation error
        '401':
          description: Unauthorized – missing or invalid API key
        '403':
          description: Forbidden – insufficient permissions
        '404':
          description: Resource not found
components:
  schemas:
    UpdateProjectVoiceBody:
      description: Set the project's primary voice.
      type: object
      properties:
        voiceId:
          description: Voice ID to set as the project's active voice
          type: string
      required:
        - voiceId
      additionalProperties: false
      title: UpdateProjectVoiceBody
    ProjectVoiceResponse:
      description: Confirmation of the newly set project voice.
      type: object
      properties:
        voiceId:
          description: The voice ID now set as the project's active voice
          type: string
      required:
        - voiceId
      additionalProperties: false
      title: ProjectVoiceResponse
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````