latestOpenAPI 3.0.3MIT2026-08-124627160.3 KB

c04c2c708bf9

Calls

Find calls

Find calls by query parameters.

get/calls

Query parameters

fromstring phonenumber

A phone number that you want to use to filter results. You can pass a partial number to get all calls sent to numbers that start with the number you passed.

tostring phonenumber

Only include calls made to this number or address. You can pass a partial number to get all calls sent to numbers that start with the number you passed.

trunkIdstring

Only include calls made from this trunk.

createTimestring
Example:2021-02-01

Filter calls based on createTime. You make the query more precise, fewer results will be returned. For example, 2021-02-01 will return all calls from the first of February 2021, and 2021-02-01T14:00:00Z will return all calls after 14:00 on the first of February. This field also supports <= and >= to search for calls in a range ?createTime>=2021-10-01&createTime<=2021-10-30 to get a list if calls for october 2021 It is also possible to submit partial dates for example createTime=2021-02 will return all calls for February

Defaults to 24 hours

Internal notes If a customer submits = and not <> we should add min and max for the date range psueodo sql

createTime = 2021-02-01
select * from calls where createTime >= 2021-02-01 and createTime <= 2021-02-01T23:59:59Z

createTime = 2021-02-01T08
select * from calls where createTime >= 2021-02-01T08:00:00 and createTime <= 2021-02-01T08:59:59Z

but if they submit < or > we should just use the value they submitted and parse it a complete date

callResult'COMPLETED' | 'NO_ANSWER' | 'CANCEL' | 'BUSY' | 'FAILED'

The result of the call.

Example:COMPLETED

only include calls by on the callResult(s), example callResult=COMPLETED will return all calls which have completed normally.

direction'INBOUND' | 'OUTBOUND'

Filter results based on the call direction.

only include calls by on the direction(s), example direction=INBOUND,OUTBOUND will return all calls that are inbound or outbound.

pagestring

The page you want to fetch

sizeinteger

The maximum number of items to return per request. The default is 100 and the maximum is 1000. If you need to export larger amounts and pagination is not suitable for you can use the Export function in the dashboard.

Response

Call result response

totalItemsinteger

Total size of the result.

pageNumberstring

The token to be used for listing the next page

sizeinteger

The number of items per page. default is 1000

Example response

{
  "calls": [
    {
      "from": "+14155553434",
      "answerTime": "2021-11-01T23:26:50Z",
      "endTime": "2021-11-01T23:29:50Z",
      "durationSeconds": 45,
      "callResult": "COMPLETED",
      "pricePerMinute": {
        "currencyCode": "USD",
        "amount": "0.0040"
      },
      "billingDurationSeconds": 60,
      "price": {
        "currencyCode": "USD",
        "amount": "0.0040"
      },
      "createTime": "2021-11-01T23:20:50Z",
      "trunkId": "dFeDe67-09d5-49d5-b469-e1fc2cb163c7",
      "pcapId": "0a81e938-07bd-1240-8487-0ecf41868d11"
    }
  ],
  "totalItems": 10000,
  "pageNumber": "1",
  "size": 2000
}