- Stream endpoint - Returns a JSON object with a presigned URL for browser-native streaming
- Download endpoint - Returns the binary audio file for download
Stream Recording
Get a presigned URL for streaming the call recording in a browser.Endpoint
GET /api/calls/{call_sid}/recording/stream
Path Parameters
The unique identifier of the call (format:
call_ prefix + alphanumeric).Response
Returns a JSON object containing a presigned S3 URL that can be used directly with an HTML5 audio element.Indicates if the request was successful.
Recording URL data.
Presigned S3 URL for accessing the recording. Expires after 1 hour.
URL expiration time in seconds (3600 = 1 hour).
Content type of the recording (e.g.,
audio/wav, audio/mpeg).Suggested filename for the recording.
The presigned URL supports HTTP range requests, allowing the browser to stream
the audio file without downloading the entire file first. Use this endpoint
for playback in audio players.
Download Recording
Download the recording as a binary audio file.Endpoint
GET /api/calls/{call_sid}/recording/download
Path Parameters
The unique identifier of the call (format:
call_ prefix + alphanumeric).Response
Returns the audio file as a binary stream with appropriate headers for download.audio/wavattachment; filename="recording_{to_number}.wav"Size of the audio file in bytes.
This endpoint returns binary audio data, not JSON. The presigned URL used
internally expires after 5 minutes. Use this endpoint when you want to save
the recording to disk.
Comparison
| Feature | Stream Endpoint | Download Endpoint |
|---|---|---|
| Endpoint | /recording/stream | /recording/download |
| Response Type | JSON | Binary (WAV) |
| Content-Type | application/json | audio/wav |
| URL Expiration | 1 hour | 5 minutes |
| Use Case | Browser streaming | File download |
| Supports Seeking | Yes | No |
| Must Download All | No | Yes |