> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.levrage.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.levrage.ai/_mcp/server.

# Get call history

GET https://api.levrage.ai/v1/calls

Get paginated call history with comprehensive filters.

**Filters:**
- status: completed, failed, no_answer, voicemail
- phone_number: partial match
- agent_id: specific agent
- from_date/to_date: date range
- direction: inbound/outbound
- sentiment: positive/neutral/negative
- min_duration/max_duration: duration range in seconds
- call_end_reason: user_hangup, agent_hangup, timeout
- handover: true/false

Reference: https://docs.levrage.ai/api-reference/calls/get-calls

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Query parameters

- `page` (integer, optional, default: 1) — Page number
- `page_size` (integer, optional, default: 20) — Items per page
- `status` (string, optional, nullable) — completed, failed, no_answer, voicemail
- `phone_number` (string, optional, nullable) — Filter by phone number (partial match)
- `agent_id` (string, optional, nullable) — Filter by agent ID
- `from_date` (string, optional, nullable) — Start: YYYY-MM-DD or YYYY-MM-DDTHH:MM:SS
- `to_date` (string, optional, nullable) — End: YYYY-MM-DD (the whole day) or YYYY-MM-DDTHH:MM:SS
- `direction` (string, optional, nullable) — inbound or outbound
- `sentiment` (string, optional, nullable) — positive, neutral, negative
- `agent_type` (string, optional, nullable) — Filter by agent type
- `min_duration` (integer, optional, nullable) — Min duration in seconds
- `max_duration` (integer, optional, nullable) — Max duration in seconds
- `call_end_reason` (string, optional, nullable) — user_hangup, agent_hangup, timeout
- `handover` (boolean, optional, nullable) — Filter by handover status
- `campaign_id` (string, optional, nullable) — Only one campaign's calls (GET /campaigns), callbacks to it included

## Response

### 200

Successful Response

- `data` (list of CallHistoryItem, required)
- `total` (integer, required)
- `page` (integer, required)
- `page_size` (integer, required)
- `has_more` (boolean, required)
- `request_id` (string, required)
- `timestamp` (datetime, required)
- `success` (boolean, optional, default: true)

## Errors

### 422 Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional)

## Types

### CallHistoryItem

Single call record with full details.

- `id` (string, required) — Call history ID
- `session_id` (string, required) — Session ID
- `phone_number` (string, required) — Phone number called
- `direction` (string, required) — inbound or outbound
- `status` (string, required) — completed, no_answer, failed, voicemail
- `agent_id` (string, required) — Agent ID
- `started_at` (datetime, optional, nullable)
- `ended_at` (datetime, optional, nullable)
- `duration_seconds` (integer, optional, nullable) — Duration in seconds
- `duration_minutes` (double, optional, nullable) — Duration in minutes
- `agent_type` (string, optional, nullable)
- `agent_name` (string, optional, nullable) — The agent's name
- `contact_name` (string, optional, nullable) — The person's name, when the call carried one (campaign row or call details)
- `campaign_id` (string, optional, nullable) — The campaign the call belongs to, if any
- `campaign_name` (string, optional, nullable) — That campaign's name
- `outcome` (string, optional, nullable) — The call's outcome as filed, e.g. 'Interested' or 'Promise to pay'
- `sentiment` (string, optional, nullable)
- `handover` (boolean, optional, default: false)
- `call_summary` (string, optional, nullable)
- `call_end_reason` (string, optional, nullable)
- `ended_by` (string, optional, nullable)
- `details_collection` (DetailsCollection, optional, nullable) — Details collected during call.
- `recording_url` (string, optional, nullable)
- `ai_cost` (double, optional, nullable)
- `telephony_cost` (double, optional, nullable)
- `total_cost` (double, optional, nullable)
- `created_at` (datetime, optional, nullable)

### ValidationError

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

### DetailsCollection

Details collected during call.

- `status` (string, optional, nullable)
- `score` (double, optional, nullable)
- `collected_details` (list of string, optional, default: [])
- `collected_values` (DetailsCollectionCollectedValues, optional, default: {})

### ValidationErrorLocItems

- string
- integer

### DetailsCollectionCollectedValues

## Examples

**Response**

```json
{
  "data": [
    {
      "id": "call_a1b2c3d4e5f6",
      "session_id": "sess_f6e5d4c3b2a1",
      "phone_number": "+919876543210",
      "direction": "outbound",
      "status": "completed",
      "agent_id": "550e8400-e29b-41d4-a716-446655440000",
      "started_at": "2026-01-15T09:30:00+05:30",
      "ended_at": "2026-01-15T09:40:00+05:30",
      "duration_seconds": 600,
      "duration_minutes": 10,
      "agent_type": "finance_lead_qualifier",
      "sentiment": "positive",
      "handover": false,
      "call_summary": "Customer was interested in the personal loan product. Agreed to a follow-up call.",
      "call_end_reason": "agent_hangup",
      "ended_by": "agent",
      "details_collection": {
        "status": "completed",
        "score": 0.95,
        "collected_details": [
          "full_name",
          "monthly_income"
        ],
        "collected_values": {
          "full_name": "Rahul Sharma",
          "monthly_income": "75000"
        }
      },
      "recording_url": "https://objectstore.e2enetworks.net/novaworker-recordings/call_a1b2c3d4e5f6.wav",
      "ai_cost": 0.15,
      "telephony_cost": 0.3,
      "total_cost": 0.45,
      "created_at": "2026-01-15T09:30:00+05:30"
    }
  ],
  "total": 1,
  "page": 1,
  "page_size": 20,
  "has_more": false,
  "request_id": "req_a1b2c3d4e5f6",
  "timestamp": "2026-01-15T09:45:00+05:30",
  "success": true
}
```

**SDK Code**

```python
import requests

url = "https://api.levrage.ai/v1/calls"

querystring = {"page":"1","page_size":"20","status":"completed","direction":"outbound"}

headers = {"Authorization": "Bearer <token>"}

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

print(response.json())
```

```javascript
const url = 'https://api.levrage.ai/v1/calls?page=1&page_size=20&status=completed&direction=outbound';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

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://api.levrage.ai/v1/calls?page=1&page_size=20&status=completed&direction=outbound"

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

	req.Header.Add("Authorization", "Bearer <token>")

	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://api.levrage.ai/v1/calls?page=1&page_size=20&status=completed&direction=outbound")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

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://api.levrage.ai/v1/calls?page=1&page_size=20&status=completed&direction=outbound")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.levrage.ai/v1/calls?page=1&page_size=20&status=completed&direction=outbound', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.levrage.ai/v1/calls?page=1&page_size=20&status=completed&direction=outbound");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.levrage.ai/v1/calls?page=1&page_size=20&status=completed&direction=outbound")! 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()
```