Account Report Resource
Legal notice
Not a HIPAA Eligible Service
Voice Insights Reports API is not a HIPAA Eligible Service and should not be used in workflows that are subject to HIPAA.
An Account Report provides an overview of aggregated voice metrics and reports at the account level.
application/jsonThe unique SID identifier of the Account.
^AC[0-9a-fA-F]{32}$Min length: 34Max length: 34The status of the account level report.
createdrunningcompletedTime range and filters applied to the generated report.
Aggregated account-level metrics captured in the report.
The URL of this resource.
The filter object allows you to specify criteria for the report data. You can filter by various dimensions such as call state, direction, type, and more. Each filter consists of a key and an array of values to include in the report.
| Key | Accepted values |
|---|---|
call_state | completed, fail, busy, noanswer, canceled |
call_direction | inbound, outbound |
call_type | carrier, sip, trunking, client, whatsapp |
twilio_regions | One or more Twilio regions, for example us1, ie1, sg1 |
caller_country_code | ISO alpha-2 country codes for originating callers, for example US, GB, IN |
callee_country_code | ISO alpha-2 country codes for destinations, for example US, GB, IN |
silent | "true" or "false indicating whether the call was tagged as silent |
Info
A Voice Insights Report will be available for 5 days after it is created.
The unique SID identifier of the Account.
^AC[0-9a-fA-F]{32}$Min length: 34Max length: 34The URL of this resource.
POST https://insights.twilio.com/v2/Voice/Reports
application/jsonThe recent 7 days report can be created without any parameters.
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function createAccountReport() {11const report = await client.insights.v2.reports().create();1213console.log(report.accountSid);14}1516createAccountReport();
Response
1{2"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",3"report_id": "voiceinsights_report_01jmzm99cte5rrbbhv8bctd4av",4"status": "created",5"request_meta": {6"start_time": "2024-11-01T00:00:00Z",7"end_time": "2024-11-07T00:00:00Z",8"filters": []9},10"url": "https://insights.twilio.com/v2/Voice/Reports/voiceinsights_report_01jmzm99cte5rrbbhv8bctd4av"11}
You can create an account level report with a specific date range by providing the time_range parameter.
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function createAccountReport() {11const report = await client.insights.v2.reports().create({12time_range: {13start_datetime: "2024-10-15T00:00:00Z",14end_datetime: "2024-11-07T00:00:00Z",15},16});1718console.log(report.accountSid);19}2021createAccountReport();
Response
1{2"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",3"report_id": "voiceinsights_report_01jmzm99cte5rrbbhv8bctd4av",4"status": "created",5"request_meta": {6"start_time": "2024-11-01T00:00:00Z",7"end_time": "2024-11-07T00:00:00Z",8"filters": []9},10"url": "https://insights.twilio.com/v2/Voice/Reports/voiceinsights_report_01jmzm99cte5rrbbhv8bctd4av"11}
You can create an account level report with filters by providing the filters parameter.
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function createAccountReport() {11const report = await client.insights.v2.reports().create({12time_range: {13start_datetime: "2024-10-15T00:00:00Z",14end_datetime: "2024-11-07T00:00:00Z",15},16filters: [17{18key: "call_type",19values: ["carrier", "client"],20},21{22key: "caller_country_code",23values: ["US"],24},25],26});2728console.log(report.accountSid);29}3031createAccountReport();
Response
1{2"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",3"report_id": "voiceinsights_report_01jmzm99cte5rrbbhv8bctd4av",4"status": "created",5"request_meta": {6"start_time": "2024-11-01T00:00:00Z",7"end_time": "2024-11-07T00:00:00Z",8"filters": []9},10"url": "https://insights.twilio.com/v2/Voice/Reports/voiceinsights_report_01jmzm99cte5rrbbhv8bctd4av"11}
GET https://insights.twilio.com/v2/Voice/Reports/{reportId}
A unique request id.
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function fetchAccountReport() {11const report = await client.insights.v212.reports("voiceinsights_report_01jmzm99cte5rrbbhv8bctd4av")13.fetch();1415console.log(report.accountSid);16}1718fetchAccountReport();
Response
1{2"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",3"report_id": "voiceinsights_report_01jmzm99cte5rrbbhv8bctd4av",4"status": "completed",5"request_meta": {6"start_time": "2024-11-01T00:00:00Z",7"end_time": "2024-11-07T00:00:00Z",8"filters": []9},10"report": {11"call_deliverability_score": 99.99,12"call_answer_score": 83.4,13"total_calls": 67895,14"call_direction": {15"outbound": 43841,16"inbound": 2405417},18"call_state": {19"completed": 43841,20"fail": 4070,21"busy": 4004,22"noanswer": 15030,23"canceled": 105024},25"call_type": {26"carrier": 14403,27"sip": 23094,28"trunking": 9884,29"client": 20514,30"whatsapp": 031},32"aloc": 120.34,33"twilio_edge_location": {34"tokyo": 12,35"sydney": 9,36"dublin": 34,37"ashburn": 67784,38"umatilla": 27,39"frankfurt": 2940},41"caller_country_code": {42"US": 67784,43"NL": 11144},45"callee_country_code": {46"PR": 466,47"US": 67143,48"CA": 28649},50"average_queue_time_ms": 212.49,51"silent_calls_percentage": 18.83,52"network_issues": {53"sdk": {54"ice_failures_percentage": 0,55"high_latency_percentage": 26.08,56"high_packet_loss_percentage": 0.06,57"high_jitter_percentage": 1.8858},59"twilio_gateway": {60"high_latency_percentage": 9.26,61"high_packet_loss_percentage": 0.1,62"high_jitter_percentage": 063}64},65"KYT": {66"outbound_carrier_calling": {67"unique_calling_numbers": 430,68"unique_called_numbers": 35,69"blocked_calls_by_carrier": [70{71"country": "US",72"carriers": [73{74"carrier": "att",75"total_calls": 1000,76"blocked_calls": 3,77"blocked_calls_percentage": 0.378},79{80"carrier": "tmobile",81"total_calls": 1000,82"blocked_calls": 0,83"blocked_calls_percentage": 084},85{86"carrier": "verizon",87"total_calls": 1000,88"blocked_calls": 4,89"blocked_calls_percentage": 0.490}91]92}93],94"short_duration_calls_percentage": 22.15,95"long_duration_calls_percentage": 18.09,96"potential_robocalls_percentage": 0.11,97"branded_calling": {98"total_branded_calls": 500,99"percent_branded_calls": 25,100"answer_rate": 81,101"human_answer_rate": 75,102"engagement_rate": 60,103"by_use_case": [104{105"use_case": "Marketing",106"enabled_phonenumbers": 50,107"total_calls": 200,108"answer_rate": 85,109"human_answer_rate": 80,110"engagement_rate": 70111},112{113"use_case": "Customer Support",114"enabled_phonenumbers": 30,115"total_calls": 150,116"answer_rate": 78,117"human_answer_rate": 72,118"engagement_rate": 65119}120]121},122"voice_integrity": {123"enabled_calls": 1000,124"enabled_percentage": 1.47,125"calls_per_bundle": [126{127"bundle_sid": "BUxxxxxxxxxxxxxxxxxxxx",128"enabled_phonenumbers": 3,129"total_calls": 100,130"answer_rate": 85,131"human_answer_rate": 80132},133{134"bundle_sid": "BUyyyyyyyyyyyyyyyyyyyy",135"enabled_phonenumbers": 2,136"total_calls": 150,137"answer_rate": 78,138"human_answer_rate": 72139}140]141},142"stir_shaken": {143"call_count": {144"stsh_a": 2,145"stsh_b": 1,146"stsh_c": 1147},148"percentage": {149"stsh_a": 50,150"stsh_b": 25,151"stsh_c": 25152},153"answer_rate": {154"stsh_a": 50,155"stsh_b": 0,156"stsh_c": 100157}158}159}160},161"answering_machine_detection": {162"total_calls": 40841,163"answered_by_human_percentage": 57.07,164"answered_by_machine_percentage": 28.01165}166},167"url": "https://insights.twilio.com/v2/Voice/Reports/voiceinsights_report_01jmzm99cte5rrbbhv8bctd4av"168}