Get call count
GEThttps://{API_ENDPOINT}/v1/Accounts/{AccountSid}/CallCount
Authentication
Authorizationheader (bearer token, required) — Bearer authentication of the formBearer <token>, where token is your auth token.
Request
Path parameters
AccountSidstring
Response
200
count of active calls for an account
inbounddoubleNumber of inbound calls to the platformoutbounddoubleNumber of outbound calls to the platform
Errors
400 Bad Request Error
error
msgstring
Examples
Request
{}
Response
{
"inbound": 15,
"outbound": 7
}
cURL
curl -X GET "https://{API_ENDPOINT}/v1/Accounts/AccountSid/CallCount" \
-H "Authorization: Bearer <token>"
Python
import requests
url = "https://{API_ENDPOINT}/v1/Accounts/AccountSid/CallCount"
headers = {
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.json())
JavaScript
const url = 'https://{API_ENDPOINT}/v1/Accounts/AccountSid/CallCount';
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);
}