One call
curl --request GET \
--url https://{host}/api/v1/calls/{uuid} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{host}/api/v1/calls/{uuid}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{host}/api/v1/calls/{uuid}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"answered_at": "2023-11-07T05:31:56Z",
"billsec": 123,
"call_uuid": "<string>",
"caller_number": "<string>",
"destination_number": "<string>",
"direction": "<string>",
"ended_at": "2023-11-07T05:31:56Z",
"hangup_cause": "<string>",
"recording_url": "<string>",
"reference": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"state": "live"
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}Live
One call
state live (from the switch, while it lasts) or ended (from its record): who, when, the hangup cause, your reference, and the recording’s URL when there is one. Requires calls:read.
One call
curl --request GET \
--url https://{host}/api/v1/calls/{uuid} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{host}/api/v1/calls/{uuid}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{host}/api/v1/calls/{uuid}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"answered_at": "2023-11-07T05:31:56Z",
"billsec": 123,
"call_uuid": "<string>",
"caller_number": "<string>",
"destination_number": "<string>",
"direction": "<string>",
"ended_at": "2023-11-07T05:31:56Z",
"hangup_cause": "<string>",
"recording_url": "<string>",
"reference": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"state": "live"
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}Authorizations
Every request sends Authorization: Bearer <token>. The token is either a panel session (a JWT from /auth/login, 12 hours) or an API key ft_<id>_<secret>. An API key is accepted only from an address on its IP allowlist (403 ip_not_allowed otherwise; 403 ip_allowlist_required for an old key that has none), is limited to its rate per minute (429 rate_limited with Retry-After; X-RateLimit-Limit/Remaining/Reset on every response), and at most 60 call placements a minute.