Recording Playback

Voicebip records calls when recording consent is granted (see Voice Calls for the consent flow). Recordings are stored as WAV files and retained for 30 days with automatic cleanup.

Get a Call Recording

$curl "https://api.voicebip.com/v1/calls/{call_id}/recording" \
> -H "Authorization: Bearer pk_live_your_key" \
> --output recording.wav

The response is an audio/wav binary file with Accept-Ranges: bytes header for seeking support.

Range Requests

For in-browser playback or seeking within a recording, use HTTP Range requests:

$curl "https://api.voicebip.com/v1/calls/{call_id}/recording" \
> -H "Authorization: Bearer pk_live_your_key" \
> -H "Range: bytes=0-1023"

Returns HTTP 206 Partial Content with Content-Range header.

Browser Playback

Use the HTML5 audio element for browser playback. The range-request support enables seeking.

1<audio controls>
2 <source
3 src="https://api.voicebip.com/v1/calls/call_abc123/recording"
4 type="audio/wav"
5 />
6</audio>

Set the Authorization header using a short-lived JWT from /v1/auth/session:

1const session = await fetch("https://api.voicebip.com/v1/auth/session", {
2 method: "POST",
3 headers: { "Content-Type": "application/json" },
4 body: JSON.stringify({ api_key: "pk_live_your_key" }),
5});
6const { token } = await session.json();
7
8// Use the token as a query parameter for audio sources
9const audioUrl = `https://api.voicebip.com/v1/calls/${callId}/recording?token=${token}`;

Recording Lifecycle

StageDescription
Call startsRecording begins after DTMF “1” consent
Call endsWAV file saved to persistent storage
call.completed webhookrecording_url field included in payload
30 daysRecording automatically deleted

Error Responses

StatusMeaning
404Call not found, or recording not available (consent not given, call in progress, or recording expired)
401Missing or invalid authentication

Sandbox Mode

Sandbox calls (pk_test_ keys) do not produce recordings. The recording_url field is always null in sandbox call.completed events, and GET /v1/calls/{call_id}/recording returns 404 for sandbox calls.