curl -X GET "https://api.sayvy.ai/api/v1/call-logs/7b8d8b9e-63f5-46b6-9bb2-15f18731b819/audio" \
-H "Authorization: Bearer <token>" \
--output call_recording.ogg
import requests
url = "https://api.sayvy.ai/api/v1/call-logs/7b8d8b9e-63f5-46b6-9bb2-15f18731b819/audio"
headers = {
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers, stream=True)
if response.status_code == 200:
with open("recording.ogg", "wb") as f:
for chunk in response.iter_content(chunk_size=8192):
f.write(chunk)
print("Recording downloaded successfully")
else:
print("Error:", response.status_code, response.json())
// Direct HTML5 Audio playback in browser:
const audioElement = new Audio();
const callLogId = "7b8d8b9e-63f5-46b6-9bb2-15f18731b819";
const response = await fetch(`https://api.sayvy.ai/api/v1/call-logs/${callLogId}/audio`, {
headers: {
"Authorization": "Bearer <token>"
}
});
const audioBlob = await response.blob();
audioElement.src = URL.createObjectURL(audioBlob);
audioElement.play();
<Binary Audio Stream (audio/ogg)>
{
"detail": "No voice call recording is available for this call."
}
{
"detail": "Failed to retrieve call recording from storage: S3 error"
}
Call Logs
Get call recording audio
Stream or download recorded WhatsApp voice call audio directly via secure proxy
GET
/
api
/
v1
/
call-logs
/
{call_log_id}
/
audio
curl -X GET "https://api.sayvy.ai/api/v1/call-logs/7b8d8b9e-63f5-46b6-9bb2-15f18731b819/audio" \
-H "Authorization: Bearer <token>" \
--output call_recording.ogg
import requests
url = "https://api.sayvy.ai/api/v1/call-logs/7b8d8b9e-63f5-46b6-9bb2-15f18731b819/audio"
headers = {
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers, stream=True)
if response.status_code == 200:
with open("recording.ogg", "wb") as f:
for chunk in response.iter_content(chunk_size=8192):
f.write(chunk)
print("Recording downloaded successfully")
else:
print("Error:", response.status_code, response.json())
// Direct HTML5 Audio playback in browser:
const audioElement = new Audio();
const callLogId = "7b8d8b9e-63f5-46b6-9bb2-15f18731b819";
const response = await fetch(`https://api.sayvy.ai/api/v1/call-logs/${callLogId}/audio`, {
headers: {
"Authorization": "Bearer <token>"
}
});
const audioBlob = await response.blob();
audioElement.src = URL.createObjectURL(audioBlob);
audioElement.play();
<Binary Audio Stream (audio/ogg)>
{
"detail": "No voice call recording is available for this call."
}
{
"detail": "Failed to retrieve call recording from storage: S3 error"
}
Stream or download the recorded voice audio binary (
audio/ogg) for a specific call session.
This endpoint acts as an authenticated audio proxy. It streams binary data directly from Sayvy AI’s private S3/R2 storage buckets or provider endpoints, ensuring that private cloud storage credentials, bucket policies, and presigned URLs are never exposed to browser clients or end-users.
Authentication
This endpoint requires Bearer token authentication.Authorization: Bearer <token>
| Header | Type | Required | Description | Format |
|---|---|---|---|---|
Authorization | string | Yes | Scoped organization API key or Bearer JWT token | Bearer <token> |
Path Parameters
string
required
Bearer token for authentication. Format:
Bearer <token>.string
required
Unique UUID identifier of the call log.
Response Headers & Content
This endpoint returns binary audio data with HTTP200 OK (or partial content with range headers).
| Header | Value / Type | Description |
|---|---|---|
Content-Type | audio/ogg | Audio format stream |
Content-Disposition | inline; filename="call_{call_log_id}.ogg" | Allows playback directly in HTML <audio> elements or audio visualizers |
Accept-Ranges | bytes | Supports scrubbing and byte-range seeking in audio players |
Cache-Control | private, max-age=3600 | Browser caching policy for audio segments |
curl -X GET "https://api.sayvy.ai/api/v1/call-logs/7b8d8b9e-63f5-46b6-9bb2-15f18731b819/audio" \
-H "Authorization: Bearer <token>" \
--output call_recording.ogg
import requests
url = "https://api.sayvy.ai/api/v1/call-logs/7b8d8b9e-63f5-46b6-9bb2-15f18731b819/audio"
headers = {
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers, stream=True)
if response.status_code == 200:
with open("recording.ogg", "wb") as f:
for chunk in response.iter_content(chunk_size=8192):
f.write(chunk)
print("Recording downloaded successfully")
else:
print("Error:", response.status_code, response.json())
// Direct HTML5 Audio playback in browser:
const audioElement = new Audio();
const callLogId = "7b8d8b9e-63f5-46b6-9bb2-15f18731b819";
const response = await fetch(`https://api.sayvy.ai/api/v1/call-logs/${callLogId}/audio`, {
headers: {
"Authorization": "Bearer <token>"
}
});
const audioBlob = await response.blob();
audioElement.src = URL.createObjectURL(audioBlob);
audioElement.play();
<Binary Audio Stream (audio/ogg)>
{
"detail": "No voice call recording is available for this call."
}
{
"detail": "Failed to retrieve call recording from storage: S3 error"
}
Was this page helpful?