Get Call Detail
Retrieve full details for a single call including transcript, recording, and output variables.
curl -X GET "https://api.twentytwo.in/api/call/detail?call_id=699ed3b91ee5bee389dcb6a3" \
-H "Content-Type: application/json" \
-H "x-workspace-id: 699ed3b91ee5bee389dcb6a3" \
-H "Authorization: Basic YOUR_CREDENTIALS"
import requests
import json
url = "https://api.twentytwo.in/api/call/detail?call_id=699ed3b91ee5bee389dcb6a3"
headers = {
"Content-Type": "application/json",
"x-workspace-id": "699ed3b91ee5bee389dcb6a3",
"Authorization": "Basic YOUR_CREDENTIALS"
}
response = requests.get(url, headers=headers)
print(response.json())
const response = await fetch("https://api.twentytwo.in/api/call/detail?call_id=699ed3b91ee5bee389dcb6a3", {
method: "GET",
headers: {
"Content-Type": "application/json",
"x-workspace-id": "699ed3b91ee5bee389dcb6a3",
"Authorization": "Basic YOUR_CREDENTIALS"
}
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
)
func main() {
req, err := http.NewRequest("GET", "https://api.twentytwo.in/api/call/detail?call_id=699ed3b91ee5bee389dcb6a3", nil)
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("x-workspace-id", "699ed3b91ee5bee389dcb6a3")
req.Header.Set("Authorization", "Basic YOUR_CREDENTIALS")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://api.twentytwo.in/api/call/detail?call_id=699ed3b91ee5bee389dcb6a3')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri)
request['Content-Type'] = 'application/json'
request['x-workspace-id'] = '699ed3b91ee5bee389dcb6a3'
request['Authorization'] = 'Basic YOUR_CREDENTIALS'
response = http.request(request)
puts response.body
{
"success": true,
"call": {
"call_id": "call_9c4d7e12ab",
"agent_id": "69de483c68b23495c853b43a",
"status": "completed",
"direction": "outbound",
"callee_phone": "9999999999",
"caller_phone": "9999999999",
"duration_seconds": 94,
"billed_duration_seconds": 94,
"cost": "15.67 INR",
"started_at": "2024-12-25T10:00:00Z",
"ended_at": "2024-12-25T10:01:34Z"
},
"input_parameters": {
"agentName": "Rohit"
},
"output_parameters": {
"interested": "yes",
"callback_requested": "yes",
"callback_time": "Tomorrow 11am"
},
"recording": {
"url": "https://storage.twentytwo.in/recordings/call_9c4d7e12ab.mp3",
"expires_at": "2025-01-25T10:01:34Z"
},
"transcript": {
"url": "https://storage.twentytwo.in/transcripts/call_9c4d7e12ab.txt",
"expires_at": "2025-01-25T10:01:34Z"
}
}
{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing credentials.",
"status": 401
}
}
{
"success": false,
"error": {
"code": "CALL_NOT_FOUND",
"message": "No call found for the given call_id.",
"status": 404
}
}
GET
/call/detail
GET
Basic Authentication
Usernamestring
RequiredUsername for basic authentication
Passwordpassword
RequiredPassword for basic authentication
Pass your Basic auth token in the Authorization header along with your workspace ID in the x-workspace-id header on every request.
query
call_idstring
RequiredThe unique ID of the call to retrieve
header
x-workspace-idstring
RequiredYour Twenty2 workspace ID
Request Preview
Response
Response will appear here after sending the request
Authentication
header
Authorizationstring
RequiredBasic authentication credentials. Pass your Basic auth token in the Authorization header along with your workspace ID in the x-workspace-id header on every request.
Query Parameters
call_idstring
RequiredThe unique ID of the call to retrieve
Headers
x-workspace-idstring
RequiredYour Twenty2 workspace ID
Responses
successboolean
callobject
call_idstring
agent_idstring
statusstring
Allowed values:
initiatedcompletedconnectednot_connectedfaileddirectionstring
callee_phonestring
caller_phonestring
duration_secondsinteger
billed_duration_secondsinteger
coststring
started_atstring
ended_atstring
input_parametersobject
output_parametersobject
recordingobject
urlstring
expires_atstring
transcriptobject
urlstring
expires_atstring
successboolean
errorobject
codestring
messagestring
statusinteger
successboolean
errorobject
codestring
messagestring
statusinteger
Was this page helpful?
Last updated 2 weeks ago
Built with Documentation.AI