Wipple CPaaS
Menu
REST API / List calls

List calls

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

Authentication

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

Request

Path parameters

  • AccountSidstringrequired

Query parameters

  • directionenumoptionalcall direction to retrieve
  • Allowed values: inbound, outbound
  • fromstringoptionalcalling number to retrieve
  • tostringoptionalcalled number to retrieve
  • callStatusenumoptionalcall status to retrieve
  • Allowed values: trying, ringing, early-media, in-progress, completed, failed, busy, no-answer, queued

Response

200

list of calls for a specified account

  • list of Call

Errors

500 Internal Server Error

system error

  • msgstringrequired

Types

Call

  • account_sidstringrequired
  • call_idstringrequired
  • call_sidstringrequired
  • call_statusenumrequired
  • Allowed values: trying, ringing, alerting, in-progress, completed, busy, no-answer, failed, queued
  • directionenumrequired
  • Allowed values: inbound, outbound
  • fromstringrequired
  • service_urlstringrequired
  • sip_statusintegerrequired
  • tostringrequired
  • application_sidstringoptional
  • caller_namestringoptional
  • durationintegeroptional
  • originating_sip_trunk_namestringoptional
  • parent_call_sidstringoptional

Examples

Request

{}

Response

[
  {
    "account_sid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "call_id": "call_1234567890abcdef",
    "call_sid": "9b2d7f3e-8c4a-4f1a-9d3e-1a2b3c4d5e6f",
    "call_status": "in-progress",
    "direction": "inbound",
    "from": "+815099990009",
    "service_url": "https://{API_ENDPOINT}/v1/calls/9b2d7f3e-8c4a-4f1a-9d3e-1a2b3c4d5e6f",
    "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": "2a4b6c8d-1e3f-4a5b-9c7d-0e1f2a3b4c5d"
  }
]

cURL

curl -X GET "https://{API_ENDPOINT}/v1/Accounts/AccountSid/Calls" \
  -H "Authorization: Bearer <token>"

Python

import requests

url = "https://{API_ENDPOINT}/v1/Accounts/AccountSid/Calls"

headers = {
    "Authorization": "Bearer <token>"
}

response = requests.get(url, headers=headers)

print(response.json())

JavaScript

const url = 'https://{API_ENDPOINT}/v1/Accounts/AccountSid/Calls';
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);
}