|
| 1 | +--- |
| 2 | +title: Retrieve call artifacts |
| 3 | +subtitle: Download recordings and call logs from Vapi's private storage using authenticated, short-lived URLs. |
| 4 | +slug: security-and-privacy/retrieve-call-artifacts |
| 5 | +--- |
| 6 | + |
| 7 | +## Overview |
| 8 | + |
| 9 | +For HIPAA-enabled organizations, call recordings and logs are stored in a private bucket. These URLs are not directly downloadable. |
| 10 | + |
| 11 | +To retrieve a recording or log file, call the Vapi API with your **Private API Key**. The API responds with a `302` redirect to a short-lived, authenticated download URL. |
| 12 | + |
| 13 | +<Warning> |
| 14 | + Never expose your Private API Key in client-side code or commit it to version control. Store it as a secret in your backend environment. |
| 15 | +</Warning> |
| 16 | + |
| 17 | +## Get your Private API Key |
| 18 | + |
| 19 | +1. Open the [Vapi Dashboard](https://dashboard.vapi.ai/). |
| 20 | +2. Go to **Manage** → **API Keys**. |
| 21 | +3. Copy the value of your **Private API Key**. |
| 22 | + |
| 23 | +## Integration |
| 24 | + |
| 25 | +To download or retrieve a recording or log file, send your Private API Key in the `Authorization` header: |
| 26 | + |
| 27 | +``` |
| 28 | +Authorization: Bearer <PRIVATE_API_KEY> |
| 29 | +``` |
| 30 | + |
| 31 | +Each endpoint responds with a `302` redirect to a short-lived signed URL. Most HTTP clients follow redirects by default — for example, `curl -L` follows the redirect and downloads the artifact in a single command. |
| 32 | + |
| 33 | +## Available endpoints |
| 34 | + |
| 35 | +Base URL: `https://api.vapi.ai` |
| 36 | + |
| 37 | +| Endpoint | Returns | |
| 38 | +| --- | --- | |
| 39 | +| `GET /call/{id}/mono-recording` | Combined mono recording (WAV/MP3) | |
| 40 | +| `GET /call/{id}/stereo-recording` | Stereo recording, customer + assistant on separate channels (WAV/MP3) | |
| 41 | +| `GET /call/{id}/customer-recording` | Customer-only mono recording (WAV/MP3) | |
| 42 | +| `GET /call/{id}/assistant-recording` | Assistant-only mono recording (WAV/MP3) | |
| 43 | +| `GET /call/{id}/video-recording` | Video recording, when enabled (MP4) | |
| 44 | +| `GET /call/{id}/call-logs` | Structured call logs (gzipped JSONL) | |
| 45 | +| `GET /call/{id}/pcap` | Packet capture, when enabled (PCAP) | |
| 46 | + |
| 47 | +## Example |
| 48 | + |
| 49 | +Download a stereo recording for a given call: |
| 50 | + |
| 51 | +```bash |
| 52 | +curl -L \ |
| 53 | + -H "Authorization: Bearer $VAPI_PRIVATE_API_KEY" \ |
| 54 | + -o recording.wav \ |
| 55 | + https://api.vapi.ai/call/<CALL_ID>/stereo-recording |
| 56 | +``` |
| 57 | + |
| 58 | +Download call logs: |
| 59 | + |
| 60 | +```bash |
| 61 | +curl -L \ |
| 62 | + -H "Authorization: Bearer $VAPI_PRIVATE_API_KEY" \ |
| 63 | + -o call-logs.jsonl.gz \ |
| 64 | + https://api.vapi.ai/call/<CALL_ID>/call-logs |
| 65 | +``` |
| 66 | + |
| 67 | +<Note> |
| 68 | + Signed URLs returned by these endpoints expire after a short period. Always request a fresh URL from the API rather than caching the redirect target. |
| 69 | +</Note> |
0 commit comments