Skip to contentSkip to navigationSkip to topbar
Page toolsOn this page
Looking for more inspiration?Visit the

Account Report Resource


Overview

overview page anchor
(information)

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.


Account Report Properties

account-report-properties page anchor
Encoding type:application/json
Schema
Property nameTypeRequiredPIIDescriptionChild properties
accountSidSID<AC>

Optional

Not PII

The unique SID identifier of the Account.

Pattern: ^AC[0-9a-fA-F]{32}$Min length: 34Max length: 34

reportIdstring

Optional

Report ID.

Example: voiceinsights_report_XXXXXXXXXXXXXXXXXXXXXXXXXX

statusenum<string>

Optional

The status of the account level report.

Possible values:
createdrunningcompleted

requestMetaobject

Optional

Time range and filters applied to the generated report.


reportobject

Optional

Aggregated account-level metrics captured in the report.


urlstring<uri>

Optional

The URL of this resource.

Filter

filter page anchor

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.

Filter object

filter-object page anchor
KeyAccepted values
call_statecompleted, fail, busy, noanswer, canceled
call_directioninbound, outbound
call_typecarrier, sip, trunking, client, whatsapp
twilio_regionsOne or more Twilio regions, for example us1, ie1, sg1
caller_country_codeISO alpha-2 country codes for originating callers, for example US, GB, IN
callee_country_codeISO alpha-2 country codes for destinations, for example US, GB, IN
silent"true" or "false indicating whether the call was tagged as silent

Create Account Report properties

create-account-report-properties page anchor
(information)

Info

A Voice Insights Report will be available for 5 days after it is created.

Property nameTypeRequiredPIIDescriptionChild properties
accountSidSID<AC>

Optional

The unique SID identifier of the Account.

Pattern: ^AC[0-9a-fA-F]{32}$Min length: 34Max length: 34

reportIdstring

Optional

The report identifier as Voice Insights Report TTID.


statusenum<string>

Optional

The status of the report.

Possible values:
createdrunningcompleted

requestMetaobject

Optional


urlstring<uri>

Optional

The URL of this resource.


Create a new Account Report

create-a-new-account-report page anchor

POST https://insights.twilio.com/v2/Voice/Reports

Encoding type:application/json
Schema
Property nameTypeRequiredPIIDescriptionChild properties
timeRangeobject

Optional

Optional start and end date time for the report window. Defaults to the most recent 7 days when omitted.


filtersarray[object]

Optional

The recent 7 days report can be created without any parameters.

Create a new Account ReportLink to code sample: Create a new Account Report
1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function createAccountReport() {
11
const report = await client.insights.v2.reports().create();
12
13
console.log(report.accountSid);
14
}
15
16
createAccountReport();

Response

Note about this 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.

Create an Account Level Report with Date Time RangeLink to code sample: Create an Account Level Report with Date Time Range
1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function createAccountReport() {
11
const report = await client.insights.v2.reports().create({
12
time_range: {
13
start_datetime: "2024-10-15T00:00:00Z",
14
end_datetime: "2024-11-07T00:00:00Z",
15
},
16
});
17
18
console.log(report.accountSid);
19
}
20
21
createAccountReport();

Response

Note about this 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.

Create an Account Level Report with FiltersLink to code sample: Create an Account Level Report with Filters
1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function createAccountReport() {
11
const report = await client.insights.v2.reports().create({
12
time_range: {
13
start_datetime: "2024-10-15T00:00:00Z",
14
end_datetime: "2024-11-07T00:00:00Z",
15
},
16
filters: [
17
{
18
key: "call_type",
19
values: ["carrier", "client"],
20
},
21
{
22
key: "caller_country_code",
23
values: ["US"],
24
},
25
],
26
});
27
28
console.log(report.accountSid);
29
}
30
31
createAccountReport();

Response

Note about this 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}

Property nameTypeRequiredPIIDescription
reportIdstring
required

A unique request id.

1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function fetchAccountReport() {
11
const report = await client.insights.v2
12
.reports("voiceinsights_report_01jmzm99cte5rrbbhv8bctd4av")
13
.fetch();
14
15
console.log(report.accountSid);
16
}
17
18
fetchAccountReport();

Response

Note about this 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": 24054
17
},
18
"call_state": {
19
"completed": 43841,
20
"fail": 4070,
21
"busy": 4004,
22
"noanswer": 15030,
23
"canceled": 1050
24
},
25
"call_type": {
26
"carrier": 14403,
27
"sip": 23094,
28
"trunking": 9884,
29
"client": 20514,
30
"whatsapp": 0
31
},
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": 29
40
},
41
"caller_country_code": {
42
"US": 67784,
43
"NL": 111
44
},
45
"callee_country_code": {
46
"PR": 466,
47
"US": 67143,
48
"CA": 286
49
},
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.88
58
},
59
"twilio_gateway": {
60
"high_latency_percentage": 9.26,
61
"high_packet_loss_percentage": 0.1,
62
"high_jitter_percentage": 0
63
}
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.3
78
},
79
{
80
"carrier": "tmobile",
81
"total_calls": 1000,
82
"blocked_calls": 0,
83
"blocked_calls_percentage": 0
84
},
85
{
86
"carrier": "verizon",
87
"total_calls": 1000,
88
"blocked_calls": 4,
89
"blocked_calls_percentage": 0.4
90
}
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": 70
111
},
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": 65
119
}
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": 80
132
},
133
{
134
"bundle_sid": "BUyyyyyyyyyyyyyyyyyyyy",
135
"enabled_phonenumbers": 2,
136
"total_calls": 150,
137
"answer_rate": 78,
138
"human_answer_rate": 72
139
}
140
]
141
},
142
"stir_shaken": {
143
"call_count": {
144
"stsh_a": 2,
145
"stsh_b": 1,
146
"stsh_c": 1
147
},
148
"percentage": {
149
"stsh_a": 50,
150
"stsh_b": 25,
151
"stsh_c": 25
152
},
153
"answer_rate": {
154
"stsh_a": 50,
155
"stsh_b": 0,
156
"stsh_c": 100
157
}
158
}
159
}
160
},
161
"answering_machine_detection": {
162
"total_calls": 40841,
163
"answered_by_human_percentage": 57.07,
164
"answered_by_machine_percentage": 28.01
165
}
166
},
167
"url": "https://insights.twilio.com/v2/Voice/Reports/voiceinsights_report_01jmzm99cte5rrbbhv8bctd4av"
168
}