---
title: "Upload IVR Prompt or Account Hold Music"
method: POST
path: "/v2/partition/{partitionId}/account/{accountId}/media_2"
tags: ["Media"]
---

# Upload IVR Prompt or Account Hold Music

`POST /v2/partition/{partitionId}/account/{accountId}/media_2`

## Request

- Base URL: `https://api.alianza.com`
- URL: `https://api.alianza.com/v2/partition/{partitionId}/account/{accountId}/media_2`
- Auth: API key in header `X-AUTH-TOKEN`
- TypeScript: <https://skmtc.dev/alianza/apis/alianza-public-api/docs/v2/partition/:partitionId/account/:accountId/media_2/post.ts> (a function with typed inputs; its response is checked against the schema)

This endpoint has two fairly distinct modes of operation.<br/> 1. IVR Prompts: requires a wav file and returns a Media object.<br/> 2. Hold Music: requires a jobUploadKey and returns a Job object.<span hidden><br/><br/> Please see <a href="media.html">here</a> for more information on how this endpoint is used for each case.</span>

## Path parameters

- `accountId` string, required
- `partitionId` string, required

## Query parameters

- `jobUploadKey` string

## Request body `multipart/form-data`

- object
  - `file` string, binary: Bytes of wave File to upload.

## Response `200`

This response type pertains when the endpoint is used for IVR prompt, and is supplied a file in the body.  The provided audio file has been processed and uploaded.

- MediaX
  - `id` string
  - `url` string

## Other responses

- `202`: This response type pertains when the endpoint is used for hold music, and is provided a jobUploadKey. The key has been accepted and the asynchronous job has started
- `400`: File body not supplied
- `401`: Unauthorized
- `404`: Path error, probably bad partitionId or accountId

---

[API](https://skmtc.dev/alianza/apis/alianza-public-api.md) - [All operations](https://skmtc.dev/alianza/apis/alianza-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/alianza/apis/alianza-public-api/revisions/cb514a0728ed?raw)
