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

# Update a PVC voice

> Updates editable metadata on a PVC voice. Editing a `PVC_VOICE_STATE_FAILED` voice returns it to `PVC_VOICE_STATE_DRAFT` and preserves its samples, so you can fix the issue and retrain. A voice that is queued, training, or ready cannot be updated — retry after it finishes, or after re-editing brings a failed voice back to draft.

Currently, `displayName` is the only editable field. The `updateMask` query parameter is **required** and uses **snake\_case** field paths (for example: `?updateMask=display_name`) — an empty or missing mask returns `400`.

<Note>
  **Editing a failed voice.** Updating a voice in `PVC_VOICE_STATE_FAILED` returns it to `PVC_VOICE_STATE_DRAFT` and preserves its existing samples, so you can [add or remove samples](/api-reference/pvcAPI/pvcvoiceservice/upload-pvc-voice-samples) and [retrain](/api-reference/pvcAPI/pvcvoiceservice/train-pvc-voice) without re-uploading everything.
</Note>

<Warning>
  A voice that is queued, training, or ready cannot be updated — this endpoint returns `409` until the voice finishes (or, for a failed voice, until you next edit it).
</Warning>


## OpenAPI

````yaml patch /voices/v1/pvcVoices/{voiceId}
openapi: 3.0.0
info:
  title: Inworld Professional Voice Cloning API
  version: v1
  contact:
    name: Inworld AI
    url: https://inworld.ai
    email: support@inworld.ai
servers:
  - url: https://api.inworld.ai
security:
  - inworld_basic: []
tags:
  - name: PvcVoiceService
paths:
  /voices/v1/pvcVoices/{voiceId}:
    patch:
      tags:
        - PvcVoiceService
      summary: Update a PVC voice
      description: >-
        Updates editable metadata on a PVC voice. Editing a
        `PVC_VOICE_STATE_FAILED` voice returns it to `PVC_VOICE_STATE_DRAFT` and
        preserves its samples, so you can fix the issue and retrain. A voice
        that is queued, training, or ready cannot be updated — retry after it
        finishes, or after re-editing brings a failed voice back to draft.
      operationId: PvcVoiceService_UpdatePvcVoice
      parameters:
        - name: voiceId
          description: Voice ID of the PVC voice to update.
          in: path
          required: true
          schema:
            type: string
        - name: updateMask
          description: >-
            Comma-separated list of fields to update. Required — an empty or
            missing mask returns `400`. Fields present in the body but omitted
            from the mask are ignored.


            Mask paths use **snake_case** field names, even though the request
            body uses camelCase. Supported paths: `display_name`.
          in: query
          required: true
          schema:
            type: string
            example: display_name
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PvcVoiceServiceUpdatePvcVoiceBody'
            example:
              displayName: renamed-professional-voice
        required: true
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/inworldvoicev1PvcVoice'
        '400':
          description: Empty `updateMask`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rpcStatus'
              examples:
                empty_mask:
                  summary: Missing updateMask
                  value:
                    code: 3
                    message: 'invalid request: updateMask must not be empty'
                    details: []
        '409':
          description: >-
            The voice is queued, training, or ready, and cannot be edited in its
            current state.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rpcStatus'
              examples:
                frozen:
                  summary: Voice not editable in its current state
                  value:
                    code: 9
                    message: >-
                      pvc voice 'my-professional-voice' cannot be modified while
                      in state PVC_VOICE_STATE_TRAINING
                    details: []
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rpcStatus'
      x-codeSamples:
        - lang: bash
          label: cURL
          source: >-
            curl --location --request PATCH
            'https://api.inworld.ai/voices/v1/pvcVoices/<voice-id>?updateMask=display_name'
            \

            --header "Authorization: Basic $INWORLD_API_KEY" \

            --header 'Content-Type: application/json' \

            --data '{
              "displayName": "renamed-professional-voice"
            }'
        - lang: python
          label: Python
          source: >-
            import requests


            voice_id = "<voice-id>"

            url = f"https://api.inworld.ai/voices/v1/pvcVoices/{voice_id}"

            headers = {
                "Authorization": "Basic <api-key>",
                "Content-Type": "application/json"
            }

            params = {"updateMask": "display_name"}

            payload = {"displayName": "renamed-professional-voice"}


            response = requests.patch(url, headers=headers, params=params,
            json=payload)

            print(response.json())
        - lang: javascript
          label: JavaScript
          source: >-
            const voiceId = '<voice-id>';

            const url =
            `https://api.inworld.ai/voices/v1/pvcVoices/${voiceId}?updateMask=display_name`;


            const response = await fetch(url, {
              method: 'PATCH',
              headers: {
                'Authorization': 'Basic <api-key>',
                'Content-Type': 'application/json',
              },
              body: JSON.stringify({ displayName: 'renamed-professional-voice' }),
            });


            const data = await response.json();

            console.log(data);
