> This page is for Voice Agents.

> Sarvam Voice Agents (Samvaad) is a voice AI agent platform for Indian languages: build, test and deploy AI calling agents on your own phone numbers, from ₹3 a minute. Start here: https://docs.sarvam.ai/voice-agents/why-voice-agents.
> 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).
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.sarvam.ai/_mcp/server.

# List interactions

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

Returns a page of interactions — conversations that took place — for one agent in a date range. Pass an item's `interaction_id` to [Get transcript](/voice-agents/api/analytics/transcripts) or [Get recording](/voice-agents/api/analytics/recordings).

Set `include_transcript=true` to get transcripts inline, or `include_forwarded_calls=true` for call transfers.

Responses are cached for 60 seconds. Each item includes `user_contact`, the user's **full, unmasked** phone number or email. Treat responses as personal data.

Reference: https://docs.sarvam.ai/voice-agents/api/analytics/interactions

## 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**).

### Query parameters

- `sort_by` (enum, optional, default: interaction_id) — Field to sort by. Default `interaction_id`. Unknown values return `422`.
  - Allowed values: `interaction_id`, `effective_datetime`, `attempted_at`, `start_datetime`, `end_datetime`, `duration_in_seconds`, `user_identifier`, `ended_by`
- `sort_order` (enum, optional, default: asc) — `asc` (default) or `desc`. Case-insensitive.
  - Allowed values: `asc`, `desc`
