> For complete lifecycle-event payload schemas and examples, use the canonical overview: Session /api/sessions; Room lifecycle, members, and room playback /api/rooms; Session playback /api/playback; Recording /api/recording; DTMF /api/keypad-input; Messages /api/messages; WebSocket Session /api/web-socket. Use /api/event-delivery for transport behavior. Endpoint pages name relevant events, but these overviews are the canonical references.

# Play audio in room

POST https://api.telekesher.dev/api/v1/rooms/{room_id}/playback/play
Content-Type: application/json

**Rate limit: Per room** · **Burst:** 8 · **Refill:** 3 req/s

Play one or more finite WAV or MP3 files in order with `type: files`, or join a hosted HTTP/HTTPS AAC source at its current live position with `type: stream`. Live streams do not support seek or loop.

The platform validates and prepares every source before admission. If it cannot prepare a source, the request returns a synchronous HTTP error and emits no playback webhook. If room playback is already active, the request returns `409`.

A `202` response confirms admission. After admission, the platform emits `room.playback.ended` when playback finishes naturally or is stopped through the API. It emits `room.playback.failed` if playback fails or times out.

See [Room lifecycle, member, and playback events](/api/rooms#lifecycle-member-and-playback-events) for complete payload schemas and examples.

Reference: https://docs.vorbal.dev/api/room-playback/play

## Authentication

- `Authorization` header (bearer token, required) — Application auth. Send `Authorization: Bearer <app_uuid>:<api_key>` using any active key in the app's collection. See [Authentication](https://voice-platform.docs.buildwithfern.com/api/authentication) for details.

## Request

### Path parameters

- `room_id` (string, required) — Case-sensitive [room](/api/rooms) identifier.

### Headers

- `Idempotency-Key` (string, optional) — Optional key for safely retrying mutating requests. See [Idempotency](https://voice-platform.docs.buildwithfern.com/idempotency) for details.
- `Operation-Id` (string, optional) — optional client-supplied lowercase RFC-4122 v4 UUID returned as operation_uuid; platform generates one when omitted; correlation metadata distinct from Idempotency-Key.

### Body (application/json)

- `object or object`
  - object
    - `type` ("files", required) — Selects finite-file playback.
    - `urls` (list of string, required) — HTTP/HTTPS URLs of WAV or MP3 audio files to play sequentially. With two or more assets, playback is one continuous playlist, but seeking across playlist asset boundaries is undefined.
    - `loop` (boolean, optional) — Replay the finite source from the beginning whenever it finishes. Omit this field or set it to `false` to play the source once.
    - `offset_ms` (integer, optional) — Optional starting offset in milliseconds. It is valid only with one finite source.
  - object
    - `type` ("stream", required) — Selects live-stream playback.
    - `url` (string, required) — The single live HTTP/HTTPS stream to play.

## Response

### 202

Room playback command accepted for asynchronous execution

- `operation_uuid` (string, required)
- `status` (enum, required)
  - Allowed values: `in_progress`

## Examples

**Request**

```json
{
  "type": "string",
  "urls": [
    "string"
  ]
}
```

**Response**

```json
{
  "operation_uuid": "550e8400-e29b-41d4-a716-446655440000",
  "status": "in_progress"
}
```

**SDK Code**

```python Room Playback_playAudioInRoom_example
import requests

url = "https://api.telekesher.dev/api/v1/rooms/room_id/playback/play"

payload = {
    "type": "string",
    "urls": ["string"]
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Room Playback_playAudioInRoom_example
const url = 'https://api.telekesher.dev/api/v1/rooms/room_id/playback/play';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"type":"string","urls":["string"]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Room Playback_playAudioInRoom_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.telekesher.dev/api/v1/rooms/room_id/playback/play"

	payload := strings.NewReader("{\n  \"type\": \"string\",\n  \"urls\": [\n    \"string\"\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Room Playback_playAudioInRoom_example
require 'uri'
require 'net/http'

url = URI("https://api.telekesher.dev/api/v1/rooms/room_id/playback/play")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"type\": \"string\",\n  \"urls\": [\n    \"string\"\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java Room Playback_playAudioInRoom_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.telekesher.dev/api/v1/rooms/room_id/playback/play")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"type\": \"string\",\n  \"urls\": [\n    \"string\"\n  ]\n}")
  .asString();
```

```php Room Playback_playAudioInRoom_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.telekesher.dev/api/v1/rooms/room_id/playback/play', [
  'body' => '{
  "type": "string",
  "urls": [
    "string"
  ]
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Room Playback_playAudioInRoom_example
using RestSharp;

var client = new RestClient("https://api.telekesher.dev/api/v1/rooms/room_id/playback/play");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"type\": \"string\",\n  \"urls\": [\n    \"string\"\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Room Playback_playAudioInRoom_example
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "type": "string",
  "urls": ["string"]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.telekesher.dev/api/v1/rooms/room_id/playback/play")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```