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

# Create an ambient audio upload URL

> Prepare a custom background-audio upload for an agent.

Requires Editor, Admin, or Owner. Send the numeric `workflow_id`, filename, MIME type, and file size (maximum 10,485,760 bytes). The response includes an upload URL valid for 30 minutes, `storage_key`, and `storage_backend`.

Upload the file bytes with **PUT** to the signed URL using the declared content type. Do not send your Agent Builder credential to the upload host. Uploading alone does not activate the audio. A missing agent returns `404`.

Retrieve the current agent, preserve its other settings, and use [Update agent](https://docs.agents.labs.bandwidth.com/api-reference/agents/update.md) to set `workflow_configurations.ambient_noise_configuration`. The following fragment shows the fields to merge; replace the key and backend with the upload response values.

```json theme={null}
{
  "ambient_noise_configuration": {
    "enabled": true,
    "volume": 0.3,
    "storage_key": "REPLACE_WITH_UPLOAD_STORAGE_KEY",
    "storage_backend": "REPLACE_WITH_UPLOAD_STORAGE_BACKEND",
    "original_filename": "office.wav"
  }
}
```

Keep unrelated agent configuration intact, test the draft, and [publish](https://docs.agents.labs.bandwidth.com/api-reference/agents/publish.md) when ready. `original_filename` is optional.


## OpenAPI

````yaml POST /api/v1/workflow/ambient-noise/upload-url
openapi: 3.1.0
info:
  title: Bandwidth Agent Builder API
  version: v1
  description: >-
    Manage agents, place calls, and retrieve conversation results in your
    workspace.
servers:
  - url: https://agents.labs.bandwidth.com
    description: Workspace API
security: []
paths:
  /api/v1/workflow/ambient-noise/upload-url:
    post:
      tags:
        - audio
      summary: Create an ambient audio upload URL
      description: >-
        **Authorization:** Requires an Editor, Admin, or Owner role in the
        requested workspace.


        Prepare a custom background-audio upload for an agent.
      operationId: >-
        get_ambient_noise_upload_url_api_v1_workflow_ambient_noise_upload_url_post
      parameters:
        - description: >-
            Required with X-BW-LABS-AGENTS-API-KEY: the positive local workspace
            ID to access. The key owner must be a current member. Missing or
            invalid IDs return 400; non-member workspaces return 403. Not
            required for bearer authentication, which uses the user's selected
            workspace.
          in: header
          name: X-VOAI-ORGANIZATION-ID
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Required with X-BW-LABS-AGENTS-API-KEY: the positive local
              workspace ID to access. The key owner must be a current member.
              Missing or invalid IDs return 400; non-member workspaces return
              403. Not required for bearer authentication, which uses the user's
              selected workspace.
            title: X-Voai-Organization-Id
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AmbientNoiseUploadRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AmbientNoiseUploadResponse'
          description: Successful Response
        '400':
          description: Invalid request or missing/invalid workspace header with an API key.
        '401':
          description: Missing, invalid, or expired credential.
        '403':
          description: >-
            The account lacks access to the workspace, resource, or required
            role.
        '404':
          description: Not found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - LabsAuth: []
        - LabsApiKey: []
components:
  schemas:
    AmbientNoiseUploadRequest:
      properties:
        file_size:
          exclusiveMinimum: 0
          maximum: 10485760
          title: File Size
          type: integer
        filename:
          title: Filename
          type: string
        mime_type:
          default: audio/wav
          title: Mime Type
          type: string
        workflow_id:
          title: Workflow Id
          type: integer
      required:
        - workflow_id
        - filename
        - file_size
      title: AmbientNoiseUploadRequest
      type: object
    AmbientNoiseUploadResponse:
      properties:
        storage_backend:
          title: Storage Backend
          type: string
        storage_key:
          title: Storage Key
          type: string
        upload_url:
          title: Upload Url
          type: string
      required:
        - upload_url
        - storage_key
        - storage_backend
      title: AmbientNoiseUploadResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    LabsAuth:
      description: >-
        Bandwidth Labs OAuth access token. Uses the user's selected workspace;
        the workspace header is not required. Do not also send an API key.
        Bearer-only operations may additionally require the Labs `super_user`
        role.
      scheme: bearer
      type: http
    LabsApiKey:
      description: >-
        Bandwidth Labs API key. Also send `X-VOAI-ORGANIZATION-ID` with a
        positive local workspace ID belonging to the key owner. Access follows
        the owner's current workspace role. Do not also send a bearer token. API
        keys cannot access bearer-only or Labs `super_user` operations.
      in: header
      name: X-BW-LABS-AGENTS-API-KEY
      type: apiKey

````

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