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

# Register a voice



## OpenAPI

````yaml POST /v1/accounts/{accountId}/voice-library
openapi: 3.1.0
info:
  title: PolyAI Agents API
  version: 1.0.11
  description: Manage PolyAI agents, telephony, deployments, and real-time configs.
servers:
  - url: https://api.us.poly.ai
    description: US region
  - url: https://api.eu.poly.ai
    description: EU region
  - url: https://api.uk.poly.ai
    description: UK region
  - url: https://api.studio.poly.ai
    description: Studio region
security:
  - polyApiKey: []
paths:
  /v1/accounts/{accountId}/voice-library:
    parameters:
      - name: accountId
        in: path
        required: true
        schema:
          type: string
    post:
      tags:
        - Voice Library
      summary: Register a new voice in the voice library
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateVoiceRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetVoiceResponse'
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized – missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden – insufficient permissions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                success: false
                error: Account ID does not exist.
                error_id: 550e8400-e29b-41d4-a716-446655440000
                error_code: ACCOUNT_NOT_FOUND
                error_message: Account ID does not exist.
                data: null
components:
  schemas:
    CreateVoiceRequest:
      description: Request schema for creating a new voice.
      type: object
      properties:
        name:
          description: Human-readable voice name
          type: string
        provider:
          description: TTS provider (e.g. GOOGLE, OPENAI, ELEVENLABS)
          type: string
        config:
          description: Provider-specific voice config
          type: object
        providerVoiceId:
          description: Voice ID from the TTS provider
          type: string
        voiceMetadata:
          description: Additional voice metadata
          type: object
      required:
        - name
        - provider
        - config
        - providerVoiceId
    GetVoiceResponse:
      description: Response for single voice endpoints.
      type: object
      properties:
        voice:
          $ref: '#/components/schemas/VoiceResponse'
      required:
        - voice
    Error:
      type: object
      description: Standard PolyAI API error envelope.
      required:
        - success
        - error
        - error_id
        - error_code
        - error_message
        - data
      properties:
        success:
          type: boolean
          description: Always false for error responses.
          example: false
        error:
          type: string
          description: Human-readable error message.
        error_id:
          type: string
          description: >-
            Unique request identifier from the X-PolyAI-Correlation-Id header.
            Include this when contacting support.
        error_code:
          type: string
          description: Machine-readable error code in UPPER_SNAKE_CASE.
        error_message:
          type: string
          description: Human-readable error message.
        data:
          nullable: true
          description: Always null for error responses.
    VoiceResponse:
      description: A single voice as returned by the public API.
      type: object
      properties:
        id:
          description: Unique voice identifier
          type: string
        name:
          description: Human-readable voice name
          type: string
        provider:
          description: TTS provider
          type: string
        providerVoiceId:
          description: Voice ID from the TTS provider
          type: string
        config:
          description: Provider-specific voice config
          type: object
        metadata:
          description: Additional voice metadata
          type: object
        isPolyVoice:
          description: True if this is a Poly-curated voice (vs account-owned)
          default: false
          type: boolean
      required:
        - id
        - name
        - provider
        - providerVoiceId
        - config
  securitySchemes:
    polyApiKey:
      type: apiKey
      in: header
      name: X-API-KEY

````