---
title: "Play audio in the call."
method: POST
path: "/calling/serverCalls/{serverCallId}/:playAudio"
tags: ["ServerCall"]
---

# Play audio in the call.

`POST /calling/serverCalls/{serverCallId}/:playAudio`

Play audio in the call.

## Path parameters

- `serverCallId` string, required

## Query parameters

- `api-version` string, required

## Request body

- PlayAudioRequest — The request payload for playing audio.
  - `audioFileUri` string — The media resource uri of the play audio request. Currently only Wave file (.wav) format audio prompts are supported. More specifically, the audio content in the wave file must be mono (single-channel), 16-bit samples with a 16,000 (16KHz) sampling rate.
  - `loop` boolean — The flag indicating whether audio file needs to be played in loop or not.
  - `operationContext` string — The value to identify context of the operation.
  - `audioFileId` string — An id for the media in the AudioFileUri, using which we cache the media resource.
  - `callbackUri` string — The callback Uri to receive PlayAudio status notifications.

## Response `202`

Returns the play audio response.

- PlayAudioResult — The response payload for play audio operation.
  - `operationId` string — The operation id.
  - `status` 'notStarted' | 'running' | 'completed' | 'failed', required — The status of the operation
  - `operationContext` string — The operation context provided by client.
  - `resultInfo` ResultInfo — Result info class to be used to report result status for actions/operations.
    - `code` integer, required — The result code associated with the operation.
    - `subcode` integer, required — The subcode that further classifies the result.
    - `message` string — The message is a detail explanation of subcode.

## Other responses

- `400` — BadRequest
- `401` — Unauthorized
- `403` — Forbidden
- `404` — NotFound
- `500` — InternalServerError

---

[API](https://skmtc.dev/azure/apis/communication-callingserver.md) · [All operations](https://skmtc.dev/azure/apis/communication-callingserver/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/azure/communication-callingserver/revisions/85ed6f36b472/schema)
