> For a complete page index, fetch https://docs.synthflow.ai/llms.txt. For full documentation content, fetch https://docs.synthflow.ai/llms-full.txt.

# List calls

GET https://api.synthflow.ai/v2/calls

Returns a paginated list of calls for the specified model. You can optionally filter by time window, status, duration range, or phone number.

Reference: https://docs.synthflow.ai/api-reference/platform-api/calls/list-calls

## Authentication

- `Authorization` header (bearer token, required)

## Servers

- `https://api.synthflow.ai/v2` (Global, default)
- `https://api.us.synthflow.ai/v2` (United States)
- `https://api.eu.synthflow.ai/v2` (European Union)

## Request

### Query parameters

- `model_id` (string, required) — The calls for the specified model ID will be returned
- `limit` (integer, optional) — How many calls will be displayed in every page, default is 20
- `offset` (integer, optional) — Index of the first call to be returned.
- `from_date` (long, optional) — Begin timestamp (milliseconds since epoch) of the call. Available after the call starts. Example: 1732546200000
- `to_date` (long, optional) — End timestamp (milliseconds since epoch) of the call. Available after the call ends. Example: 1732546200000
- `call_status` (string, optional) — Status of call.
- `duration_min` (integer, optional) — Only retrieve calls with duration greater than or equal to this value (seconds).
- `duration_max` (integer, optional) — Only retrieve calls with duration less than or equal to this value (seconds).
- `lead_phone_number` (string, optional) — Phone number of the caller or callee (E.164 format preferred) and URL-encode the leading "+" (e.g. %2B14155552671)

## Response

### 200

200

- `status` (string, optional) — Whether the request was successful.
- `response` (object, optional)
  - `pagination` (object, optional) — Pagination information for the response
    - `total_records` (integer, optional) — Total number of call records
    - `limit` (integer, optional) — Maximum number of records per page
    - `offset` (integer, optional) — Starting index for the current page
  - `calls` (list of object, optional)
    - `call_id` (string, optional) — Call ID. You can find it on the logs page in your dashboard.
    - `model_id` (string, optional) — Agent ID. You can find it on the agent’s page in your dashboard.
    - `duration` (integer, optional) — Duration of the call in seconds
    - `end_call_reason` (string, optional) — Reason why the call ended
    - `judge_results` (any, optional, nullable) — Results from call quality judging
    - `lead_phone_number` (string, optional) — Phone number of the lead
    - `agents_used` (list of string, optional) — List of agents used during the call
    - `executed_actions` (object, optional) — Actions executed during the call
    - `recording_url` (string, optional, nullable)
    - `type_of_call` (string, optional) — Type of call (inbound or outbound)
    - `recording_duration` (string, optional, nullable) — Duration of the recording
    - `transcript` (string, optional, nullable)
    - `error_message` (string, optional, nullable) — Error message if the call failed
    - `call_status` (string, optional) — Status of the call
    - `start_time` (string, optional) — Timestamp when the call started (milliseconds since epoch)
    - `lead_name` (string, optional, nullable) — Name of the lead
    - `name` (string, optional, nullable) — Name of the call recipient
    - `labels` (list of string, optional) — Labels associated with the call
    - `agent_phone_number` (string, optional) — Phone number used by the agent
    - `deployment_type` (string, optional, nullable) — Type of deployment
    - `timezone` (string, optional, nullable) — Timezone for the call
    - `telephony_hangup` (enum, optional, nullable)
      - Allowed values: `caller`, `callee`
    - `telephony_disconnect_reason` (enum, optional, nullable)
      - Allowed values: `unknown`, `callee_hangup`, `caller_hangup`, `error`, `forbidden`
    - `telephony_duration` (integer, optional, nullable)
    - `telephony_start` (date, optional, nullable)
    - `telephony_end` (date, optional, nullable)
    - `campaign_type` (string, optional)
    - `phone_number_from` (string, optional)
    - `phone_number_to` (string, optional)
    - `collected_variables` (map from string to map from string to object, optional) — Collected variables (slots) from the conversation flow, keyed by agent ID. May be null if not available.
      - `value` (any, optional) — The collected value of the variable (string, number, boolean, or null if not collected).
      - `collected` (boolean, optional) — Whether this variable was successfully collected.

## Examples

**Response**

```json
{
  "status": "ok",
  "response": {
    "pagination": {
      "total_records": 9,
      "limit": 20,
      "offset": 0
    },
    "calls": [
      {
        "call_id": "58bd0d3f-6982-4a6d-911e-1c11fbcc7dca",
        "model_id": "f7181a86-5713-4d47-bb87-123d8199a29e",
        "duration": 0,
        "end_call_reason": "human_hangup",
        "judge_results": null,
        "lead_phone_number": "+4915510277534",
        "agents_used": [
          "string"
        ],
        "executed_actions": {},
        "recording_url": "https://api.twilio.com/2009-10-10/Accounts/ZGH0293d4b80d81cf5g946r34f3c99941bf/Recordings/RE9ee05467410311202811f06205227138",
        "type_of_call": "outbound",
        "recording_duration": "string",
        "transcript": "bot: Hey there\nhuman:  Hello.\nbot: Hi, Eddie!\nbot: How are you today?\nhuman:  Good. And you?\nbot: Great to hear!",
        "error_message": "Account not found!",
        "call_status": "failed",
        "start_time": "1761150177868",
        "lead_name": "string",
        "name": "string",
        "labels": [
          "string"
        ],
        "agent_phone_number": "+12315593024",
        "deployment_type": "string",
        "timezone": "string",
        "telephony_hangup": "caller",
        "telephony_disconnect_reason": "forbidden",
        "telephony_duration": 43200,
        "telephony_start": {},
        "telephony_end": {},
        "campaign_type": "live",
        "phone_number_from": "+12315593024",
        "phone_number_to": "+4915510277534",
        "collected_variables": {
          "agent_123": {
            "appointment_date": {
              "value": {},
              "collected": true
            },
            "user_name": {
              "value": "Julian",
              "collected": true
            }
          }
        }
      }
    ]
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.synthflow.ai/v2/calls"

querystring = {"model_id":"model_id"}

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

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

print(response.json())
```

```go
package main

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

func main() {

	url := "https://api.synthflow.ai/v2/calls?model_id=model_id"

	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.synthflow.ai/v2/calls?model_id=model_id")

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.synthflow.ai/v2/calls?model_id=model_id")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.synthflow.ai/v2/calls?model_id=model_id");
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.synthflow.ai/v2/calls?model_id=model_id")! 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()
```