- `start_datetime` (datetime, required) — Start of the range, inclusive. ISO 8601 with an offset, e.g. `2026-10-01T00:00:00+05:30` (encode `+` as `%2B`). Without an offset, UTC is assumed.
- `end_datetime` (datetime, required) — End of the range, inclusive. Same format as `start_datetime`, and must be later than it.
- `limit` (integer, optional, default: 20) — Items per page, 1–1000. Default `20`.
- `offset` (integer, optional, default: 0) — Items to skip. Default `0`. To page, you can follow `next_page_uri` instead.
- `filter_conditions` (string, optional) — URL-encoded JSON array of `{field, operator, value}` conditions. `value` is always a string, even for numbers. Conditions on the same field are ORed; on different fields, ANDed. ```json [{"field": "duration_in_seconds", "operator": "greater_than", "value": "30"}] ``` Operators and filterable fields are listed under [Filtering](/voice-agents/api/analytics/overview#filtering).
- `include_transcript` (boolean, optional, default: false) — Add `original_transcript` and its English translation `translate_transcript` to each item. Default `false`.
- `include_forwarded_calls` (boolean, optional, default: false) — Add `forwarded_calls`, the call transfers made during each interaction. Default `false`.
- `forwarded_only` (boolean, optional, default: false) — Return only interactions that were forwarded. Implies `include_forwarded_calls`. Default `false`.

### Headers

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

## Response

### 200

A page of interactions.

- `items` (list of ExternalInteractionsAPIResponse, required) — The interactions on this page.
- `total` (integer, required) — Total number of interactions matching the request, across all pages.
- `limit` (integer, required) — The `limit` applied to this page.
- `offset` (integer, required) — The `offset` applied to this page.
- `next_page_uri` (string, required) — Query string for the next page, e.g. `?start_datetime=...&limit=20&offset=20`. Append it to the endpoint path. `""` when there is no next page.
- `prev_page_uri` (string, required) — Query string for the previous page. `""` when there is none.

## Errors

### 400 Bad Request Error

`filter_conditions` is not valid JSON, or a condition is malformed (unknown operator, missing `value`, or a `value` that is not a string).

- `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.

### 422 Unprocessable Entity Error

Validation failed. `detail` is a list for malformed parameters, a string for an unknown `sort_by` or filter field, or an object with `error` and `message` for an invalid `sort_order`.

- `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

Unexpected server error. 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

### ExternalInteractionsAPIResponse

One interaction: a conversation that took place between the agent and a user.

- `interaction_id` (string, optional, nullable) — ID of the interaction (the conversation), in the format `<YYYYMMDD>/<id>`. Pass it to Get transcript or Get recording.
- `job_id` (string, optional, nullable) — ID of the attempt that produced this interaction (the `attempt_id` in List attempts).
- `user_identifier` (string, optional, nullable) — Your organization's identifier for the user, for example an application or customer number.
- `user_contact` (string, optional, nullable) — The user's **full, unmasked** phone number or email. Personal data — prefer `user_contact_masked` or `user_contact_hashed` where you can.
- `user_contact_masked` (string, optional, nullable) — The user's contact with most characters masked, for display, e.g. `+91******3210`.
- `user_contact_hashed` (string, optional, nullable) — A hash of the user's contact.
- `duration_in_seconds` (double, optional, nullable, default: 0) — Length of the call, in seconds.
- `start_datetime` (datetime, optional, nullable) — When the call started, in UTC (ISO 8601 with no offset, e.g. `2026-10-07T05:12:08`).
- `end_datetime` (datetime, optional, nullable) — When the call ended, in UTC (ISO 8601 with no offset, e.g. `2026-10-07T05:14:31`).
- `attempted_at` (datetime, optional, nullable) — When the attempt was made, in UTC (ISO 8601 with no offset, e.g. `2026-10-07T05:11:57`).
- `language_name` (string, optional, nullable) — Language of the conversation, e.g. `Hindi`. `UNKNOWN` when the call never connected.
- `num_messages` (integer, optional, nullable) — Number of messages exchanged between the agent and the user.
- `average_agent_response_time_in_seconds` (double, optional, nullable) — Average time the agent took to respond, in seconds, rounded to 2 decimal places.
- `average_user_response_time_in_seconds` (double, optional, nullable) — Average time the user took to respond, in seconds, rounded to 2 decimal places.
- `channel_type` (string, optional, nullable) — Channel the call ran on, e.g. `v2v` for voice.
- `channel_direction` (string, optional, nullable) — `inbound` or `outbound`.
- `channel_protocol` (string, optional, nullable) — Protocol used to connect the call, e.g. `websocket`. `UNKNOWN` when the call never connected.
- `channel_provider` (string, optional, nullable) — Telephony provider that carried the call, for example `exotel`, `plivo` or `vobiz`. `UNKNOWN` when not recorded.
- `retry_attempt` (integer, optional, nullable) — Attempt number for this user, counting campaign retries. `1` is the first try.
- `server_retry_attempt` (integer, optional, nullable) — Try number for this attempt, counting the platform's automatic retries. `1` is the first try.
- `campaign_id` (string, optional, nullable) — ID of the campaign the call belongs to; null for calls outside a campaign.
- `cohort_id` (string, optional, nullable) — ID of the cohort the user was called from; null for calls outside a campaign.
- `is_debug_call` (enum, optional, nullable) — `1` for a test call made from the dashboard (playground), `0` otherwise. An integer, not a boolean.
  - Allowed values: `0`, `1`
- `has_log_issues` (enum, optional, nullable) — `1` if issues were detected in the call's logs, `0` otherwise. An integer, not a boolean.
  - Allowed values: `0`, `1`
- `failure_reason` (string, optional, nullable) — Why the attempt or call failed. `NO_FAILURE_REASON` when nothing failed.
- `ended_by` (string, optional, nullable) — Who or what ended the call, e.g. `USER_ENDS`, `AGENT_ENDS` or `VOICEMAIL`. `NO_END_REASON` when the call never connected.
- `audio_url` (string, optional, nullable) — Link to the call recording. To download audio from code, use [Get recording](/voice-agents/api/analytics/recordings).
- `deployment_id` (string, optional, nullable) — Deployment that handled the interaction; `null` when there is none.
- `app_version` (integer, optional, nullable) — Version of the agent that handled the interaction.
- `bot_contact_identifier` (string, optional, nullable) — The agent's own phone number or handle; `null` when unknown.
- `provider_identifier` (string, optional, nullable) — The telephony provider's ID for the call, such as a call SID; `null` when the provider doesn't report one.
- `goal_overall_status` (enum, optional, nullable) — Overall goal result for the interaction: `passed`, `failed`, `not_evaluated`, or `no_criteria` when the agent has no goal criteria.
  - Allowed values: `passed`, `failed`, `not_evaluated`, `no_criteria`
- `goal_criteria` (list of CriterionResult, optional) — Result for each of the agent's goal criteria; `[]` when the agent has no goal criteria.
- `agent_variables` (map from string to any, optional, nullable) — Your agent's variables and their final values at the end of the call, keyed by variable name. Values may include personal data you passed to the agent.
- `original_transcript` (list of TranscriptEntry, optional) — The conversation in its original language, in order. Present only when `include_transcript=true`. Aligned 1:1 with `translate_transcript`.
- `translate_transcript` (list of TranscriptEntry, optional) — English translation of `original_transcript`: entry *i* here translates entry *i* there. Present only when `include_transcript=true`.
- `forwarded_calls` (list of ForwardedCall, optional) — Call transfers made during this interaction; `[]` if it was not forwarded. Present only when `include_forwarded_calls=true` or `forwarded_only=true`.

### AnalyticsValidationErrorResponseDetail

The validation failure.

- list of ValidationError
- string
- SortOrderErrorDetail: SortOrderErrorDetail

### CriterionResult

The result of one goal criterion.

- `id` (string, required) — Criterion ID.
- `name` (string, required) — Criterion name, as set on the agent.
- `status` (enum, required) — `passed`, `failed` or `not_evaluated`.
  - Allowed values: `passed`, `failed`, `not_evaluated`

### TranscriptEntry

One turn in `original_transcript` or `translate_transcript`.

- `role` (enum, required) — Who spoke: `agent` or `user`. (Get transcript uses `assistant` instead of `agent`.)
  - Allowed values: `agent`, `user`
- `text` (string, required) — What was said.

### ForwardedCall

One call transfer (forwarded call) made during an interaction.

- `status` (enum, required) — Outcome of the transfer: `connected`, `no_answer`, `busy` or `failed`.
  - Allowed values: `connected`, `no_answer`, `busy`, `failed`
- `transfer_type` (enum, required) — `blind` or `warm`.
  - Allowed values: `blind`, `warm`
- `forwarded_to` (ForwardedTo, required) — Where a call was forwarded.
- `initiated_at` (datetime, required) — When the agent decided to transfer the call (UTC).
- `hangup_source` (enum, required) — Which side hung up: `caller`, `callee` or `unknown`.
  - Allowed values: `caller`, `callee`, `unknown`
- `has_recording` (boolean, required) — Whether a recording of this transfer is available. Only connected transfers have one; when a call was transferred more than once, only the latest connected transfer's recording is available. Currently only transfers made through Vobiz have a recording.
- `transfer_id` (string, optional, nullable) — The telephony provider's ID for the forwarded leg, if known.
- `started_at` (datetime, optional, nullable) — When the forwarded leg started (UTC); null when the telephony provider doesn't report it.
- `ended_at` (datetime, optional, nullable) — When the forwarded leg ended (UTC); null when the telephony provider doesn't report it.
- `duration_in_seconds` (double, optional, nullable) — Talk time on the forwarded leg, in seconds; `0` if it was not answered.
- `hangup_cause` (string, optional, nullable) — Hang-up cause reported by the telephony provider, if any.
- `recording_url` (string, optional, nullable) — Signed link to the forwarded-leg recording (mp3 or wav), usable without an API key. Null unless `has_recording` is true and signed recording links are enabled for your workspace. `null` for transfers made through other providers.

### 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.

### ForwardedTo

Where a call was forwarded.

- `type` (enum, required) — Destination type: `phone` or `sip_uri`.
  - Allowed values: `phone`, `sip_uri`
- `value` (string, required) — The phone number or SIP URI the call was forwarded to.

### ValidationErrorLocItems

- string
- integer

## Examples

### Default response

**Response**

```json
{
  "items": [
    {
      "interaction_id": "20261007/9f1c2a7e-4b3d-4e8a-a1f0-6c2d9b7e5a14",
      "job_id": "6d3a9e2f-1b7c-4c58-9f04-8e2b5d7a1c93",
      "user_identifier": "LN-2026-004817",
      "user_contact": "+919876543210",
      "user_contact_masked": "+91******3210",
      "user_contact_hashed": "4f9a2c7e1b8d3f60a5c4e2b19d7f8a3c6e1b5d9f2a7c4e8b0d3f6a1c9e5b2d7f",
      "duration_in_seconds": 142.6,
      "start_datetime": "2026-10-07T05:12:08",
      "end_datetime": "2026-10-07T05:14:31",
      "attempted_at": "2026-10-07T05:11:57",
      "language_name": "Hindi",
      "num_messages": 14,
      "average_agent_response_time_in_seconds": 1.18,
      "average_user_response_time_in_seconds": 2.46,
      "channel_type": "v2v",
      "channel_direction": "outbound",
      "channel_protocol": "websocket",
      "channel_provider": "exotel",
      "retry_attempt": 1,
      "server_retry_attempt": 1,
      "campaign_id": "emi-reminder-oct-2026",
      "cohort_id": "cohort-0921-overdue",
      "is_debug_call": 0,
      "has_log_issues": 0,
      "failure_reason": "NO_FAILURE_REASON",
      "ended_by": "USER_ENDS",
      "audio_url": "https://agents.sarvam.ai/media?org_id=acme-corp-7c2e9f&workspace_id=support-ws-4b1d8a&app_id=support-bot-3f9a1c2e-7b4d&interaction_id=20261007/9f1c2a7e-4b3d-4e8a-a1f0-6c2d9b7e5a14&audio_hash=merged_audio",
      "deployment_id": null,
      "app_version": 4,
      "bot_contact_identifier": "+918069470000",
      "provider_identifier": "c3f8a2d1-6b4e-4f9a-8d2c-1e7b5a9f0d34",
      "goal_overall_status": "no_criteria",
      "goal_criteria": [],
      "agent_variables": {
        "customer_name": "Priya Sharma",
        "emi_amount": "4500",
        "loan_status": "overdue",
        "promised_payment_date": "2026-10-10"
      }
    }
  ],
  "total": 23,
  "limit": 1,
  "offset": 0,
  "next_page_uri": "?start_datetime=2026-10-01T00%3A00%3A00%2B05%3A30&end_datetime=2026-10-07T23%3A59%3A59%2B05%3A30&limit=1&offset=1",
  "prev_page_uri": ""
}
```

**SDK Code**

```python Default response
import requests

url = "https://apps.sarvam.ai/api/analytics/v1/acme-corp-7c2e9f/support-ws-4b1d8a/support-bot-3f9a1c2e-7b4d/interactions"

querystring = {"end_datetime":"2026-10-07T23:59:59+05:30","filter_conditions":"[{\"field\":\"channel_direction\",\"operator\":\"equals\",\"value\":\"outbound\"},{\"field\":\"duration_in_seconds\",\"operator\":\"greater_than\",\"value\":\"30\"},{\"field\":\"agent_variables.loan_status\",\"operator\":\"equals\",\"value\":\"overdue\"},{\"field\":\"agent_variables.loan_status\",\"operator\":\"equals\",\"value\":\"due_today\"}]","start_datetime":"2026-10-01T00:00:00+05:30"}

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

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

print(response.json())
```

```javascript Default response
const url = 'https://apps.sarvam.ai/api/analytics/v1/acme-corp-7c2e9f/support-ws-4b1d8a/support-bot-3f9a1c2e-7b4d/interactions?end_datetime=2026-10-07T23%3A59%3A59%2B05%3A30&filter_conditions=%5B%7B%22field%22%3A%22channel_direction%22%2C%22operator%22%3A%22equals%22%2C%22value%22%3A%22outbound%22%7D%2C%7B%22field%22%3A%22duration_in_seconds%22%2C%22operator%22%3A%22greater_than%22%2C%22value%22%3A%2230%22%7D%2C%7B%22field%22%3A%22agent_variables.loan_status%22%2C%22operator%22%3A%22equals%22%2C%22value%22%3A%22overdue%22%7D%2C%7B%22field%22%3A%22agent_variables.loan_status%22%2C%22operator%22%3A%22equals%22%2C%22value%22%3A%22due_today%22%7D%5D&start_datetime=2026-10-01T00%3A00%3A00%2B05%3A30';
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 Default response
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/interactions?end_datetime=2026-10-07T23%3A59%3A59%2B05%3A30&filter_conditions=%5B%7B%22field%22%3A%22channel_direction%22%2C%22operator%22%3A%22equals%22%2C%22value%22%3A%22outbound%22%7D%2C%7B%22field%22%3A%22duration_in_seconds%22%2C%22operator%22%3A%22greater_than%22%2C%22value%22%3A%2230%22%7D%2C%7B%22field%22%3A%22agent_variables.loan_status%22%2C%22operator%22%3A%22equals%22%2C%22value%22%3A%22overdue%22%7D%2C%7B%22field%22%3A%22agent_variables.loan_status%22%2C%22operator%22%3A%22equals%22%2C%22value%22%3A%22due_today%22%7D%5D&start_datetime=2026-10-01T00%3A00%3A00%2B05%3A30"

	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 Default response
require 'uri'
require 'net/http'

url = URI("https://apps.sarvam.ai/api/analytics/v1/acme-corp-7c2e9f/support-ws-4b1d8a/support-bot-3f9a1c2e-7b4d/interactions?end_datetime=2026-10-07T23%3A59%3A59%2B05%3A30&filter_conditions=%5B%7B%22field%22%3A%22channel_direction%22%2C%22operator%22%3A%22equals%22%2C%22value%22%3A%22outbound%22%7D%2C%7B%22field%22%3A%22duration_in_seconds%22%2C%22operator%22%3A%22greater_than%22%2C%22value%22%3A%2230%22%7D%2C%7B%22field%22%3A%22agent_variables.loan_status%22%2C%22operator%22%3A%22equals%22%2C%22value%22%3A%22overdue%22%7D%2C%7B%22field%22%3A%22agent_variables.loan_status%22%2C%22operator%22%3A%22equals%22%2C%22value%22%3A%22due_today%22%7D%5D&start_datetime=2026-10-01T00%3A00%3A00%2B05%3A30")

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 Default response
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/interactions?end_datetime=2026-10-07T23%3A59%3A59%2B05%3A30&filter_conditions=%5B%7B%22field%22%3A%22channel_direction%22%2C%22operator%22%3A%22equals%22%2C%22value%22%3A%22outbound%22%7D%2C%7B%22field%22%3A%22duration_in_seconds%22%2C%22operator%22%3A%22greater_than%22%2C%22value%22%3A%2230%22%7D%2C%7B%22field%22%3A%22agent_variables.loan_status%22%2C%22operator%22%3A%22equals%22%2C%22value%22%3A%22overdue%22%7D%2C%7B%22field%22%3A%22agent_variables.loan_status%22%2C%22operator%22%3A%22equals%22%2C%22value%22%3A%22due_today%22%7D%5D&start_datetime=2026-10-01T00%3A00%3A00%2B05%3A30")
  .header("X-API-Key", "<your-api-key>")
  .asString();
```

```php Default response
<?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/interactions?end_datetime=2026-10-07T23%3A59%3A59%2B05%3A30&filter_conditions=%5B%7B%22field%22%3A%22channel_direction%22%2C%22operator%22%3A%22equals%22%2C%22value%22%3A%22outbound%22%7D%2C%7B%22field%22%3A%22duration_in_seconds%22%2C%22operator%22%3A%22greater_than%22%2C%22value%22%3A%2230%22%7D%2C%7B%22field%22%3A%22agent_variables.loan_status%22%2C%22operator%22%3A%22equals%22%2C%22value%22%3A%22overdue%22%7D%2C%7B%22field%22%3A%22agent_variables.loan_status%22%2C%22operator%22%3A%22equals%22%2C%22value%22%3A%22due_today%22%7D%5D&start_datetime=2026-10-01T00%3A00%3A00%2B05%3A30', [
  'headers' => [
    'X-API-Key' => '<your-api-key>',
  ],
]);

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

```csharp Default response
using RestSharp;

var client = new RestClient("https://apps.sarvam.ai/api/analytics/v1/acme-corp-7c2e9f/support-ws-4b1d8a/support-bot-3f9a1c2e-7b4d/interactions?end_datetime=2026-10-07T23%3A59%3A59%2B05%3A30&filter_conditions=%5B%7B%22field%22%3A%22channel_direction%22%2C%22operator%22%3A%22equals%22%2C%22value%22%3A%22outbound%22%7D%2C%7B%22field%22%3A%22duration_in_seconds%22%2C%22operator%22%3A%22greater_than%22%2C%22value%22%3A%2230%22%7D%2C%7B%22field%22%3A%22agent_variables.loan_status%22%2C%22operator%22%3A%22equals%22%2C%22value%22%3A%22overdue%22%7D%2C%7B%22field%22%3A%22agent_variables.loan_status%22%2C%22operator%22%3A%22equals%22%2C%22value%22%3A%22due_today%22%7D%5D&start_datetime=2026-10-01T00%3A00%3A00%2B05%3A30");
var request = new RestRequest(Method.GET);
request.AddHeader("X-API-Key", "<your-api-key>");
IRestResponse response = client.Execute(request);
```

```swift Default response
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/interactions?end_datetime=2026-10-07T23%3A59%3A59%2B05%3A30&filter_conditions=%5B%7B%22field%22%3A%22channel_direction%22%2C%22operator%22%3A%22equals%22%2C%22value%22%3A%22outbound%22%7D%2C%7B%22field%22%3A%22duration_in_seconds%22%2C%22operator%22%3A%22greater_than%22%2C%22value%22%3A%2230%22%7D%2C%7B%22field%22%3A%22agent_variables.loan_status%22%2C%22operator%22%3A%22equals%22%2C%22value%22%3A%22overdue%22%7D%2C%7B%22field%22%3A%22agent_variables.loan_status%22%2C%22operator%22%3A%22equals%22%2C%22value%22%3A%22due_today%22%7D%5D&start_datetime=2026-10-01T00%3A00%3A00%2B05%3A30")! 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()
```

### With include_transcript=true and forwarded_only=true

**Response**

```json
{
  "items": [
    {
      "interaction_id": "20261007/9f1c2a7e-4b3d-4e8a-a1f0-6c2d9b7e5a14",
      "job_id": "6d3a9e2f-1b7c-4c58-9f04-8e2b5d7a1c93",
      "user_identifier": "LN-2026-004817",
      "user_contact": "+919876543210",
      "user_contact_masked": "+91******3210",
      "user_contact_hashed": "4f9a2c7e1b8d3f60a5c4e2b19d7f8a3c6e1b5d9f2a7c4e8b0d3f6a1c9e5b2d7f",
      "duration_in_seconds": 142.6,
      "start_datetime": "2026-10-07T05:12:08",
      "end_datetime": "2026-10-07T05:14:31",
      "attempted_at": "2026-10-07T05:11:57",
      "language_name": "Hindi",
      "num_messages": 14,
      "average_agent_response_time_in_seconds": 1.18,
      "average_user_response_time_in_seconds": 2.46,
      "channel_type": "v2v",
      "channel_direction": "outbound",
      "channel_protocol": "websocket",
      "channel_provider": "vobiz",
      "retry_attempt": 1,
      "server_retry_attempt": 1,
      "campaign_id": "emi-reminder-oct-2026",
      "cohort_id": "cohort-0921-overdue",
      "is_debug_call": 0,
      "has_log_issues": 0,
      "failure_reason": "NO_FAILURE_REASON",
      "ended_by": "USER_ENDS",
      "audio_url": "https://agents.sarvam.ai/media?org_id=acme-corp-7c2e9f&workspace_id=support-ws-4b1d8a&app_id=support-bot-3f9a1c2e-7b4d&interaction_id=20261007/9f1c2a7e-4b3d-4e8a-a1f0-6c2d9b7e5a14&audio_hash=merged_audio",
      "deployment_id": null,
      "app_version": 4,
      "bot_contact_identifier": "+918069470000",
      "provider_identifier": "c3f8a2d1-6b4e-4f9a-8d2c-1e7b5a9f0d34",
      "goal_overall_status": "passed",
      "goal_criteria": [
        {
          "id": "payment_date_committed",
          "name": "Customer commits to a payment date",
          "status": "passed"
        }
      ],
      "agent_variables": {
        "customer_name": "Priya Sharma",
        "emi_amount": "4500",
        "loan_status": "overdue",
        "promised_payment_date": "2026-10-10"
      },
      "original_transcript": [
        {
          "role": "agent",
          "text": "नमस्ते प्रिया जी, मैं Acme Finance से बोल रही हूँ। क्या अभी बात करने का सही समय है?"
        },
        {
          "role": "user",
          "text": "हाँ, बोलिए।"
        },
        {
          "role": "agent",
          "text": "आपकी ₹4,500 की EMI बकाया है। क्या आप इसे 10 अक्टूबर तक जमा कर पाएंगी?"
        },
        {
          "role": "user",
          "text": "हाँ, मैं 10 तारीख तक कर दूँगी।"
        }
      ],
      "translate_transcript": [
        {
          "role": "agent",
          "text": "Hello Priya, I'm calling from Acme Finance. Is this a good time to talk?"
        },
        {
          "role": "user",
          "text": "Yes, go ahead."
        },
        {
          "role": "agent",
          "text": "Your EMI of ₹4,500 is overdue. Will you be able to pay it by 10 October?"
        },
        {
          "role": "user",
          "text": "Yes, I'll pay by the 10th."
        }
      ],
      "forwarded_calls": [
        {
          "status": "connected",
          "transfer_type": "warm",
          "forwarded_to": {
            "type": "phone",
            "value": "+918000012345"
          },
          "initiated_at": "2026-10-07T05:13:52Z",
          "hangup_source": "callee",
          "has_recording": true,
          "transfer_id": "CA8f2d6b1e4a9c3075d1e6b8f2a4c7d9e0",
          "started_at": "2026-10-07T05:13:55Z",
          "ended_at": "2026-10-07T05:16:20Z",
          "duration_in_seconds": 145,
          "hangup_cause": "NORMAL_CLEARING",
          "recording_url": null
        }
      ]
    }
  ],
  "total": 4,
  "limit": 1,
  "offset": 0,
  "next_page_uri": "?start_datetime=2026-10-01T00%3A00%3A00%2B05%3A30&end_datetime=2026-10-07T23%3A59%3A59%2B05%3A30&include_transcript=true&forwarded_only=true&limit=1&offset=1",
  "prev_page_uri": ""
}
```

**SDK Code**

```python With include_transcript=true and forwarded_only=true
import requests

url = "https://apps.sarvam.ai/api/analytics/v1/acme-corp-7c2e9f/support-ws-4b1d8a/support-bot-3f9a1c2e-7b4d/interactions"

querystring = {"end_datetime":"2026-10-07T23:59:59+05:30","filter_conditions":"[{\"field\":\"channel_direction\",\"operator\":\"equals\",\"value\":\"outbound\"},{\"field\":\"duration_in_seconds\",\"operator\":\"greater_than\",\"value\":\"30\"},{\"field\":\"agent_variables.loan_status\",\"operator\":\"equals\",\"value\":\"overdue\"},{\"field\":\"agent_variables.loan_status\",\"operator\":\"equals\",\"value\":\"due_today\"}]","start_datetime":"2026-10-01T00:00:00+05:30"}

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

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

print(response.json())
```

```javascript With include_transcript=true and forwarded_only=true
const url = 'https://apps.sarvam.ai/api/analytics/v1/acme-corp-7c2e9f/support-ws-4b1d8a/support-bot-3f9a1c2e-7b4d/interactions?end_datetime=2026-10-07T23%3A59%3A59%2B05%3A30&filter_conditions=%5B%7B%22field%22%3A%22channel_direction%22%2C%22operator%22%3A%22equals%22%2C%22value%22%3A%22outbound%22%7D%2C%7B%22field%22%3A%22duration_in_seconds%22%2C%22operator%22%3A%22greater_than%22%2C%22value%22%3A%2230%22%7D%2C%7B%22field%22%3A%22agent_variables.loan_status%22%2C%22operator%22%3A%22equals%22%2C%22value%22%3A%22overdue%22%7D%2C%7B%22field%22%3A%22agent_variables.loan_status%22%2C%22operator%22%3A%22equals%22%2C%22value%22%3A%22due_today%22%7D%5D&start_datetime=2026-10-01T00%3A00%3A00%2B05%3A30';
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 With include_transcript=true and forwarded_only=true
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/interactions?end_datetime=2026-10-07T23%3A59%3A59%2B05%3A30&filter_conditions=%5B%7B%22field%22%3A%22channel_direction%22%2C%22operator%22%3A%22equals%22%2C%22value%22%3A%22outbound%22%7D%2C%7B%22field%22%3A%22duration_in_seconds%22%2C%22operator%22%3A%22greater_than%22%2C%22value%22%3A%2230%22%7D%2C%7B%22field%22%3A%22agent_variables.loan_status%22%2C%22operator%22%3A%22equals%22%2C%22value%22%3A%22overdue%22%7D%2C%7B%22field%22%3A%22agent_variables.loan_status%22%2C%22operator%22%3A%22equals%22%2C%22value%22%3A%22due_today%22%7D%5D&start_datetime=2026-10-01T00%3A00%3A00%2B05%3A30"

	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 With include_transcript=true and forwarded_only=true
require 'uri'
require 'net/http'

url = URI("https://apps.sarvam.ai/api/analytics/v1/acme-corp-7c2e9f/support-ws-4b1d8a/support-bot-3f9a1c2e-7b4d/interactions?end_datetime=2026-10-07T23%3A59%3A59%2B05%3A30&filter_conditions=%5B%7B%22field%22%3A%22channel_direction%22%2C%22operator%22%3A%22equals%22%2C%22value%22%3A%22outbound%22%7D%2C%7B%22field%22%3A%22duration_in_seconds%22%2C%22operator%22%3A%22greater_than%22%2C%22value%22%3A%2230%22%7D%2C%7B%22field%22%3A%22agent_variables.loan_status%22%2C%22operator%22%3A%22equals%22%2C%22value%22%3A%22overdue%22%7D%2C%7B%22field%22%3A%22agent_variables.loan_status%22%2C%22operator%22%3A%22equals%22%2C%22value%22%3A%22due_today%22%7D%5D&start_datetime=2026-10-01T00%3A00%3A00%2B05%3A30")

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 With include_transcript=true and forwarded_only=true
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/interactions?end_datetime=2026-10-07T23%3A59%3A59%2B05%3A30&filter_conditions=%5B%7B%22field%22%3A%22channel_direction%22%2C%22operator%22%3A%22equals%22%2C%22value%22%3A%22outbound%22%7D%2C%7B%22field%22%3A%22duration_in_seconds%22%2C%22operator%22%3A%22greater_than%22%2C%22value%22%3A%2230%22%7D%2C%7B%22field%22%3A%22agent_variables.loan_status%22%2C%22operator%22%3A%22equals%22%2C%22value%22%3A%22overdue%22%7D%2C%7B%22field%22%3A%22agent_variables.loan_status%22%2C%22operator%22%3A%22equals%22%2C%22value%22%3A%22due_today%22%7D%5D&start_datetime=2026-10-01T00%3A00%3A00%2B05%3A30")
  .header("X-API-Key", "<your-api-key>")
  .asString();
```

```php With include_transcript=true and forwarded_only=true
<?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/interactions?end_datetime=2026-10-07T23%3A59%3A59%2B05%3A30&filter_conditions=%5B%7B%22field%22%3A%22channel_direction%22%2C%22operator%22%3A%22equals%22%2C%22value%22%3A%22outbound%22%7D%2C%7B%22field%22%3A%22duration_in_seconds%22%2C%22operator%22%3A%22greater_than%22%2C%22value%22%3A%2230%22%7D%2C%7B%22field%22%3A%22agent_variables.loan_status%22%2C%22operator%22%3A%22equals%22%2C%22value%22%3A%22overdue%22%7D%2C%7B%22field%22%3A%22agent_variables.loan_status%22%2C%22operator%22%3A%22equals%22%2C%22value%22%3A%22due_today%22%7D%5D&start_datetime=2026-10-01T00%3A00%3A00%2B05%3A30', [
  'headers' => [
    'X-API-Key' => '<your-api-key>',
  ],
]);

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

