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

# Update persona

> Update specific fields of an existing persona configuration. All fields are optional.



## OpenAPI

````yaml /api-reference/v1/personas-v1.yaml patch /personas/{persona_id}
openapi: 3.0.3
info:
  title: Coval Personas API
  version: 1.0.0
  description: |
    Manage simulated personas used in voice and text evaluations.
  contact:
    name: Coval API Support
    url: https://coval.dev
    email: support@coval.dev
servers:
  - url: https://api.coval.dev/v1
    description: Production server
security:
  - ApiKeyAuth: []
tags:
  - name: Personas
    description: Persona CRUD operations
paths:
  /personas/{persona_id}:
    parameters:
      - $ref: '#/components/parameters/WorkspaceId'
    patch:
      tags:
        - Personas
      summary: Update persona
      description: >-
        Update specific fields of an existing persona configuration. All fields
        are optional.
      operationId: updatePersona
      parameters:
        - name: persona_id
          in: path
          description: Persona resource ID
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdatePersonaRequest'
            examples:
              partial:
                $ref: '#/components/examples/UpdateVoiceSettings'
      responses:
        '200':
          description: Persona updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdatePersonaResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  parameters:
    WorkspaceId:
      name: X-Coval-Workspace-Id
      in: header
      required: false
      schema:
        type: string
        minLength: 1
        maxLength: 26
      description: >-
        Workspace that scopes this operation. When omitted, the organization's
        active default workspace is used when one can be resolved.
  schemas:
    UpdatePersonaRequest:
      type: object
      description: >-
        All fields are optional. Omitted fields are unchanged. Null behavior is
        documented per field.
      properties:
        silent_mode:
          type: boolean
          nullable: true
          description: >-
            Keep the persona silent for the whole simulation. Null clears the
            override.
        multi_phone_config:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/MultiPhoneConfig'
          description: >-
            Caller number selection from GET /v1/personas/phone-numbers. Omit to
            let the simulation select a random available number. Null clears it.
        initialization_parameters:
          type: object
          nullable: true
          additionalProperties: true
          description: >-
            Persona-level initialization parameters. Null clears; an empty
            object replaces existing parameters. String values substitute into
            the initialization payload as JSON-escaped text (quote the
            "{{persona.key}}" placeholder); all other JSON values substitute as
            their JSON encoding.
        custom_persona_data:
          type: string
          nullable: true
          maxLength: 16383
          description: >-
            Additional serialized JSON object sent as the chat request's
            customPersonaData, overriding the agent-level customPersonaData.
            Included only when the HTTP text agent does not configure
            input_template; a template-configured agent shapes its own request
            and does not receive it. Must parse as a JSON object and stay under
            16 KiB. Null clears it.
        voice:
          type: string
          nullable: true
          enum:
            - alloy
            - ash
            - ballad
            - coral
            - echo
            - marin
            - sage
            - shimmer
            - verse
          description: >-
            Agent voice override for OpenAI Realtime endpoint simulations. Null
            clears it.
        custom_voice_id:
          type: string
          nullable: true
          minLength: 1
          description: >-
            Server-issued custom voice reference belonging to this organization.
            Null selects the built-in voice again.
        name:
          type: string
          nullable: true
          minLength: 1
          maxLength: 200
          description: >-
            Human-readable persona name. Null is ignored; omit the field to
            leave it unchanged.
        persona_prompt:
          type: string
          nullable: true
          description: >-
            Optional instructions for persona behavior. Send null or an empty
            string to clear; omit the field to leave it unchanged.
        voice_name:
          type: string
          nullable: true
          description: >
            Coval voice name. Use GET /personas/voices to discover available

            voices and their supported language codes. Null is ignored; omit the
            field to leave it unchanged.
        language_code:
          type: string
          nullable: true
          description: >
            BCP-47 language code for voice synthesis. Must be supported by

            the selected voice. Use GET /personas/voices to discover valid

            voice and language combinations. Null is ignored; omit the field to
            leave it unchanged.
        background_sound:
          type: string
          nullable: true
          maxLength: 100
          description: >-
            Built-in background sound id, or custom:<background_sound_id> for an
            active custom sound returned by GET /personas/background-sounds.
            Send null to clear an existing background sound.
          pattern: >-
            ^(off|office|lounge|crowd|airport|bus|playground|doorbell|train-arrival|portable-air-conditioner|skatepark|small-dog-bark|cafe|ferry-and-announcement|heavy-rain|moderate-wind|newborn-baby-crying|office-with-alarm|street-with-sirens|construction-work|backchanneling|custom:[A-Za-z0-9_-]+)$
        background_sound_volume:
          type: number
          format: float
          nullable: true
          minimum: 0
          description: >-
            Volume level for background sound (>= 0.0, no upper limit). Send
            null to clear an existing configured volume.
          example: 0.3
        voice_volume:
          type: number
          format: float
          nullable: true
          minimum: 0
          maximum: 2
          description: >-
            Voice gain multiplier. Send null to clear an existing configured
            volume.
          example: 1.25
        voice_speed:
          type: number
          format: float
          nullable: true
          minimum: 0.25
          maximum: 2
          description: >-
            Voice speed multiplier accepted and stored from 0.25 to 2.0. Send
            null to clear an existing configured speed. The selected voice may
            enforce a narrower effective range or ignore speed changes.
          example: 0.85
        wait_seconds:
          type: number
          format: float
          nullable: true
          minimum: 0.1
          maximum: 2
          description: >-
            Response delay in seconds. Send null to clear an existing configured
            delay.
        conversation_initiation:
          type: string
          nullable: true
          description: >-
            Who initiates the conversation. Send null to clear an existing
            selection.
          enum:
            - speak_first
            - wait_for_user
        interruption_rate:
          type: string
          nullable: true
          description: >
            How often the persona interrupts the agent. While the agent is
            speaking, the persona

            forces a new turn once about 90 seconds (LOW), 45 seconds (MEDIUM),
            or 30 seconds

            (HIGH) have passed since the call started or since its last
            interruption. NONE never

            interrupts. This is a timer, not a semantic barge-in. null is
            ignored; send NONE to

            disable.
          enum:
            - NONE
            - LOW
            - MEDIUM
            - HIGH
        interruption_instructions_enabled:
          type: boolean
          nullable: true
          description: >
            Whether the persona follows interruption instructions in the test
            case or the

            persona prompt, interrupting the agent mid-utterance when one is
            met. Takes effect

            only for organizations with prompted interruptions enabled. Defaults
            to false. null

            is ignored; send false to disable.
        multi_language_stt:
          type: boolean
          nullable: true
          description: >-
            Enable multilingual speech-to-text so callers speaking languages
            other than the primary language_code are still transcribed
            accurately. Send null to clear an existing override.
          example: true
        hold_music_timeout_seconds:
          type: number
          format: float
          nullable: true
          minimum: 5
          maximum: 300
          description: >-
            Disconnect after this many seconds of no speech (5-300). Send null
            to clear an existing timeout.
        situate_speaker:
          type: string
          nullable: true
          description: >
            Persona placement preset. Send null to clear an existing preset.

            - speakerphone-easy: User speaking from a distance from the
            microphone

            - speakerphone-hard: User speaking from a distance from the
            microphone in an acoustically challenging environment.
          enum:
            - speakerphone-easy
            - speakerphone-hard
        audio_degradation:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/AudioDegradationConfig'
          description: |
            Channel degradation preset. Send null to
            clear an existing audio_degradation preset.
        tags:
          type: array
          nullable: true
          description: >-
            Tags to associate with this persona. Null or omitted leaves tags
            unchanged. Pass [] to clear all tags.
          maxItems: 20
          items:
            type: string
            maxLength: 200
            pattern: \S
          example:
            - voice
    UpdatePersonaResponse:
      type: object
      required:
        - persona
      properties:
        persona:
          $ref: '#/components/schemas/PersonaResource'
    MultiPhoneConfig:
      type: object
      description: >
        Caller phone-number selection for simulations placed from a pool of
        organization

        phone numbers.
      additionalProperties: false
      required:
        - phone_number_index
      properties:
        phone_number_index:
          type: integer
          minimum: 1
          description: >-
            1-based index into the phone-number list returned by GET
            /v1/personas/phone-numbers.
        phone_number_name:
          type: string
          nullable: true
          description: >-
            Name of the selected phone number, as returned by GET
            /v1/personas/phone-numbers.
    AudioDegradationConfig:
      type: object
      description: >
        Channel degradation preset selection. `preset_version` pins the
        selection to a specific

        preset calibration, so that stored personas and any reference results
        captured against

        them stay tied to the tuning that produced them even if the preset is
        recalibrated later.
      required:
        - preset
      properties:
        preset:
          type: string
          description: >
            Channel degradation preset id.

            - landline: clean, narrowband landline channel.

            - cell-poor: light, intermittent burst loss typical of a weak but
            stable cellular connection.

            - cell-handoff: heavier, more frequent burst loss as during a tower
            handoff.
          enum:
            - landline
            - cell-poor
            - cell-handoff
          example: cell-poor
        preset_version:
          type: integer
          description: >
            Calibration version of the preset. When omitted, the server uses the
            selected

            preset's current catalog version and stores that concrete version on
            the persona.
          example: 1
          nullable: true
    PersonaResource:
      type: object
      description: Persona resource representation returned by API responses.
      required:
        - resource_name
        - id
        - name
        - create_time
        - created_at
        - created_by
        - updated_at
        - updated_by
      properties:
        created_at:
          type: string
          nullable: true
          readOnly: true
          format: date-time
          description: Authoring timestamp; null when unknown.
        created_by:
          type: string
          nullable: true
          readOnly: true
          description: Canonical author user ID; null when unknown.
        updated_at:
          type: string
          nullable: true
          readOnly: true
          format: date-time
          description: Authoring timestamp; null when unknown.
        updated_by:
          type: string
          nullable: true
          readOnly: true
          description: Canonical author user ID; null when unknown.
        silent_mode:
          type: boolean
          nullable: true
          description: >-
            Keep the persona silent for the whole simulation. Null clears the
            override.
        multi_phone_config:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/MultiPhoneConfig'
          description: >-
            Caller number selection from GET /v1/personas/phone-numbers. Omit to
            let the simulation select a random available number. Null clears it.
        initialization_parameters:
          type: object
          nullable: true
          additionalProperties: true
          description: >-
            Persona-level initialization parameters. Null clears; an empty
            object replaces existing parameters. String values substitute into
            the initialization payload as JSON-escaped text (quote the
            "{{persona.key}}" placeholder); all other JSON values substitute as
            their JSON encoding.
        custom_persona_data:
          type: string
          nullable: true
          maxLength: 16383
          description: >-
            Additional serialized JSON object sent as the chat request's
            customPersonaData, overriding the agent-level customPersonaData.
            Included only when the HTTP text agent does not configure
            input_template; a template-configured agent shapes its own request
            and does not receive it. Must parse as a JSON object and stay under
            16 KiB. Null clears it.
        voice:
          type: string
          nullable: true
          enum:
            - alloy
            - ash
            - ballad
            - coral
            - echo
            - marin
            - sage
            - shimmer
            - verse
          description: >-
            Agent voice override for OpenAI Realtime endpoint simulations. Null
            clears it.
        custom_voice_id:
          type: string
          nullable: true
          minLength: 1
          description: >-
            Server-issued custom voice reference belonging to this organization.
            Null selects the built-in voice again.
        resource_name:
          type: string
          description: Resource name in format "personas/{persona_id}"
          example: personas/3zfmuDbVQsi4GaseDtiVcS
        id:
          type: string
          description: Unique persona identifier
          example: 3zfmuDbVQsi4GaseDtiVcS
        name:
          type: string
          description: Human-readable persona name
          example: Friendly Customer
          minLength: 1
          maxLength: 200
        persona_prompt:
          type: string
          nullable: true
          description: Instructions describing persona behavior and personality
          example: You are a friendly customer calling for technical support...
        voice_name:
          type: string
          nullable: true
          description: |
            Coval voice name. Use GET /personas/voices to discover available
            voices and their supported language codes.
          example: aria
        language_code:
          type: string
          nullable: true
          description: |
            BCP-47 language code for voice synthesis. Must be supported by
            the selected voice. Use GET /personas/voices to discover valid
            voice and language combinations.
          example: en-US
        background_sound:
          type: string
          nullable: true
          description: >-
            Built-in background sound id, or custom:<background_sound_id> for an
            active custom sound returned by GET /personas/background-sounds.
          example: office
          pattern: >-
            ^(off|office|lounge|crowd|airport|bus|playground|doorbell|train-arrival|portable-air-conditioner|skatepark|small-dog-bark|cafe|ferry-and-announcement|heavy-rain|moderate-wind|newborn-baby-crying|office-with-alarm|street-with-sirens|construction-work|backchanneling|custom:[A-Za-z0-9_-]+)$
        background_sound_volume:
          type: number
          format: float
          nullable: true
          minimum: 0
          description: >-
            Volume level for background sound (>= 0.0, no upper limit). Default
            is provider-controlled when omitted.
          example: 0.3
        voice_volume:
          type: number
          format: float
          nullable: true
          minimum: 0
          maximum: 2
          description: >-
            Voice gain multiplier. 0.0 is silent, 1.0 is unchanged, and 2.0 is
            double volume.
          example: 1.25
        voice_speed:
          type: number
          format: float
          nullable: true
          minimum: 0.25
          maximum: 2
          description: >-
            Voice speed multiplier accepted and stored from 0.25 to 2.0. 1.0 is
            unchanged. The selected voice may enforce a narrower effective range
            or ignore speed changes.
          example: 0.85
        wait_seconds:
          type: number
          format: float
          nullable: true
          description: Response delay in seconds
          example: 0.5
          minimum: 0.1
          maximum: 2
        conversation_initiation:
          type: string
          nullable: true
          description: Who initiates the conversation
          example: speak_first
          enum:
            - speak_first
            - wait_for_user
        interruption_rate:
          type: string
          default: NONE
          description: >
            How often the persona interrupts the agent. While the agent is
            speaking, the persona

            forces a new turn once about 90 seconds (LOW), 45 seconds (MEDIUM),
            or 30 seconds

            (HIGH) have passed since the call started or since its last
            interruption. NONE never

            interrupts. This is a timer, not a semantic barge-in.
          enum:
            - NONE
            - LOW
            - MEDIUM
            - HIGH
          example: MEDIUM
        interruption_instructions_enabled:
          type: boolean
          default: false
          description: >
            Whether the persona follows interruption instructions in the test
            case or the

            persona prompt, interrupting the agent mid-utterance when one is
            met. Takes effect

            only for organizations with prompted interruptions enabled. Defaults
            to false.
          example: false
        multi_language_stt:
          type: boolean
          nullable: true
          description: >
            Enable multilingual speech-to-text so callers speaking languages

            other than the primary language_code are still transcribed
            accurately.

            Useful for personas simulating callers in bilingual regions or

            contact centers that serve diverse populations.
          example: true
        hold_music_timeout_seconds:
          type: number
          format: float
          nullable: true
          minimum: 5
          maximum: 300
          description: >-
            Disconnect after this many seconds of no speech (5-300). Used for
            hold music scenarios.
          example: 15
        situate_speaker:
          type: string
          nullable: true
          description: >
            Persona placement preset.

            - speakerphone-easy: User speaking from a distance from the
            microphone

            - speakerphone-hard: User speaking from a distance from the
            microphone in an acoustically challenging environment.
          enum:
            - speakerphone-easy
            - speakerphone-hard
          example: speakerphone-hard
        audio_degradation:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/AudioDegradationConfig'
          description: Channel degradation preset applied to this persona, if any.
          example:
            preset: cell-poor
            preset_version: 1
        tags:
          type: array
          description: Tags associated with this persona
          items:
            type: string
          default: []
          example:
            - voice
            - english
        create_time:
          type: string
          format: date-time
          description: Persona creation timestamp (ISO 8601)
          example: '2025-01-24T10:00:00Z'
        update_time:
          type: string
          format: date-time
          nullable: true
          description: Last update timestamp (ISO 8601)
          example: '2025-01-24T12:30:00Z'
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: Error code
              example: INVALID_ARGUMENT
            message:
              type: string
              description: Human-readable error message
              example: Invalid voice_name 'invalid'
  examples:
    UpdateVoiceSettings:
      summary: Update voice settings
      value:
        voice_name: aria
        language_code: en-US
        wait_seconds: 0.8
  responses:
    BadRequest:
      description: Invalid request parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: INVALID_ARGUMENT
              message: Invalid language_code 'en-ZZ'
    Unauthorized:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: UNAUTHENTICATED
              message: Missing or invalid API key
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: NOT_FOUND
              message: Persona abc123 not found
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: INTERNAL
              message: An unexpected error occurred
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key for authentication

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.