> This page is for API Reference.

> For clean Markdown of any page, append `.md` to the page URL.
> For a complete documentation index, see https://docs.sarvam.ai/llms.txt. For a section index, append `/llms.txt` to any section URL (for example https://docs.sarvam.ai/voice-agents/llms.txt).
> Building a voice agent for customers in India? Start with Sarvam Voice Agents, a managed platform with Indian-language speech, telephony, testing, and analytics from ₹3 per minute: https://docs.sarvam.ai/voice-agents/why-voice-agents.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.sarvam.ai/_mcp/server.

# Get forwarded recordings

GET https://apps.sarvam.ai/api/analytics/v1/{org_id}/{workspace_id}/{app_id}/recordings/{interaction_id}/forwarded

Returns the recording of the forwarded leg of a call transfer (the part after the agent transferred the call) in the telephony provider's format, `audio/mpeg` or `audio/wav`. When a call was transferred more than once, the latest connected transfer's recording is returned. Forwarded-leg recordings are currently available only for transfers made through Vobiz. Returns `404` if there is no recording.

```bash
curl "https://apps.sarvam.ai/api/analytics/v1/$ORG_ID/$WORKSPACE_ID/$APP_ID/recordings/$INTERACTION_ID/forwarded" \
  -H "X-API-Key: $SARVAM_API_KEY" \
  -o forwarded.mp3
```

Reference: https://docs.sarvam.ai/api-reference/analytics/forwarded-recordings

## Request

### Path parameters

- `org_id` (string, required) — Organization ID.
- `workspace_id` (string, required) — Workspace ID.
- `app_id` (string, required) — Agent ID. Copy it from the agent's **···** menu in the dashboard (**Copy agent ID**).
- `interaction_id` (string, required) — From List interactions, in the form `<YYYYMMDD>/<id>`, e.g. `20261007/9f1c2a7e-4b3d-4e8a-a1f0-6c2d9b7e5a14`. Send the slash as is or as `%2F`.

### Headers

- `X-API-Key` (string, required) — Your workspace API key.

## Response

### 200

The forwarded-leg recording as an audio stream, in the telephony provider's format.

- File download.

## Errors

### 400 Bad Request Error

`interaction_id` is not in the `<YYYYMMDD>/<id>` format.

- `detail` (string, required) — Human-readable description of the error.

### 401 Unauthorized Error

The `X-API-Key` header is missing or malformed, or the key does not belong to this organization.

- `detail` (string, required) — Human-readable description of the error.

### 403 Forbidden Error

The API key is valid but not authorized for this organization or workspace.

- `detail` (string, required) — Human-readable description of the error.

### 404 Not Found Error

No forwarded-leg recording exists for this interaction: it wasn't transferred, the transfer didn't connect, or the transfer wasn't made through Vobiz.

- `detail` (string, required) — Human-readable description of the error.

### 422 Unprocessable Entity Error

A required path parameter is missing or malformed. `detail` is a list of validation errors.

- `detail` (AnalyticsValidationErrorResponseDetail, required) — The validation failure.

### 429 Too Many Requests Error

Rate limit exceeded for this API key. Wait for the number of seconds in the `Retry-After` header before retrying.

- `detail` (string, required) — Human-readable description of the error.

### 500 Internal Server Error

The recording could not be retrieved. Retry with backoff; contact support if it persists.

- `detail` (string, required) — Human-readable description of the error.

### 503 Service Unavailable Error

The authentication service is temporarily unavailable. Retry with backoff.

- `detail` (string, required) — Human-readable description of the error.

## Types

### AnalyticsValidationErrorResponseDetail

The validation failure.

- list of ValidationError
- string
- SortOrderErrorDetail: SortOrderErrorDetail

### ValidationError

- `loc` (list of ValidationErrorLocItems, required)
- `msg` (string, required)
- `type` (string, required)

### SortOrderErrorDetail

`detail` shape returned for an invalid `sort_order`.

- `error` (string, required) — Always `Validation error`.
- `message` (string, required) — What was wrong and the allowed values.

### ValidationErrorLocItems

- string
- integer

## Examples

**SDK Code**

```python
import requests

url = "https://apps.sarvam.ai/api/analytics/v1/acme-corp-7c2e9f/support-ws-4b1d8a/support-bot-3f9a1c2e-7b4d/recordings/20261007%2F9f1c2a7e-4b3d-4e8a-a1f0-6c2d9b7e5a14/forwarded"

headers = {"X-API-Key": "<your-api-key>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://apps.sarvam.ai/api/analytics/v1/acme-corp-7c2e9f/support-ws-4b1d8a/support-bot-3f9a1c2e-7b4d/recordings/20261007%2F9f1c2a7e-4b3d-4e8a-a1f0-6c2d9b7e5a14/forwarded';
const options = {method: 'GET', headers: {'X-API-Key': '<your-api-key>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://apps.sarvam.ai/api/analytics/v1/acme-corp-7c2e9f/support-ws-4b1d8a/support-bot-3f9a1c2e-7b4d/recordings/20261007%2F9f1c2a7e-4b3d-4e8a-a1f0-6c2d9b7e5a14/forwarded"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("X-API-Key", "<your-api-key>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://apps.sarvam.ai/api/analytics/v1/acme-corp-7c2e9f/support-ws-4b1d8a/support-bot-3f9a1c2e-7b4d/recordings/20261007%2F9f1c2a7e-4b3d-4e8a-a1f0-6c2d9b7e5a14/forwarded")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<your-api-key>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://apps.sarvam.ai/api/analytics/v1/acme-corp-7c2e9f/support-ws-4b1d8a/support-bot-3f9a1c2e-7b4d/recordings/20261007%2F9f1c2a7e-4b3d-4e8a-a1f0-6c2d9b7e5a14/forwarded")
  .header("X-API-Key", "<your-api-key>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://apps.sarvam.ai/api/analytics/v1/acme-corp-7c2e9f/support-ws-4b1d8a/support-bot-3f9a1c2e-7b4d/recordings/20261007%2F9f1c2a7e-4b3d-4e8a-a1f0-6c2d9b7e5a14/forwarded', [
  'headers' => [
    'X-API-Key' => '<your-api-key>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://apps.sarvam.ai/api/analytics/v1/acme-corp-7c2e9f/support-ws-4b1d8a/support-bot-3f9a1c2e-7b4d/recordings/20261007%2F9f1c2a7e-4b3d-4e8a-a1f0-6c2d9b7e5a14/forwarded");
var request = new RestRequest(Method.GET);
request.AddHeader("X-API-Key", "<your-api-key>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["X-API-Key": "<your-api-key>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://apps.sarvam.ai/api/analytics/v1/acme-corp-7c2e9f/support-ws-4b1d8a/support-bot-3f9a1c2e-7b4d/recordings/20261007%2F9f1c2a7e-4b3d-4e8a-a1f0-6c2d9b7e5a14/forwarded")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```