VocalDocscontracts 1.65.0

Stream the audio of a recording

GET /v1/recordings/{recording_id}/audio

PropertyValue
Operationstream_recording_audio
GroupRecordings
Scoperecordings:read
Route classread
IdempotencyNo Idempotency-Key
AuditAn audited content read recording.audio.read
Released in1.15.0
Phase 0 hostServed (the hosted api pins 1.65.0)

Answers audio/wav: two channels (caller left, Agent right) at 16 kHz and 16 bits, decrypted by the api. Only a recording with status available has audio; any other status answers 409 recording_not_available. From 1.32.0 a read that finds the stored object missing marks the recording expired and answers the same. Every request is an audited content read.

Request

Set VOCAL_API to the base URL of your API and VOCAL_API_KEY to an API key with the recordings:read scope (Authentication and keys). Replace each placeholder, such as agt_... or <name>, with your own value.

curl "$VOCAL_API/v1/recordings/rec_.../audio" \
  -H "Authorization: Bearer $VOCAL_API_KEY" \
  -o answer.wav

Parameters

NameInTypeRequiredDescription
recording_idpathRecordingIdyesThe id of a Call recording: rec_ and the row's UUIDv7 in 26 Crockford base32 characters. Opaque and safe to log.
rangeheaderstringnoOne byte range of the audio, bytes=<start>-<end>. A satisfiable range is answered 206; a malformed or unsatisfiable range is ignored and the whole audio is answered 200.

Responses

StatusContent typeShapeError codes
200audio/wavstring (binary): The audio as a WAV file, decrypted by the api; bytes, not JSON.
206audio/wavstring (binary): The audio as a WAV file, decrypted by the api; bytes, not JSON.
400application/jsonErrorEnvelopeinvalid_request
401application/jsonErrorEnvelopeunauthenticated
403application/jsonErrorEnvelopeforbidden
404application/jsonErrorEnvelopenot_found
409application/jsonErrorEnveloperecording_not_available
429application/jsonErrorEnveloperate_limited
500application/jsonErrorEnvelopeinternal_error