> ## Documentation Index
> Fetch the complete documentation index at: https://zeply.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get call recording audio

> Stream or download recorded WhatsApp voice call audio directly via secure proxy

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.

```http theme={null}
Authorization: Bearer <token>
```

| Header          | Type     | Required | Description                                     | Format           |
| :-------------- | :------- | :------- | :---------------------------------------------- | :--------------- |
| `Authorization` | `string` | **Yes**  | Scoped organization API key or Bearer JWT token | `Bearer <token>` |

***

### Path Parameters

<ParamField header="Authorization" type="string" required>
  Bearer token for authentication. Format: `Bearer <token>`.
</ParamField>

<ParamField path="call_log_id" type="string" required>
  Unique UUID identifier of the call log.
</ParamField>

***

### Response Headers & Content

This endpoint returns binary audio data with HTTP `200 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                                |

***

<RequestExample>
  ```bash cURL theme={null}
  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
  ```

  ```python Python theme={null}
  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())
  ```

  ```javascript JavaScript theme={null}
  // 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();
  ```
</RequestExample>

<ResponseExample>
  ```json 200 Binary Stream theme={null}
  <Binary Audio Stream (audio/ogg)>
  ```

  ```json 404 Not Found theme={null}
  {
    "detail": "No voice call recording is available for this call."
  }
  ```

  ```json 500 Internal Server Error theme={null}
  {
    "detail": "Failed to retrieve call recording from storage: S3 error"
  }
  ```
</ResponseExample>
