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

# Upload Hold Music

> Upload an MP3 or WAV file played to callers on hold during warm transfer

## Path Parameters

<ParamField path="agentId" type="string" required>
  The unique identifier of the agent (UUID format)
</ParamField>

## Request Body

Send the file as `multipart/form-data`.

<ParamField body="file" type="file" required>
  MP3 or WAV audio file, maximum 4 MB. The file content is validated — a mislabeled file is rejected.
</ParamField>

On success the file is stored and its public URL is saved to the agent's `warm_transfer_moh_url`. Uploading again replaces the previous file.

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.telzino.com/v1/agents/123e4567-e89b-12d3-a456-426614174000/moh \
    -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
    -F "file=@hold-music.mp3"
  ```

  ```python Python theme={null}
  import requests

  agent_id = '123e4567-e89b-12d3-a456-426614174000'
  with open('hold-music.mp3', 'rb') as f:
      res = requests.post(
          f'https://api.telzino.com/v1/agents/{agent_id}/moh',
          headers={'Authorization': 'Bearer YOUR_ACCESS_TOKEN'},
          files={'file': ('hold-music.mp3', f, 'audio/mpeg')},
      )
  print(res.json())
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  { "data": { "url": "https://telimatic-audio-samples-use1.s3.us-east-1.amazonaws.com/moh/123e4567-e89b-12d3-a456-426614174000/hold-music.mp3" } }
  ```

  ```json 400 theme={null}
  { "error": "File must be under 4 MB" }
  ```
</ResponseExample>
