---
title: "Plays audio to participants in the call."
method: POST
path: "/calling/callConnections/{callConnectionId}:play"
tags: ["MidConnections"]
---

# Plays audio to participants in the call.

`POST /calling/callConnections/{callConnectionId}:play`

## Request

- Base URL: `https://contoso.communication.azure.com`
- URL: `https://contoso.communication.azure.com/calling/callConnections/{callConnectionId}:play`
- Auth: API key in header `Authorization`

Plays audio to participants in the call.

## Path parameters

- `callConnectionId` string, required

## Query parameters

- `api-version` string, required

## Request body

- PlayRequest
  - `playSources` PlaySource[], required: The source of the audio to be played.
    - `kind` 'file' | 'text' | 'ssml', required: Defines the types of play source
    - `playSourceCacheId` string: Defines the identifier to be used for caching related media
    - `file` FileSource
      - `uri` string, required: Uri for the audio file to be played
    - `text` TextSource
      - `text` string, required: Text for the cognitive service to be played
      - `sourceLocale` string: Source language locale to be played Refer to available locales here: <seealso href="https://learn.microsoft.com/en-us/azure/cognitive-services/speech-service/language-support?tabs=stt-tts" />
      - `voiceKind` 'male' | 'female': Audio kind type
      - `voiceName` string: Voice name to be played Refer to available Text-to-speech voices here: <seealso href="https://learn.microsoft.com/en-us/azure/cognitive-services/speech-service/language-support?tabs=stt-tts" />
      - `customVoiceEndpointId` string: Endpoint where the custom voice was deployed.
    - `ssml` SsmlSource
      - `ssmlText` string, required: Ssml string for the cognitive service to be played
      - `customVoiceEndpointId` string: Endpoint where the custom voice was deployed.
  - `playTo` CommunicationIdentifierModel[]: The list of call participants play provided audio to. Plays to everyone in the call when not provided.
    - `kind` 'unknown' | 'communicationUser' | 'phoneNumber' | 'microsoftTeamsUser' | 'microsoftTeamsApp' | 'teamsExtensionUser': The identifier kind, for example 'communicationUser' or 'phoneNumber'.
    - `rawId` string: Raw Id of the identifier. Optional in requests, required in responses.
    - `communicationUser` CommunicationUserIdentifierModel2: A user that got created with an Azure Communication Services resource.
      - `id` string, required: The Id of the communication user.
    - `phoneNumber` PhoneNumberIdentifierModel2: A phone number.
      - `value` string, required: The phone number, usually in E.164 format.
      - `isAnonymous` boolean: True if the phone number is anonymous. By default false if missing. If the phone number is anonymous, the value will be the string 'anonymous'.
      - `assertedId` string: The asserted Id of the phone number. An asserted Id gets generated when the same phone number joins the same call more than once.
    - `microsoftTeamsUser` MicrosoftTeamsUserIdentifierModel2: A Microsoft Teams user.
      - `userId` string, required: The Id of the Microsoft Teams user. If not anonymous, this is the Entra ID object Id of the user.
      - `isAnonymous` boolean: True if the Microsoft Teams user is anonymous. By default false if missing.
      - `cloud` 'public' | 'dod' | 'gcch': The cloud that the identifier belongs to.
    - `microsoftTeamsApp` MicrosoftTeamsAppIdentifierModel2: A Microsoft Teams application.
      - `appId` string, required: The Id of the Microsoft Teams application.
      - `cloud` 'public' | 'dod' | 'gcch': The cloud that the identifier belongs to.
    - `teamsExtensionUser` TeamsExtensionUserIdentifierModel2: A Microsoft Teams Phone user who is using a Communication Services resource to extend their Teams Phone set up.
      - `userId` string, required: The Id of the Microsoft Teams Extension user, i.e. the Entra ID object Id of the user.
      - `tenantId` string, required: The tenant Id of the Microsoft Teams Extension user.
      - `resourceId` string, required: The Communication Services resource Id.
      - `cloud` 'public' | 'dod' | 'gcch': The cloud that the identifier belongs to.
  - `interruptCallMediaOperation` boolean: If set play can barge into other existing queued-up/currently-processing requests.
  - `playOptions` PlayOptions
    - `loop` boolean, required: The option to play the provided audio source in loop when set to true
  - `operationContext` string: The value to identify context of the operation.
  - `operationCallbackUri` string: Set a callback URI that overrides the default callback URI set by CreateCall/AnswerCall for this operation. This setup is per-action. If this is not set, the default callback URI set by CreateCall/AnswerCall will be used.

## Response `202`

The service has accepted the play request and will begin processing it. You will receive either PlayCompleted or PlayFailed event at your specified callback URI to update you on the status of the request.

## Other responses

- `default`: Error

## Changes

- **2026-07-13** (2022-04-07-preview) `d4d02a642780`: 1 info
  - api operation id `Content_Play` removed and replaced with `CallMedia_Play`

[Operation history](https://skmtc.dev/azure/apis/communication-callautomation/changes/calling/callConnections/:callConnectionId:play/post.md)

---

[API](https://skmtc.dev/azure/apis/communication-callautomation.md) - [All operations](https://skmtc.dev/azure/apis/communication-callautomation/llms.txt) - [OpenAPI document](https://skmtc.dev/azure/apis/communication-callautomation/revisions/956a07c67cf4?raw)
