List voice calls
Overview
The list_voice_calls function returns one row for each voice call leg that your carrier
recorded. Each row has the carrier's call time and the billable minutes after the carrier's
rounding rule. Use this function to:
- Compare your voice minutes with your Twilio or Telnyx invoice
- Total the billable minutes of a month, by carrier and direction
- Find the calls of a campaign and their cost in minutes
Quick start
This example returns the calls that ended in October 2026:
query ListVoiceCalls($startTime: timestamp!, $endTime: timestamp!) {
list_voice_calls(
args: { start_time: $startTime, end_time: $endTime }
order_by: { ended_at: desc }
) {
call_id
session_id
carrier
direction
campaign_id
ended_at
duration_seconds
billable_minutes
}
}
Variables:
{
"startTime": "2026-10-01",
"endTime": "2026-11-01"
}
Try it
Use the interactive playground below to test the query. Replace the dates with your own range.
Parameters
| Parameter | Type | Description |
|---|---|---|
start_time | timestamp | Required. The function returns calls that ended at this time or later (UTC) |
end_time | timestamp | Required. The function returns calls that ended before this time (UTC) |
account_id | uuid | Optional. Defaults to the account of your API key |
The window applies to ended_at, the time that the call ended. The start is inclusive and the end
is exclusive, so 2026-10-01 to 2026-11-01 gives the whole month of October.
The function supports the standard Hasura arguments where, order_by, limit, and offset.
Use them to filter by carrier or direction, to sort, and to page through the results.
Response fields
| Field | Type | Description |
|---|---|---|
call_id | String | The carrier's ID for the call leg |
session_id | String | The conversation of the call |
account_id | uuid | Account identifier |
carrier | String | twilio or telnyx |
direction | String | inbound or outbound |
campaign_id | String | The campaign that placed the call. null for a call that no campaign placed |
is_handover_leg | Boolean | true for the leg that transfers the call to a human agent. The carrier bills it on its own |
started_at | timestamp | The time that the carrier started the call (UTC). Can be null |
ended_at | timestamp | The time that the call ended (UTC) |
duration_seconds | Int | The carrier's call time, from answer to hang-up, in seconds |
billable_minutes | numeric | The call time after the carrier's rounding rule, in minutes. Can be a fraction, such as 0.5 |
Billable minutes
Each leg rounds on its own, by the rule of its carrier and call type:
- Telnyx inbound calls and Telnyx calls to a SIP address round up to the next 6 seconds.
- All other calls round up to the next whole minute.
- A Telnyx call that is answered and ends at 0 seconds bills one full step, 6 seconds or 1 minute. A Twilio call of 0 seconds bills 0 minutes.
For a 29-second call, a Telnyx inbound call bills 0.5 minutes and a Twilio call bills 1
minute. See Voice call billing for the full rules.
The Telnyx call time comes from the call's timestamps, so it can be 1 second off the Telnyx invoice. Telnyx calls to a SIP address that Moveo recorded before it stored the destination type round to whole minutes.
What the data covers
The function looks back 189 days. It does not return a call that ended more than 189 days ago. This limit also applies to a window that starts earlier.
| Call | Included |
|---|---|
| Twilio Voice outbound calls | Yes |
| Telnyx Voice outbound calls | Yes |
| Telnyx Voice inbound calls | Yes, for calls from 21 October 2026 |
| Twilio Voice inbound calls | No |
| Web Voice calls | No, they have no carrier |
The function also leaves out test calls, and call legs with no call time.
Totals by carrier
list_voice_calls_aggregate takes the same arguments and returns totals. This example totals the
Telnyx inbound calls of October 2026:
query VoiceMinutes($startTime: timestamp!, $endTime: timestamp!) {
telnyx_inbound: list_voice_calls_aggregate(
args: { start_time: $startTime, end_time: $endTime }
where: { carrier: { _eq: "telnyx" }, direction: { _eq: "inbound" } }
) {
aggregate {
count
sum {
duration_seconds
billable_minutes
}
}
}
}
Example response
{
"data": {
"list_voice_calls": [
{
"call_id": "v3:7f1c2a9e-4b1d-4c8e-9a51-2d3f6e8b0c41",
"session_id": "58c0c8ca-4830-4782-adb8-31f1597bdad9",
"carrier": "telnyx",
"direction": "inbound",
"campaign_id": null,
"ended_at": "2026-10-23T09:22:22",
"duration_seconds": 91,
"billable_minutes": 1.6
},
{
"call_id": "CA4f2b9d0e8c7a6b5d4e3f2a1b0c9d8e7f",
"session_id": "4d3f98e0-47da-418c-a487-99b5bdc180c4",
"carrier": "twilio",
"direction": "outbound",
"campaign_id": "a7c3e1f0-2b4d-4e6f-8a9c-0d1e2f3a4b5c",
"ended_at": "2026-10-22T15:04:10",
"duration_seconds": 65,
"billable_minutes": 2
}
]
}
}