components:
  schemas:
    PvcVoiceServiceUpdatePvcVoiceBody:
      type: object
      properties:
        displayName:
          type: string
          description: >-
            The voice's new display name. Include `display_name` (snake_case) in
            `updateMask` to apply this field.
      description: Request message for UpdatePvcVoice. `updateMask` is required.
    inworldvoicev1PvcVoice:
      type: object
      properties:
        name:
          type: string
          description: 'Resource name. Format: `workspaces/{workspace}/pvcVoices/{voice}`.'
          readOnly: true
        voiceId:
          type: string
          description: >-
            Voice ID, derived from `displayName` at creation time. Use this
            value as `{voiceId}` on every other PVC endpoint, and as the
            `voiceId` in TTS synthesis requests once the voice is
            `PVC_VOICE_STATE_READY`.
          readOnly: true
        displayName:
          type: string
          description: >-
            The human-readable name shown anywhere the voice is listed or
            selected.
        languageCode:
          type: string
          description: >-
            The voice's language as a BCP-47-shaped locale string, e.g. `en-US`.
            Immutable after creation.
        state:
          $ref: '#/components/schemas/inworldvoicev1PvcVoiceState'
        failure:
          $ref: '#/components/schemas/inworldvoicev1PvcVoiceFailure'
        incarnationId:
          type: string
          description: >-
            Identifier that stays stable across edits to the same voice, and
            changes each time it is retrained. Use it to tell two reads of the
            same `voiceId` apart across a retrain.
          readOnly: true
        samples:
          type: array
          items:
            $ref: '#/components/schemas/inworldvoicev1PvcVoiceSample'
          description: Audio samples currently attached to the voice.
          readOnly: true
        createTime:
          type: string
          format: date-time
          readOnly: true
        updateTime:
          type: string
          format: date-time
          readOnly: true
      description: A Professional Voice Clone resource.
    rpcStatus:
      type: object
      properties:
        code:
          type: integer
          format: int32
          description: >-
            The status code, which should be an enum value of
            [google.rpc.Code][google.rpc.Code].
        message:
          type: string
          description: >-
            A developer-facing error message, which should be in English. Any
            user-facing error message should be localized and sent in the
            [google.rpc.Status.details][google.rpc.Status.details] field, or
            localized by the client.
        details:
          type: array
          items:
            $ref: '#/components/schemas/protobufAny'
          description: >-
            A list of messages that carry the error details. There is a common
            set of message types for APIs to use.
      description: >-
        The `Status` type defines a logical error model that is suitable for
        different programming environments, including REST APIs and RPC APIs.
    inworldvoicev1PvcVoiceState:
      type: string
      enum:
        - PVC_VOICE_STATE_UNSPECIFIED
        - PVC_VOICE_STATE_DRAFT
        - PVC_VOICE_STATE_QUEUED
        - PVC_VOICE_STATE_TRAINING
        - PVC_VOICE_STATE_READY
        - PVC_VOICE_STATE_FAILED
      description: >-
        Lifecycle state of a PVC voice.


        - `PVC_VOICE_STATE_DRAFT`: Editable. Samples can be added, trimmed, or
        removed, and metadata can be updated.

        - `PVC_VOICE_STATE_QUEUED`: Training requested; waiting for a training
        slot.

        - `PVC_VOICE_STATE_TRAINING`: Actively training.

        - `PVC_VOICE_STATE_READY`: Training succeeded. Usable for TTS synthesis;
        permanent — cannot be deleted through this API.

        - `PVC_VOICE_STATE_FAILED`: Training failed. Editing the voice (e.g.
        renaming it, or adding/removing a sample) returns it to
        `PVC_VOICE_STATE_DRAFT` with its remaining samples intact.
    inworldvoicev1PvcVoiceFailure:
      type: object
      properties:
        reason:
          type: string
          description: >-
            Machine-readable failure code, e.g. `TRAINING_ERROR`. New values may
            be added over time, so don't validate against a hardcoded list —
            fall back to displaying `message` for codes you don't recognize.
        message:
          type: string
          description: >-
            Human-readable, scrubbed failure message. Never contains uploaded
            audio, filenames, or transcripts.
      description: Populated on a PVC voice when its `state` is `PVC_VOICE_STATE_FAILED`.
    inworldvoicev1PvcVoiceSample:
      type: object
      properties:
        sampleId:
          type: string
          description: >-
            Sample ID. Use this value as `{sampleId}` when trimming or deleting
            the sample.
          readOnly: true
        name:
          type: string
          description: >-
            Resource name. Format:
            `workspaces/{workspace}/pvcVoices/{voice}/samples/{sample}`.
          readOnly: true
        sizeBytes:
          type: integer
          format: int64
          description: Size of the uploaded file, in bytes.
          readOnly: true
        durationSecs:
          type: number
          format: float
          description: >-
            Analyzed duration of the sample, in seconds, before any trim is
            applied.
          readOnly: true
        mimeType:
          type: string
          enum:
            - audio/wav
            - audio/webm
            - audio/mpeg
          description: Detected audio format, sniffed from the file's byte content.
          readOnly: true
        hash:
          type: string
          description: >-
            Base64-encoded MD5 of the stored object, for verifying upload
            integrity against the source file.
          readOnly: true
        trimStartMs:
          type: integer
          format: int32
          nullable: true
          description: Trim start offset in milliseconds, if set.
        trimEndMs:
          type: integer
          format: int32
          nullable: true
          description: Trim end offset in milliseconds, if set.
      description: A single uploaded audio sample belonging to a PVC voice.
    protobufAny:
      type: object
      properties:
        '@type':
          type: string
          description: >-
            A URL/resource name that uniquely identifies the type of the
            serialized protocol buffer message.
      additionalProperties: {}
      description: >-
        `Any` contains an arbitrary serialized protocol buffer message along
        with a URL that describes the type of the serialized message.
  securitySchemes:
    inworld_basic:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Your [API key](../../../api-reference/introduction). Read permissions
        are required for GET endpoints. Write permissions are required for POST,
        PATCH, and DELETE endpoints.

         For Basic authentication, please populate `Basic $INWORLD_API_KEY`. You can create a key in one command with the [Inworld CLI](../../../tts/resources/inworld-cli): `inworld workspace add-key`.

````