Wipple CPaaS
Menu
REST API / Get call count

Get call count

GEThttps://{API_ENDPOINT}/v1/Accounts/{AccountSid}/CallCount

Authentication

  • Authorization header (bearer token, required) — Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

Path parameters

  • AccountSidstringrequired

Response

200

count of active calls for an account

  • inbounddoubleoptionalNumber of inbound calls to the platform
  • outbounddoubleoptionalNumber of outbound calls to the platform

Errors

400 Bad Request Error

error

  • msgstringrequired

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);
}