```csharp With include_transcript=true and forwarded_only=true
using RestSharp;

var client = new RestClient("https://apps.sarvam.ai/api/analytics/v1/acme-corp-7c2e9f/support-ws-4b1d8a/support-bot-3f9a1c2e-7b4d/interactions?end_datetime=2026-10-07T23%3A59%3A59%2B05%3A30&filter_conditions=%5B%7B%22field%22%3A%22channel_direction%22%2C%22operator%22%3A%22equals%22%2C%22value%22%3A%22outbound%22%7D%2C%7B%22field%22%3A%22duration_in_seconds%22%2C%22operator%22%3A%22greater_than%22%2C%22value%22%3A%2230%22%7D%2C%7B%22field%22%3A%22agent_variables.loan_status%22%2C%22operator%22%3A%22equals%22%2C%22value%22%3A%22overdue%22%7D%2C%7B%22field%22%3A%22agent_variables.loan_status%22%2C%22operator%22%3A%22equals%22%2C%22value%22%3A%22due_today%22%7D%5D&start_datetime=2026-10-01T00%3A00%3A00%2B05%3A30");
var request = new RestRequest(Method.GET);
request.AddHeader("X-API-Key", "<your-api-key>");
IRestResponse response = client.Execute(request);
```

```swift With include_transcript=true and forwarded_only=true
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/interactions?end_datetime=2026-10-07T23%3A59%3A59%2B05%3A30&filter_conditions=%5B%7B%22field%22%3A%22channel_direction%22%2C%22operator%22%3A%22equals%22%2C%22value%22%3A%22outbound%22%7D%2C%7B%22field%22%3A%22duration_in_seconds%22%2C%22operator%22%3A%22greater_than%22%2C%22value%22%3A%2230%22%7D%2C%7B%22field%22%3A%22agent_variables.loan_status%22%2C%22operator%22%3A%22equals%22%2C%22value%22%3A%22overdue%22%7D%2C%7B%22field%22%3A%22agent_variables.loan_status%22%2C%22operator%22%3A%22equals%22%2C%22value%22%3A%22due_today%22%7D%5D&start_datetime=2026-10-01T00%3A00%3A00%2B05%3A30")! 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()
```