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

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: Synthflow APIs
  version: 1.0.0
paths:
  /calls/{call_id}:
    get:
      operationId: get-phone-call
      summary: Get a call
      description: Retrieve the transcript and other metadata for a phone call.
      tags:
        - ''
      parameters:
        - name: call_id
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/call_id'
        - name: Authorization
          in: header
          description: Bearer authentication
          required: true
          schema:
            type: string
      responses:
        '200':
          description: '200'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/get-phone-call_Response_200'
        '400':
          description: '400'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Get-phone-callRequestBadRequestError'
servers:
  - url: https://api.synthflow.ai/v2
  - url: https://api.us.synthflow.ai/v2
components:
  schemas:
    call_id:
      type: string
      description: Call ID. You can find it on the logs page in your dashboard.
      title: call_id
    status:
      type: string
      description: Whether the request was successful.
      title: status
    CallsCallIdGetResponsesContentApplicationJsonSchemaResponsePagination:
      type: object
      properties:
        total_records:
          type: integer
          description: The total number of call records matching the query.
        limit:
          type: integer
          description: The maximum number of records returned per request.
        offset:
          type: integer
          description: The number of records skipped from the beginning of the results.
      description: Pagination information for the results.
      title: CallsCallIdGetResponsesContentApplicationJsonSchemaResponsePagination
    model_id:
      type: string
      description: Agent ID. You can find it on the agent’s page in your dashboard.
      title: model_id
    CallsCallIdGetResponsesContentApplicationJsonSchemaResponseCallsItemsEndCallReason:
      type: string
      enum:
        - human_pick_up_cut_off
        - voicemail
        - voicemail_cut_off
        - voicemail_message_left
        - agent_ended_call
        - human_ended_call
        - custom_end_call
        - timeout
        - error
      description: The reason the call ended from the AI agent's perspective.
      title: >-
        CallsCallIdGetResponsesContentApplicationJsonSchemaResponseCallsItemsEndCallReason
    CallsCallIdGetResponsesContentApplicationJsonSchemaResponseCallsItemsExecutedActions:
      type: object
      properties: {}
      description: Actions that were executed during the call.
      title: >-
        CallsCallIdGetResponsesContentApplicationJsonSchemaResponseCallsItemsExecutedActions
    CallsCallIdGetResponsesContentApplicationJsonSchemaResponseCallsItemsPromptVariables:
      type: object
      properties: {}
      description: Prompt variables.
      title: >-
        CallsCallIdGetResponsesContentApplicationJsonSchemaResponseCallsItemsPromptVariables
    CallsCallIdGetResponsesContentApplicationJsonSchemaResponseCallsItemsTypeOfCall:
      type: string
      enum:
        - inbound
        - outbound
      description: Call type.
      title: >-
        CallsCallIdGetResponsesContentApplicationJsonSchemaResponseCallsItemsTypeOfCall
    CallsCallIdGetResponsesContentApplicationJsonSchemaResponseCallsItemsTelephonyHangup:
      type: string
      enum:
        - caller
        - callee
      description: Indicates which party ended the call.
      title: >-
        CallsCallIdGetResponsesContentApplicationJsonSchemaResponseCallsItemsTelephonyHangup
    CallsCallIdGetResponsesContentApplicationJsonSchemaResponseCallsItemsTelephonyDisconnectReason:
      type: string
      enum:
        - unknown
        - callee_hangup
        - caller_hangup
        - error
        - forbidden
      description: The reason the telephony connection was disconnected.
      title: >-
        CallsCallIdGetResponsesContentApplicationJsonSchemaResponseCallsItemsTelephonyDisconnectReason
    CallsCallIdGetResponsesContentApplicationJsonSchemaResponseCallsItemsStatus:
      type: string
      enum:
        - pending
        - ringing
        - in-progress
        - completed
        - no-answer
        - busy
        - failed
        - canceled
      description: The current status of the call.
      title: >-
        CallsCallIdGetResponsesContentApplicationJsonSchemaResponseCallsItemsStatus
    CallsCallIdGetResponsesContentApplicationJsonSchemaResponseCallsItemsCollectedVariables:
      type: object
      properties:
        value:
          description: >-
            The collected value of the variable (string, number, boolean, or
            null if not collected).
        collected:
          type: boolean
          description: Whether this variable was successfully collected.
      title: >-
        CallsCallIdGetResponsesContentApplicationJsonSchemaResponseCallsItemsCollectedVariables
    CallsCallIdGetResponsesContentApplicationJsonSchemaResponseCallsItems:
      type: object
      properties:
        call_id:
          $ref: '#/components/schemas/call_id'
        model_id:
          $ref: '#/components/schemas/model_id'
        campaign_type:
          type: string
          description: Campaign type.
        phone_number_from:
          type: string
          description: The caller's phone number.
        phone_number_to:
          type: string
          description: The call recipient's phone number.
        name:
          type: string
          description: Recipient's name.
        transcript:
          type: string
          description: Call transcript.
        duration:
          type: integer
          description: The duration of the call in seconds.
        recording_url:
          type:
            - string
            - 'null'
          description: >-
            The URL of the call recording, or `null` if no recording is
            available.
        end_call_reason:
          $ref: >-
            #/components/schemas/CallsCallIdGetResponsesContentApplicationJsonSchemaResponseCallsItemsEndCallReason
          description: The reason the call ended from the AI agent's perspective.
        custom_end_call_reason:
          type:
            - string
            - 'null'
          description: >-
            The specific user-defined reason that triggered call termination.
            Only present when end_call_reason is custom_end_call.
        error_message:
          type: string
          description: >-
            Error message if the call encountered an error, or an empty string
            if no error occurred.
        executed_actions:
          $ref: >-
            #/components/schemas/CallsCallIdGetResponsesContentApplicationJsonSchemaResponseCallsItemsExecutedActions
          description: Actions that were executed during the call.
        prompt_variables:
          $ref: >-
            #/components/schemas/CallsCallIdGetResponsesContentApplicationJsonSchemaResponseCallsItemsPromptVariables
          description: Prompt variables.
        type_of_call:
          $ref: >-
            #/components/schemas/CallsCallIdGetResponsesContentApplicationJsonSchemaResponseCallsItemsTypeOfCall
          description: Call type.
        start_time:
          type: string
          description: >-
            The scheduled start time for the call as a UNIX timestamp in
            milliseconds.
        timezone:
          type: string
          description: >-
            The timezone of the call. For a list of all available time zones,
            see the available [timezones](/time-zones).
        telephony_hangup:
          $ref: >-
            #/components/schemas/CallsCallIdGetResponsesContentApplicationJsonSchemaResponseCallsItemsTelephonyHangup
          description: Indicates which party ended the call.
        telephony_disconnect_reason:
          $ref: >-
            #/components/schemas/CallsCallIdGetResponsesContentApplicationJsonSchemaResponseCallsItemsTelephonyDisconnectReason
          description: The reason the telephony connection was disconnected.
        telephony_duration:
          type: integer
          description: The total duration of the telephony connection in milliseconds.
        telephony_ringing_duration:
          type: integer
          description: >-
            The duration the phone was ringing before the call was answered, in
            milliseconds.
        telephony_start:
          type: string
          format: date-time
          description: >-
            The timestamp when the telephony connection started (ISO 8601
            format).
        telephony_end:
          type: string
          format: date-time
          description: The timestamp when the telephony connection ended (ISO 8601 format).
        status:
          $ref: >-
            #/components/schemas/CallsCallIdGetResponsesContentApplicationJsonSchemaResponseCallsItemsStatus
          description: The current status of the call.
        collected_variables:
          type: object
          additionalProperties:
            type: object
            additionalProperties:
              $ref: >-
                #/components/schemas/CallsCallIdGetResponsesContentApplicationJsonSchemaResponseCallsItemsCollectedVariables
          description: >-
            Collected variables (slots) from the conversation flow, keyed by
            agent ID. May be null if not available.
      title: CallsCallIdGetResponsesContentApplicationJsonSchemaResponseCallsItems
    CallsCallIdGetResponsesContentApplicationJsonSchemaResponse:
      type: object
      properties:
        pagination:
          $ref: >-
            #/components/schemas/CallsCallIdGetResponsesContentApplicationJsonSchemaResponsePagination
          description: Pagination information for the results.
        calls:
          type: array
          items:
            $ref: >-
              #/components/schemas/CallsCallIdGetResponsesContentApplicationJsonSchemaResponseCallsItems
      title: CallsCallIdGetResponsesContentApplicationJsonSchemaResponse
    get-phone-call_Response_200:
      type: object
      properties:
        status:
          $ref: '#/components/schemas/status'
        response:
          $ref: >-
            #/components/schemas/CallsCallIdGetResponsesContentApplicationJsonSchemaResponse
      title: get-phone-call_Response_200
    Get-phone-callRequestBadRequestError:
      type: object
      properties: {}
      title: Get-phone-callRequestBadRequestError
  securitySchemes:
    sec0:
      type: http
      scheme: bearer

```

## SDK Code Examples

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