> ## 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 background sound

> Rename, set default volume, archive, or restore an organization-owned custom background sound.



## OpenAPI

````yaml /api-reference/v1/personas-v1.yaml patch /personas/background-sounds/{background_sound_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/background-sounds/{background_sound_id}:
    patch:
      tags:
        - Personas
      summary: Update background sound
      description: >-
        Rename, set default volume, archive, or restore an organization-owned
        custom background sound.
      operationId: updateBackgroundSound
      parameters:
        - name: background_sound_id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateBackgroundSoundRequest'
      responses:
        '200':
          description: Background sound updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateBackgroundSoundResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    UpdateBackgroundSoundRequest:
      type: object
      description: >-
        All fields are optional. Send status=archived to archive or
        status=active to restore.
      properties:
        display_name:
          type: string
          minLength: 1
          maxLength: 200
        default_volume:
          type: number
          format: float
          minimum: 0
        status:
          type: string
          enum:
            - active
            - archived
    UpdateBackgroundSoundResponse:
      type: object
      required:
        - background_sound
      properties:
        background_sound:
          $ref: '#/components/schemas/BackgroundSoundResource'
    BackgroundSoundResource:
      type: object
      required:
        - id
        - value
        - source
        - display_name
        - status
        - default_volume
      properties:
        id:
          type: string
          description: Built-in sound id or custom asset id.
          example: cafe
        value:
          type: string
          description: >-
            Value to store in persona.background_sound. Custom sounds use
            custom:<background_sound_id>.
          example: custom:3zfmuDbVQsi4GaseDtiVcS
        source:
          type: string
          enum:
            - built_in
            - custom
        display_name:
          type: string
          example: Cafe
        status:
          type: string
          enum:
            - pending_upload
            - active
            - archived
        preview_url:
          type: string
          nullable: true
          description: >-
            Short-lived URL for preview playback. Built-in previews may use
            public URLs.
        preview_url_expires_at:
          type: string
          format: date-time
          nullable: true
        default_volume:
          type: number
          format: float
          minimum: 0
          example: 0.3
        content_type:
          type: string
          nullable: true
          example: audio/mpeg
        original_filename:
          type: string
          nullable: true
          example: cafe-noise.mp3
        metadata:
          type: object
          additionalProperties: true
        created_at:
          type: string
          format: date-time
          nullable: true
        last_updated_at:
          type: string
          format: date-time
          nullable: true
    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'
  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

````