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

# Update Scenario Condition Audio

> Replace this clip's audio. Every action referencing it plays the new recording. Pass `name` to rename the clip at the same time — its `<audio>` tags are repointed for you, and the response carries `previous_audio_id` and the rewritten `actions`. The clip is transcoded and re-transcribed, so runs are blocked again until that finishes.



## OpenAPI

````yaml put /test_framework/v1/scenarios/{id}/condition-audio/{audio_id}/
openapi: 3.1.0
info:
  title: Cekura API
  version: v1
  description: >-
    Complete API documentation for the Cekura platform. This API provides
    endpoints for testing, observing, and evaluating AI voice agents — including
    managing agents, running evaluators, defining metrics, and analyzing call
    quality.
servers:
  - url: https://api.cekura.ai
security: []
paths:
  /test_framework/v1/scenarios/{id}/condition-audio/{audio_id}/:
    put:
      tags:
        - test_framework
      summary: Replace an audio clip's recording
      description: >-
        Replace this clip's audio. Every action referencing it plays the new
        recording. Pass `name` to rename the clip at the same time — its
        `<audio>` tags are repointed for you, and the response carries
        `previous_audio_id` and the rewritten `actions`. The clip is transcoded
        and re-transcribed, so runs are blocked again until that finishes. Send
        the file as `multipart/form-data`, or as `application/json` with
        `file_name` and base64 `content_base64`.
      operationId: scenarios-condition-audio-replace_2
      parameters:
        - in: path
          name: id
          schema:
            type: integer
          description: A unique integer value identifying this scenario.
          required: true
        - in: path
          name: audio_id
          schema:
            type: string
          required: true
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                name:
                  type: string
              required:
                - file
          application/json:
            schema:
              type: object
              properties:
                file_name:
                  type: string
                  description: >-
                    Filename including its extension: wav, mp3, m4a, ogg, webm
                    or flac.
                content_base64:
                  type: string
                  contentEncoding: base64
                  description: >-
                    Base64-encoded audio, max 25 MB decoded. Accepts a raw
                    base64 string or a `data:<mime>;base64,...` data URI.
                name:
                  type: string
              required:
                - file_name
                - content_base64
      responses:
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConditionAudioEntry'
          description: ''
        '400':
          content:
            application/json:
              schema:
                type: object
                properties:
                  field_name:
                    type: array
                    items:
                      type: string
          description: ''
        '404':
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
          description: ''
        '409':
          content:
            application/json:
              schema:
                type: object
                properties:
                  field_name:
                    type: array
                    items:
                      type: string
          description: ''
      security:
        - api_key: []
        - oauth2: []
        - supabase_session: []
components:
  schemas:
    ConditionAudioEntry:
      type: object
      description: |-
        Read serializer for one Scenario.condition_audio entry (a plain dict).

        The caller passes each entry dict with `audio_id` injected; fields are
        tolerant of missing keys. `previous_action` is intentionally not exposed
        (internal undo state for a clip that replaced a whole action).
      properties:
        audio_id:
          type:
            - string
            - 'null'
        action:
          type:
            - string
            - 'null'
        condition_id:
          type: string
          readOnly: true
          description: >-
            First condition referencing this clip, or null when no action
            references it. Kept for compatibility - prefer condition_ids.
        condition_ids:
          type: array
          items:
            type: integer
          description: >-
            Every condition referencing this clip, in authored order. Empty when
            the clip is uploaded but not referenced by any action yet.
        steps:
          type: string
          readOnly: true
          description: >-
            Every step referencing this clip, as paths into the conditional
            actions (e.g. `first_message`, `conditions[1].then[0]`).
        tag:
          type: string
          readOnly: true
          description: The reference to paste into an action, e.g. <audio id="greeting"/>
        status:
          type:
            - string
            - 'null'
        transcript:
          type:
            - string
            - 'null'
        words:
          type: array
          items:
            $ref: '#/components/schemas/ConditionAudioWord'
          description: >-
            The transcript's words with the time each is spoken in the clip.
            Absent until the clip has been transcribed.
        duration:
          type:
            - number
            - 'null'
          format: double
        filename:
          type:
            - string
            - 'null'
        timing_source:
          type:
            - string
            - 'null'
          description: >-
            Where the word timings came from: `deepgram` (measured),
            `interpolated` (spread evenly), or `manual` (sent with a transcript
            edit).
        error:
          type:
            - string
            - 'null'
        updated_at:
          type:
            - string
            - 'null'
        playback_url:
          type: string
          readOnly: true
          description: S3 URL of the recorded audio clip
    ConditionAudioWord:
      type: object
      description: One timed word of a clip.
      properties:
        word:
          type: string
          maxLength: 100
        start:
          type: number
          format: double
          minimum: 0
          description: Seconds from the start of the clip.
        end:
          type: number
          format: double
          minimum: 0
          description: Seconds from the start of the clip.
      required:
        - end
        - start
        - word
  securitySchemes:
    api_key:
      type: apiKey
      in: header
      name: X-CEKURA-API-KEY
      description: >-
        API Key Authentication. It should be included in the header of each
        request.
    oauth2:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: OAuth access token issued by Cekura for connected apps.
    supabase_session:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Cekura dashboard session token. Not a customer API credential.

````

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