Skip to contentSkip to navigationSkip to topbar
Rate this page:
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 nameTypePIIDescription
account_sidSID<AC>
Not PII

The unique SID identifier of the Account.

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

advanced_featuresboolean

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


voice_traceboolean

A boolean flag indicating whether Voice Trace is enabled.


urlstring<uri>

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 account

get-the-voice-insights-settings-for-the-account page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_16
// Download the helper library from https://www.twilio.com/docs/node/install
_16
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_16
_16
// Find your Account SID and Auth Token at twilio.com/console
_16
// and set the environment variables. See http://twil.io/secure
_16
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_16
const authToken = process.env.TWILIO_AUTH_TOKEN;
_16
const client = twilio(accountSid, authToken);
_16
_16
async function fetchAccountSettings() {
_16
const setting = await client.insights.v1.settings().fetch();
_16
_16
console.log(setting.accountSid);
_16
}
_16
_16
fetchAccountSettings();

Output

_10
{
_10
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_10
"voice_trace": true,
_10
"advanced_features": true,
_10
"url": "https://insights.twilio.com/v1/Voice/Settings"
_10
}


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.

Property nameTypeRequiredPIIDescription
AdvancedFeaturesbooleanOptional

A boolean flag to enable Advanced Features for Voice Insights.


VoiceTracebooleanOptional

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 account

update-settings-to-activate-advanced-features-for-the-account page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_18
// Download the helper library from https://www.twilio.com/docs/node/install
_18
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_18
_18
// Find your Account SID and Auth Token at twilio.com/console
_18
// and set the environment variables. See http://twil.io/secure
_18
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_18
const authToken = process.env.TWILIO_AUTH_TOKEN;
_18
const client = twilio(accountSid, authToken);
_18
_18
async function updateAccountSettings() {
_18
const setting = await client.insights.v1
_18
.settings()
_18
.update({ advancedFeatures: true });
_18
_18
console.log(setting.accountSid);
_18
}
_18
_18
updateAccountSettings();

Output

_10
{
_10
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_10
"voice_trace": true,
_10
"advanced_features": true,
_10
"url": "https://insights.twilio.com/v1/Voice/Settings"
_10
}

Update Settings to activate Voice Trace for a subaccount

update-settings-to-activate-voice-trace-for-a-subaccount page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_19
// Download the helper library from https://www.twilio.com/docs/node/install
_19
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_19
_19
// Find your Account SID and Auth Token at twilio.com/console
_19
// and set the environment variables. See http://twil.io/secure
_19
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_19
const authToken = process.env.TWILIO_AUTH_TOKEN;
_19
const client = twilio(accountSid, authToken);
_19
_19
async function updateAccountSettings() {
_19
const setting = await client.insights.v1.settings().update({
_19
subaccountSid: "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab",
_19
voiceTrace: true,
_19
});
_19
_19
console.log(setting.accountSid);
_19
}
_19
_19
updateAccountSettings();

Output

_10
{
_10
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_10
"voice_trace": true,
_10
"advanced_features": true,
_10
"url": "https://insights.twilio.com/v1/Voice/Settings"
_10
}


Rate this page: