Get a call
GEThttps://{API_ENDPOINT}/v1/Accounts/{AccountSid}/Calls/{CallSid}
Authentication
Authorizationheader (bearer token, required) — Bearer authentication of the formBearer <token>, where token is your auth token.
Request
Path parameters
AccountSidstringCallSidstring
Response
200
call found
account_sidstringcall_idstringcall_sidstringcall_statusenum- Allowed values:
trying,ringing,alerting,in-progress,completed,busy,no-answer,failed,queued directionenum- Allowed values:
inbound,outbound fromstringservice_urlstringsip_statusintegertostringapplication_sidstringcaller_namestringdurationintegeroriginating_sip_trunk_namestringparent_call_sidstring
Errors
404 Not Found Error
call not found
any
500 Internal Server Error
system error
msgstring
Examples
Request
{}
Response
{
"account_sid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"call_id": "call_1234567890abcdef",
"call_sid": "1c9e6679-7425-40de-944b-e07fc1f90ae7",
"call_status": "in-progress",
"direction": "inbound",
"from": "+815099990009",
"service_url": "https://{API_ENDPOINT}/v1/Accounts/3fa85f64-5717-4562-b3fc-2c963f66afa6/Calls/1c9e6679-7425-40de-944b-e07fc1f90ae7",
"sip_status": 200,
"to": "+815099990008",
"application_sid": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"caller_name": "Miraicom Taro",
"duration": 125,
"originating_sip_trunk_name": "MainSIPTrunk",
"parent_call_sid": "2a9e6679-7425-40de-944b-e07fc1f90ae7"
}
cURL
curl -X GET "https://{API_ENDPOINT}/v1/Accounts/AccountSid/Calls/CallSid" \
-H "Authorization: Bearer <token>"
Python
import requests
url = "https://{API_ENDPOINT}/v1/Accounts/AccountSid/Calls/CallSid"
headers = {
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.json())
JavaScript
const url = 'https://{API_ENDPOINT}/v1/Accounts/AccountSid/Calls/CallSid';
const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>'}
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}