> 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.

# Start audio playback

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

**Rate limit: Per command** · **Burst:** 8 · **Refill:** 4 req/s

Choose the tab for your audio source.

Play one WAV or MP3 file, or a playlist:

```json
{
  "type": "files",
  "urls": [
    "https://media.example.com/greeting.mp3",
    "https://media.example.com/menu.wav"
  ]
}
```

The platform plays the URLs in order. Use `offset_ms` only with one
file. For private files, use presigned HTTPS URLs that remain valid
through playback. [Seek within playback](/api/playback/seek) is
available only for files.

Start a pushed raw-audio stream:

```json
{
  "type": "stream",
  "media_format": {
    "encoding": "pcm_s16le",
    "sample_rate": 24000
  }
}
```

The `202 Accepted` response includes a short-lived `upload_url`.
Stream the TTS bytes in one HTTP request body, then close the body when
the TTS stream ends:

```http
PUT {upload_url}
Content-Type: application/octet-stream

<raw audio bytes>
```

The audio must match `media_format`: signed little-endian PCM16 at 8,
16, 24, or 48 kHz; or G.711 mu-law at 8 kHz.

Keep Session Playback active without an audio source:

```json
{
  "type": "silence"
}
```

Silence continues until another playback replaces it, the session
ends, or you [stop playback](/api/playback/stop).

An accepted request returns `202 Accepted` with `operation_uuid` and
`status: in_progress`. New playback replaces active playback
automatically. See [Playback lifecycle events](/api/playback#lifecycle-events)
for completion and failure webhooks.

Reference: https://docs.vorbal.dev/api/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

- `uuid` (string, required) — [Session](/api/sessions) 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 or object or object`
  - SessionPlaybackFilesRequest
    - `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.
    - `offset_ms` (integer, optional) — Optional starting offset in milliseconds. It is valid only with one finite source.
  - SessionPlaybackPushRequest
    - `media_format` (object or object, required) — Raw mono audio carried in the upload request body. PCM16 is little-endian; mu-law is 8 kHz.
      - object
        - `encoding` ("pcm_s16le", required)
        - `sample_rate` (enum, required)
          - Allowed values: `8000`, `16000`, `24000`, `48000`
      - object
        - `encoding` ("mulaw", required)
        - `sample_rate` (enum, required)
          - Allowed values: `8000`
    - `type` ("push", required) — Selects generated audio pushed through the returned upload target.
  - SessionPlaybackStreamRequest
    - `type` ("stream", required) — Selects hosted live-stream playback.
    - `url` (string, required) — The hosted HTTP/HTTPS AAC stream to play from its current position.
  - SessionPlaybackSilenceRequest
    - `type` ("silence", required) — Selects indefinite silence playback until replaced or stopped.

## Response

### 202

Playback accepted.

- `operation_uuid` (string, required)
- `status` (enum, required)
  - Allowed values: `in_progress`
- `ingest` (object, optional) — Present only for `type: push`. Send one streaming HTTP request exactly as described by this object, plus the normal application Bearer authorization header.
  - `expires_at` (datetime, required) — Last instant at which the one-shot ingest request may be opened. A request accepted before this instant may continue streaming afterward.
  - `headers` (object, required) — Ingest-specific HTTP headers required on the request. Send every returned header unchanged, and also add the normal application Bearer authorization header.
    - `Content-Type` ("application/octet-stream", required)
  - `method` ("POST", required) — HTTP method required by the ingest endpoint.
  - `url` (string, required) — Short-lived, single-use HTTPS ingest URL.

## Examples

**Request**

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

**Response**

```json
{
  "operation_uuid": "string",
  "status": "in_progress",
  "ingest": {
    "expires_at": "2024-01-15T09:30:00Z",
    "headers": {
      "Content-Type": "string"
    },
    "method": "string",
    "url": "string"
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.telekesher.dev/v1/sessions/uuid/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
const url = 'https://api.telekesher.dev/v1/sessions/uuid/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
package main

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

func main() {

	url := "https://api.telekesher.dev/v1/sessions/uuid/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
require 'uri'
require 'net/http'

url = URI("https://api.telekesher.dev/v1/sessions/uuid/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
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

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

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

$client = new \GuzzleHttp\Client();

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

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

```csharp
using RestSharp;

var client = new RestClient("https://api.telekesher.dev/v1/sessions/uuid/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
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/v1/sessions/uuid/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()
```