Skip to navigation

Play audio in room

View as Markdown

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

Play one or more finite WAV or MP3 files sequentially with type: files, or play an HTTP/HTTPS AAC or HLS live audio source from its current live position with type: stream. Set format to aac or hls, or omit it for auto-detection. Explicit source ports must be 80 or 443. Live streams do not support pause, resume, seek, or loop.

Before admission, the platform validates and prepares every finite source. If it cannot prepare a finite source, the request returns a synchronous HTTP error and emits no playback webhook. Live stream fetching and decoding begin after admission. The platform does not queue or replace active room playback: a request returns 409 until the current playback or transition settles.

A 202 response confirms admission, not that a live stream source was fetched or playback started. Use its operation_uuid to correlate the request with its terminal webhook: room.playback.ended when playback finishes naturally or is stopped through the API, or room.playback.failed if playback fails, times out, or a live stream source cannot be fetched or decoded.

Failed playback of a live stream does not restart automatically. Start a new playback operation to play the live source again after failure.

See Room lifecycle, participant, and playback events for complete payload schemas and examples.

Authentication

AuthorizationBearer

Send Authorization: Bearer <app_uuid>:<api_key> using an active API key. See Authentication for details.

Path parameters

room_idstringRequired

Case-sensitive room identifier.

Headers

Idempotency-KeystringOptionalformat: "^[a-zA-Z0-9._-]*$"<=128 characters

Optional key for safely retrying mutating requests. An explicitly empty header is treated like omission and does not enable replay protection. See Idempotency for details.

Operation-IdstringOptionalformat: "uuid"

optional client-supplied lowercase RFC-4122 v4 UUID returned as operation_uuid; platform generates one when omitted; correlation metadata distinct from Idempotency-Key.

Request

This endpoint expects an object.
objectRequired
OR
objectRequired

Response headers

traceparentstringOptionalformat: "^00-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-f]{2}$"=55 characters

Server-owned W3C Trace Context for correlating this response with support and observability data. It is present on successful and error responses. A valid incoming traceparent is linked to, but never becomes, the server-owned trace identifier.

Response

Room playback command accepted for asynchronous execution
operation_uuidstring
statusenum
Allowed values:

Errors

400
Bad Request Error
401
Unauthorized Error
404
Not Found Error
406
Not Acceptable Error
409
Conflict Error
413
Content Too Large Error
415
Unsupported Media Type Error
422
Unprocessable Entity Error
429
Too Many Requests Error
500
Internal Server Error
502
Bad Gateway Error
503
Service Unavailable Error