***

title: play
slug: /reference/typescript/rest/calling/play
description: Play audio or text-to-speech on an active call via REST.
max-toc-depth: 3
---------------------

For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

[play-pause]: /docs/server-sdks/reference/typescript/rest/calling/play-pause

[play-resume]: /docs/server-sdks/reference/typescript/rest/calling/play-resume

[play-stop]: /docs/server-sdks/reference/typescript/rest/calling/play-stop

[play-volume]: /docs/server-sdks/reference/typescript/rest/calling/play-volume

Play audio or text-to-speech on an active call. Returns a `control_id` that can be
used with [`playPause()`][play-pause],
[`playResume()`][play-resume],
[`playStop()`][play-stop], and
[`playVolume()`][play-volume] to manage
the playback.

<EndpointSchemaSnippet endpoint="POST /api/calling/calls" />

## **Response Example**

<EndpointResponseSnippet endpoint="POST /api/calling/calls" />

## **Examples**

### Play TTS

```typescript {10}
import { RestClient } from "@signalwire/sdk";

const client = new RestClient({
  project: "your-project-id",
  token: "your-api-token",
  host: "your-space.signalwire.com"
});

// Play TTS
const result = await client.calling.play("call-id-xxx", {
  play: [{ type: "tts", text: "Hello from the REST API!" }]
});
const controlId = result.control_id;
```

### Play Audio File

```typescript {9}
import { RestClient } from "@signalwire/sdk";

const client = new RestClient({
  project: "your-project-id",
  token: "your-api-token",
  host: "your-space.signalwire.com"
});

await client.calling.play("call-id-xxx", {
  play: [{ type: "audio", url: "https://example.com/greeting.mp3" }]
});
```

### Play Multiple Items

```typescript {9}
import { RestClient } from "@signalwire/sdk";

const client = new RestClient({
  project: "your-project-id",
  token: "your-api-token",
  host: "your-space.signalwire.com"
});

await client.calling.play("call-id-xxx", {
  play: [
    { type: "tts", text: "Please hold while we connect you." },
    { type: "silence", duration: 1 },
    { type: "audio", url: "https://example.com/hold-music.mp3" },
  ]
});
```