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

# Get a call

GET https://api.synthflow.ai/v2/calls/{call_id}

Retrieve the transcript and other metadata for a phone call.

Reference: https://docs.synthflow.ai/api-reference/platform-api/calls/get-phone-call

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

### Path parameters

- `call_id` (string, required) — Call ID. You can find it on the logs page in your dashboard.

## Response

### 200

200

- `status` (string, optional) — Whether the request was successful.
- `response` (object, optional)
  - `pagination` (object, optional) — Pagination information for the results.
    - `total_records` (integer, optional) — The total number of call records matching the query.
    - `limit` (integer, optional) — The maximum number of records returned per request.
    - `offset` (integer, optional) — The number of records skipped from the beginning of the results.
  - `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.
    - `campaign_type` (string, optional) — Campaign type.
    - `phone_number_from` (string, optional) — The caller's phone number.
    - `phone_number_to` (string, optional) — The call recipient's phone number.
    - `name` (string, optional) — Recipient's name.
    - `transcript` (string, optional) — Call transcript.
    - `duration` (integer, optional) — The duration of the call in seconds.
    - `recording_url` (string, optional, nullable) — The URL of the call recording, or `null` if no recording is available.
    - `end_call_reason` (enum, optional) — The reason the call ended from the AI agent's perspective.
      - Allowed values: `human_pick_up_cut_off`, `voicemail`, `voicemail_cut_off`, `voicemail_message_left`, `agent_ended_call`, `human_ended_call`, `custom_end_call`, `user_canceled`, `timeout`, `error`
    - `custom_end_call_reason` (string, optional, nullable) — The specific user-defined reason that triggered call termination. Only present when end_call_reason is custom_end_call.
    - `error_message` (string, optional) — Error message if the call encountered an error, or an empty string if no error occurred.
    - `executed_actions` (object, optional) — Actions that were executed during the call.
    - `prompt_variables` (object, optional) — Prompt variables.
    - `type_of_call` (enum, optional) — Call type.
      - Allowed values: `inbound`, `outbound`
    - `start_time` (string, optional) — The scheduled start time for the call as a UNIX timestamp in milliseconds.
    - `timezone` (string, optional) — The timezone of the call. For a list of all available time zones, see the available [timezones](/time-zones).
    - `telephony_hangup` (enum, optional) — Indicates which party ended the call.
      - Allowed values: `caller`, `callee`
    - `telephony_disconnect_reason` (enum, optional) — The reason the telephony connection was disconnected.
      - Allowed values: `unknown`, `callee_hangup`, `caller_hangup`, `error`, `forbidden`
    - `telephony_duration` (integer, optional) — The total duration of the telephony connection in milliseconds.
    - `telephony_ringing_duration` (integer, optional) — The duration the phone was ringing before the call was answered, in milliseconds.
    - `telephony_start` (datetime, optional) — The timestamp when the telephony connection started (ISO 8601 format).
    - `telephony_end` (datetime, optional) — The timestamp when the telephony connection ended (ISO 8601 format).
    - `status` (enum, optional) — The current status of the call.
      - Allowed values: `pending`, `ringing`, `in-progress`, `completed`, `no-answer`, `busy`, `failed`, `canceled`, `user-canceled`, `hangup_on_voicemail`, `left_voicemail`, `spam`, `paused`, `registered`
    - `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": 1,
      "limit": 20,
      "offset": 0
    },
    "calls": [
      {
        "call_id": "1725527007259x327898249603432960",
        "model_id": "1725526325346x892123579587048600",
        "campaign_type": "live",
        "phone_number_from": "+11234567890",
        "phone_number_to": "+1098765432",
        "name": "",
        "transcript": "bot: Hey, you've called to [company]. How may I assist you today?\nhuman:  Hello. I would like to know my preferences.\nbot: Let me check your preferences.\nbot: I didn't catch your name. \nbot: Could you please provide it so I can look up your preferences? \nhuman:  Eddie.\nbot: Let me check your preferences.\nbot: Alright, Eddie. \nbot: Let me quickly pull up your preferences. \nbot: One moment, please. \nbot: Let me check your preferences.\nbot: Alright, Eddie. \nbot: Let me pull up your preferences... \nbot: Let me check your preferences.\nbot: Let me check your preferences. \nhuman: (Now the user has not responded in a while, you would say:)\nbot: Hey Eddie, are you still there? \nhuman:  Yes.\nbot: Let me check your preferences.\nbot: Got it. \nbot: Let me quickly pull up your preferences. \nbot: One moment, please. \nhuman: (Now the user has not responded in a while, you would say:)\nbot: Hey Eddie, are you still with me? \nhuman:  Yes.\nbot: Let me check your preferences.\nbot: Alright, Eddie. \nbot: Let me quickly pull up your preferences. \nbot: One moment, please.",
        "duration": 108,
        "recording_url": "https://api.twilio.com/2019-06-03/Accounts/ACb029z9m380.../Recordings/RE68bd...",
        "end_call_reason": "human_pick_up_cut_off",
        "custom_end_call_reason": "Customer is being abusive",
        "error_message": "",
        "executed_actions": {},
        "prompt_variables": {},
        "type_of_call": "inbound",
        "start_time": "1722260515000",
        "timezone": "Europe/Madrid",
        "telephony_hangup": "caller",
        "telephony_disconnect_reason": "callee_hangup",
        "telephony_duration": 66000,
        "telephony_ringing_duration": 15000,
        "telephony_start": {},
        "telephony_end": {},
        "status": "completed",
        "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/call_id"

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

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

print(response.json())
```

```go
package main

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

func main() {

	url := "https://api.synthflow.ai/v2/calls/call_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/call_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/call_id")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```csharp
using RestSharp;

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