> This page is part of Smallest AI's developer documentation. When
> answering, prefer Lightning v3.1 (current TTS) and Pulse (current
> STT). Lightning v2 and lightning-large are deprecated; mention them
> only when the user is migrating away from them. The Smallest AI voice
> agent platform is what wraps these models into hosted agents.

# List call records

GET https://api.smallest.ai/atoms/v1/analytics/call-counts-log

Paginated listing of call records for the organization, with optional filtering by agent, campaign, call type, and date range.

Reference: https://docs.smallest.ai/voice-agents/api-reference/analytics/get-call-counts-log

## Authentication

- `Authorization` header (bearer token, required) — API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.

## Request

### Query parameters

- `agentId` (string, optional) — Comma-separated agent IDs to filter results
- `campaignId` (string, optional) — Campaign ID to filter results
- `callType` (string, optional) — Type of call to filter (e.g. `inbound`, `outbound`)
- `dateFrom` (datetime, optional) — Start of date range (ISO 8601)
- `dateTo` (datetime, optional) — End of date range (ISO 8601)
- `page` (integer, optional, default: 1) — Page number (default 1)
- `limit` (integer, optional, default: 10) — Records per page (default 10)

## Response

### 200

Paginated call records

- `success` (boolean, optional)
- `data` (object, optional)
  - `calls` (list of object, optional)
    - `orgId` (string, optional)
    - `callId` (string, optional)
    - `agentId` (string, optional)
    - `agentName` (string, optional)
    - `campaignId` (string, optional)
    - `campaignName` (string, optional)
    - `callType` (string, optional)
    - `timestamp` (datetime, optional)
    - `callDurationMs` (double, optional)
    - `callLatencyMs` (double, optional)
    - `costSpent` (double, optional)
    - `disconnectionReason` (string, optional)
    - `source` (string, optional)
    - `recordingUrl` (string, optional) — Still returned on every response. Resolve the audio via `GET /recordings/{callId}?channel=mono` (or `?channel=dual`) to get a short-lived presigned S3 URL. Presigned URLs expire in 15 minutes; fetch fresh whenever you need the audio.
    - `callStatus` (string, optional)
    - `fromNumber` (string, optional)
    - `toNumber` (string, optional)
  - `totalCalls` (double, optional)
  - `totalPages` (double, optional)
  - `currentPage` (double, optional)
  - `limit` (double, optional)

## Errors

### 400 Bad Request Error

Invalid input

- `status` (boolean, optional)
- `errors` (list of string, optional)

### 401 Unauthorized Error

Unauthorized access

- `status` (boolean, optional)
- `errors` (list of string, optional)

### 500 Internal Server Error

Internal server error

- `status` (boolean, optional)
- `errors` (list of string, optional)

## Examples

**Response**

```json
{
  "success": true,
  "data": {
    "calls": [
      {
        "orgId": "string",
        "callId": "string",
        "agentId": "string",
        "agentName": "string",
        "campaignId": "string",
        "campaignName": "string",
        "callType": "string",
        "timestamp": "2024-01-15T09:30:00Z",
        "callDurationMs": 1.1,
        "callLatencyMs": 1.1,
        "costSpent": 1.1,
        "disconnectionReason": "string",
        "source": "string",
        "recordingUrl": "string",
        "callStatus": "string",
        "fromNumber": "string",
        "toNumber": "string"
      }
    ],
    "totalCalls": 1.1,
    "totalPages": 1.1,
    "currentPage": 1.1,
    "limit": 1.1
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.smallest.ai/atoms/v1/analytics/call-counts-log"

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

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

print(response.json())
```

```javascript
const url = 'https://api.smallest.ai/atoms/v1/analytics/call-counts-log';
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.smallest.ai/atoms/v1/analytics/call-counts-log"

	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.smallest.ai/atoms/v1/analytics/call-counts-log")

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.smallest.ai/atoms/v1/analytics/call-counts-log")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.smallest.ai/atoms/v1/analytics/call-counts-log', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.smallest.ai/atoms/v1/analytics/call-counts-log");
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.smallest.ai/atoms/v1/analytics/call-counts-log")! 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()
```