Skip to contentSkip to navigationSkip to topbar
On this page

Voice Insights Settings Resource


Voice Insights Settings determine whether

  • Advanced Features and/or
  • Voice Trace

are activated for a given account.

Using the Voice Insights Settings Resource, you can

for an account or a specific subaccount.


Voice Insight Settings properties

voice-insight-settings-properties page anchor
Property nameTypeRequiredDescriptionChild properties
account_sidSID<AC>

Optional

Not PII

The unique SID identifier of the Account.

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

advanced_featuresboolean

Optional

A boolean flag indicating whether Advanced Features for Voice Insights are enabled.


voice_traceboolean

Optional

A boolean flag indicating whether Voice Trace is enabled.


urlstring<uri>

Optional

The URL of this resource.


Get the Voice Insights Settings

get-the-voice-insights-settings page anchor
GET https://insights.twilio.com/v1/Voice/Settings

Query parameters

query-parameters page anchor
Property nameTypeRequiredPIIDescription
SubaccountSidSID<AC>

Optional

The unique SID identifier of the Subaccount.

Pattern: ^AC[0-9a-fA-F]{32}$Min length: 34Max length: 34
Get the Voice Insights Settings for the accountLink to code sample: Get the Voice Insights Settings for the account
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 fetchAccountSettings() {
11
const setting = await client.insights.v1.settings().fetch();
12
13
console.log(setting.accountSid);
14
}
15
16
fetchAccountSettings();

Output

1
{
2
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3
"voice_trace": true,
4
"advanced_features": true,
5
"url": "https://insights.twilio.com/v1/Voice/Settings"
6
}

Update Voice Insights Settings

update-voice-insights-settings page anchor
POST https://insights.twilio.com/v1/Voice/Settings

To manage subaccount Settings pass the subaccount SID as a parameter in the request.

Encoding type:application/x-www-form-urlencoded
SchemaExample
Property nameTypeRequiredDescriptionChild properties
AdvancedFeaturesboolean

Optional

A boolean flag to enable Advanced Features for Voice Insights.


VoiceTraceboolean

Optional

A boolean flag to enable Voice Trace.


SubaccountSidSID<AC>

Optional

The unique SID identifier of the Subaccount.

Pattern: ^AC[0-9a-fA-F]{32}$Min length: 34Max length: 34
Update Settings to activate Advanced Features for the accountLink to code sample: Update Settings to activate Advanced Features for the account
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 updateAccountSettings() {
11
const setting = await client.insights.v1
12
.settings()
13
.update({ advancedFeatures: true });
14
15
console.log(setting.accountSid);
16
}
17
18
updateAccountSettings();

Output

1
{
2
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3
"voice_trace": true,
4
"advanced_features": true,
5
"url": "https://insights.twilio.com/v1/Voice/Settings"
6
}
Update Settings to activate Voice Trace for a subaccountLink to code sample: Update Settings to activate Voice Trace for a subaccount
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 updateAccountSettings() {
11
const setting = await client.insights.v1.settings().update({
12
subaccountSid: "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab",
13
voiceTrace: true,
14
});
15
16
console.log(setting.accountSid);
17
}
18
19
updateAccountSettings();

Output

1
{
2
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3
"voice_trace": true,
4
"advanced_features": true,
5
"url": "https://insights.twilio.com/v1/Voice/Settings"
6
}

Need some help?

Terms of service

Copyright © 2024 Twilio Inc.