Get Call By Sid
curl --request GET \
--url https://api.example.com/api/v1/calls/sid/{call_sid} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/v1/calls/sid/{call_sid}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/api/v1/calls/sid/{call_sid}', 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/api/v1/calls/sid/{call_sid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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/api/v1/calls/sid/{call_sid}"
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(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/calls/sid/{call_sid}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/calls/sid/{call_sid}")
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{
"call_sid": "<string>",
"to_phone_number": "<string>",
"customer_phone_number": "<string>",
"id": 123,
"assistant_id": 123,
"status": "<string>",
"call_meta": {},
"duration": 123,
"started_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Calls
Get Call by SID
Get a specific call by Twilio Call SID.
Returns the call details if it belongs to an assistant in your organization.
GET
/
api
/
v1
/
calls
/
sid
/
{call_sid}
Get Call By Sid
curl --request GET \
--url https://api.example.com/api/v1/calls/sid/{call_sid} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/v1/calls/sid/{call_sid}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/api/v1/calls/sid/{call_sid}', 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/api/v1/calls/sid/{call_sid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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/api/v1/calls/sid/{call_sid}"
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(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/calls/sid/{call_sid}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/calls/sid/{call_sid}")
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{
"call_sid": "<string>",
"to_phone_number": "<string>",
"customer_phone_number": "<string>",
"id": 123,
"assistant_id": 123,
"status": "<string>",
"call_meta": {},
"duration": 123,
"started_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}This endpoint retrieves a single call record by its unique Twilio Call SID. This is useful when you have the SID from Twilio’s webhooks or logs and need to look up the corresponding call in your system.
Path Parameters
call_sid(string, required): The unique Call SID from Twilio.
Response
The response is a JSON object containing the full details of the specified call. The structure is the same as the objects returned by the List Calls endpoint.Response
{
"id": 101,
"call_sid": "CAxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"assistant_id": 123,
"to_phone_number": "+15551234567",
"customer_phone_number": "+15559876543",
"status": "completed",
"started_at": "2023-10-30T10:00:00Z",
"ended_at": "2023-10-30T10:05:00Z",
"duration": 300,
"cost": 0.05,
"metadata": {
"customer_id": "cust_abc123"
},
"created_at": "2023-10-30T10:00:00Z",
"updated_at": "2023-10-30T10:05:00Z"
}
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Response
Successful Response
Schema for call response.