curl --request GET \
--url https://api.example.com/v1/calls/{call_id}import requests
url = "https://api.example.com/v1/calls/{call_id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/v1/calls/{call_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/calls/{call_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/calls/{call_id}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/v1/calls/{call_id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/calls/{call_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"call_status": "registered",
"_id": "<string>",
"ai_agent_id": "<string>",
"ai_agent_name": "<string>",
"override_ai_agent_id": "<string>",
"metadata": {},
"pia_llm_dynamic_data": {},
"call_start_time": "2023-11-07T05:31:56Z",
"call_end_time": "2023-11-07T05:31:56Z",
"messages": [
{
"role": "agent",
"content": "<string>"
}
],
"recorded_call_audio_url": "<string>",
"access_token": "<string>",
"call_duration_seconds": 123,
"call_type": "web_call",
"call_finish_reason": "user_ended_call"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Get Call
Retrieve detailed information about a specific call by its ID.
This endpoint provides comprehensive information about any call (web or phone) including its current status, duration, and associated metadata.
curl --request GET \
--url https://api.example.com/v1/calls/{call_id}import requests
url = "https://api.example.com/v1/calls/{call_id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/v1/calls/{call_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/calls/{call_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/calls/{call_id}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/v1/calls/{call_id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/calls/{call_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"call_status": "registered",
"_id": "<string>",
"ai_agent_id": "<string>",
"ai_agent_name": "<string>",
"override_ai_agent_id": "<string>",
"metadata": {},
"pia_llm_dynamic_data": {},
"call_start_time": "2023-11-07T05:31:56Z",
"call_end_time": "2023-11-07T05:31:56Z",
"messages": [
{
"role": "agent",
"content": "<string>"
}
],
"recorded_call_audio_url": "<string>",
"access_token": "<string>",
"call_duration_seconds": 123,
"call_type": "web_call",
"call_finish_reason": "user_ended_call"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Path Parameters
Response
Successful Response
- WebCallResponse
- PhoneCallResponse
Current status of the call: 'registered' for initialized calls, 'ongoing' for active calls, 'ended' for completed calls, 'error' for failed calls
registered, ongoing, ended, error Unique identifier for the call session, automatically generated as a MongoDB ObjectId
Identifier of the AI agent handling this call
Name of the AI agent handling this call
Optional identifier for an alternative AI agent handling this call
Custom key-value pairs storing additional information about the call
Show child attributes
Show child attributes
Dynamic data used by the AI agent during the call
Timestamp when the call was initiated, in UTC
Timestamp when the call was terminated, in UTC
Chronological list of messages exchanged during the call
Show child attributes
Show child attributes
URL to access the recorded audio file of the call
Security token for accessing call-related resources
Duration of the call in seconds
Indicates this response is for a web-based call
"web_call"Detailed reason why the web call ended, if applicable
user_ended_call, agent_ended_call, call_transferred, inactivity_timeout, maximum_duration_exceeded, concurrent_call_limit_reached, invalid_payment, potential_scam_detected, inbound_webhook_error, line_busy, call_failed, no_answer, llm_websocket_initialization_error, llm_websocket_connection_lost, llm_websocket_runtime_error, llm_websocket_payload_corruption, twilio_error, no_audio_input, speech_recognition_error, pia_platform_internal_error, unknown_error, user_connection_failure 
