Skip to contentSkip to navigationSkip to topbar
On this page

Voice Intelligence - Service Resource


A Voice Intelligence Service provides control and configuration for how call recordings are processed into Transcripts. Voice Intelligence Transcripts belong to a particular Service and inherit its configuration.

The Service-level configuration includes features like data logging, auto-transcription, and auto-redaction.


Service Properties

service-properties page anchor
Property nameTypeRequiredDescriptionChild properties
account_sidSID<AC>

Optional

Not PII

The unique SID identifier of the Account the Service belongs to.

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

auto_redactionboolean

Optional

Instructs the Speech Recognition service to automatically redact PII from all transcripts made on this service.


media_redactionboolean

Optional

Instructs the Speech Recognition service to automatically redact PII from all transcripts media made on this service. The auto_redaction flag must be enabled, results in error otherwise.


auto_transcribeboolean

Optional

Instructs the Speech Recognition service to automatically transcribe all recordings made on the account.


data_loggingboolean

Optional

Data logging allows Twilio to improve the quality of the speech recognition & language understanding services through using customer data to refine, fine tune and evaluate machine learning models. Note: Data logging cannot be activated via API, only via www.twilio.com, as it requires additional consent.


date_createdstring<date-time>

Optional

The date that this Service was created, given in ISO 8601 format.


date_updatedstring<date-time>

Optional

The date that this Service was updated, given in ISO 8601 format.


friendly_namestring

Optional

A human readable description of this resource, up to 64 characters.


language_codestring

Optional

The language code set during Service creation determines the Transcription language for all call recordings processed by that Service. The default is en-US if no language code is set. A Service can only support one language code, and it cannot be updated once it's set.


sidstring

Optional

A 34 character string that uniquely identifies this Service.


unique_namestring

Optional

Provides a unique and addressable name to be assigned to this Service, assigned by the developer, to be optionally used in addition to SID.


urlstring<uri>

Optional

The URL of this resource.


webhook_urlstring

Optional

The URL Twilio will request when executing the Webhook.


webhook_http_methodenum<string>

Optional

The HTTP method for the Webhook. One of GET or POST.

Possible values:
GETPOSTNULL

read_only_attached_operator_sidsarray[SID<LY>]

Optional

Operator sids attached to this service, read only


versioninteger

Optional

The version number of this Service.

Default: 0

POST https://intelligence.twilio.com/v2/Services

Request body parameters

request-body-parameters page anchor
Encoding type:application/x-www-form-urlencoded
SchemaExample
Property nameTypeRequiredDescriptionChild properties
UniqueNamestringrequired

Provides a unique and addressable name to be assigned to this Service, assigned by the developer, to be optionally used in addition to SID.


AutoTranscribeboolean

Optional

Instructs the Speech Recognition service to automatically transcribe all recordings made on the account.


DataLoggingboolean

Optional

Data logging allows Twilio to improve the quality of the speech recognition & language understanding services through using customer data to refine, fine tune and evaluate machine learning models. Note: Data logging cannot be activated via API, only via www.twilio.com, as it requires additional consent.


FriendlyNamestring

Optional

A human readable description of this resource, up to 64 characters.


LanguageCodestring

Optional

The language code set during Service creation determines the Transcription language for all call recordings processed by that Service. The default is en-US if no language code is set. A Service can only support one language code, and it cannot be updated once it's set.


AutoRedactionboolean

Optional

Instructs the Speech Recognition service to automatically redact PII from all transcripts made on this service.


MediaRedactionboolean

Optional

Instructs the Speech Recognition service to automatically redact PII from all transcripts media made on this service. The auto_redaction flag must be enabled, results in error otherwise.


WebhookUrlstring

Optional

The URL Twilio will request when executing the Webhook.


WebhookHttpMethodenum<string>

Optional

The HTTP method for the Webhook. One of GET or POST.

Possible values:
GETPOSTNULL

This section includes additional details for optional parameters you can pass when creating and updating a Voice Intelligence Service:

AutoTranscribe

autotranscribe page anchor

Enable auto_transcribe if you want the Service to automatically transcribe all Twilio Voice call recordings on your Account. See the onboarding guide for additional details and the billing implications auto-transcription can have on your Account.

The webhook_url parameter allows you to specify a URL for Twilio to send webhook requests to for each event specified in the event_type parameter.

Twilio passes the following properties with its request to your webhook URL:

ParameterDescription
account_sidUnique identifier of the Account associated with the Transcript.
service_sidUnique identifier of the Service associated with the Transcript.
transcript_sidUnique identifier of the Transcript.
customer_keyCustomer key provided by the user on the Transcript creation.
event_typeWebhook event type. The value will be voice_intelligence_transcript_available.
Create a ServiceLink to code sample: Create a Service
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 createService() {
11
const service = await client.intelligence.v2.services.create({
12
uniqueName: "MyService",
13
});
14
15
console.log(service.accountSid);
16
}
17
18
createService();

Output

1
{
2
"sid": "GAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3
"unique_name": "MyService",
4
"friendly_name": "some friendly name",
5
"date_created": "2010-08-31T20:36:28Z",
6
"date_updated": "2010-08-31T20:36:28Z",
7
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
8
"auto_redaction": false,
9
"media_redaction": false,
10
"auto_transcribe": true,
11
"data_logging": true,
12
"language_code": "en-US",
13
"webhook_url": "https://www.twilio.com",
14
"webhook_http_method": "POST",
15
"read_only_attached_operator_sids": [
16
"LYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
17
],
18
"version": 1,
19
"url": "https://intelligence.twilio.com/v2/Services/GAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
20
}

GET https://intelligence.twilio.com/v2/Services/{Sid}

This endpoint allows you to fetch a Voice Intelligence Service by its sid or unique_name.

Property nameTypeRequiredPIIDescription
Sidstringrequired

A 34 character string that uniquely identifies this Service.

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 fetchService() {
11
const service = await client.intelligence.v2
12
.services("GAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
13
.fetch();
14
15
console.log(service.accountSid);
16
}
17
18
fetchService();

Output

1
{
2
"sid": "GAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3
"unique_name": "something",
4
"friendly_name": "some friendly name",
5
"date_created": "2010-08-31T20:36:28Z",
6
"date_updated": "2010-08-31T20:36:28Z",
7
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
8
"auto_redaction": false,
9
"media_redaction": false,
10
"auto_transcribe": true,
11
"data_logging": true,
12
"language_code": "en-US",
13
"webhook_url": "https://www.twilio.com",
14
"webhook_http_method": "POST",
15
"read_only_attached_operator_sids": [
16
"LYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
17
],
18
"version": 1,
19
"url": "https://intelligence.twilio.com/v2/Services/GAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
20
}

GET https://intelligence.twilio.com/v2/Services

This endpoint allows you to fetch multiple Voice Intelligence Services based on the following optional query parameters.

Property nameTypeRequiredPIIDescription
PageSizeinteger<int64>

Optional

How many resources to return in each list page. The default is 50, and the maximum is 1000.

Minimum: 1Maximum: 1000

Pageinteger

Optional

The page index. This value is simply for client state.

Minimum: 0

PageTokenstring

Optional

The page token. This is provided by the API.

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 listService() {
11
const services = await client.intelligence.v2.services.list({ limit: 20 });
12
13
services.forEach((s) => console.log(s.accountSid));
14
}
15
16
listService();

Output

1
{
2
"services": [
3
{
4
"sid": "GAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
5
"unique_name": "something",
6
"friendly_name": "some friendly name",
7
"date_created": "2010-08-31T20:36:28Z",
8
"date_updated": "2010-08-31T20:36:28Z",
9
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
10
"auto_redaction": false,
11
"media_redaction": false,
12
"auto_transcribe": true,
13
"data_logging": true,
14
"language_code": "en-US",
15
"webhook_url": "https://www.twilio.com",
16
"webhook_http_method": "POST",
17
"read_only_attached_operator_sids": [
18
"LYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
19
],
20
"version": 1,
21
"url": "https://intelligence.twilio.com/v2/Services/GAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
22
}
23
],
24
"meta": {
25
"key": "services",
26
"page": 0,
27
"page_size": 50,
28
"first_page_url": "https://intelligence.twilio.com/v2/Services?PageSize=50&Page=0",
29
"next_page_url": null,
30
"previous_page_url": null,
31
"url": "https://intelligence.twilio.com/v2/Services?PageSize=50&Page=0"
32
}
33
}

POST https://intelligence.twilio.com/v2/Services/{Sid}

This endpoint allows you to update an existing Voice Intelligence Service on your Account. To retrieve the configuration details of the Service you wish to update, you can fetch a specific Service or a list of Services on your Account.

When updating an existing Service, you can specify the latest version as an If-Match header(link takes you to an external page) in your request to prevent concurrent updates.

(information)

Info

It can take up to five minutes to propagate any changes to a Service.

Transcripts generated just after updating parameters like AutoTranscribe, AutoRedaction, or MediaRedaction may be generated using the old configuration. Please consider this delay if you want to apply specific settings to your Voice Intelligence Transcripts. Refer to the onboarding guide for additional considerations when making changes to your Service.

See also Additional information on AutoTranscribe and the WebhookUrl body parameters.

Property nameTypeRequiredPIIDescription
If-Matchstring

Optional

The If-Match HTTP request header

Property nameTypeRequiredPIIDescription
Sidstringrequired

A 34 character string that uniquely identifies this Service.

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

Optional

Instructs the Speech Recognition service to automatically transcribe all recordings made on the account.


DataLoggingboolean

Optional

Data logging allows Twilio to improve the quality of the speech recognition & language understanding services through using customer data to refine, fine tune and evaluate machine learning models. Note: Data logging cannot be activated via API, only via www.twilio.com, as it requires additional consent.


FriendlyNamestring

Optional

A human readable description of this resource, up to 64 characters.


UniqueNamestring

Optional

Provides a unique and addressable name to be assigned to this Service, assigned by the developer, to be optionally used in addition to SID.


AutoRedactionboolean

Optional

Instructs the Speech Recognition service to automatically redact PII from all transcripts made on this service.


MediaRedactionboolean

Optional

Instructs the Speech Recognition service to automatically redact PII from all transcripts media made on this service. The auto_redaction flag must be enabled, results in error otherwise.


WebhookUrlstring

Optional

The URL Twilio will request when executing the Webhook.


WebhookHttpMethodenum<string>

Optional

The HTTP method for the Webhook. One of GET or POST.

Possible values:
GETPOSTNULL
Update Auto-Transcription Setting to FalseLink to code sample: Update Auto-Transcription Setting to False
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 updateService() {
11
const service = await client.intelligence.v2
12
.services("GAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
13
.update({ autoTranscribe: false });
14
15
console.log(service.accountSid);
16
}
17
18
updateService();

Output

1
{
2
"sid": "GAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3
"unique_name": "something",
4
"friendly_name": "some friendly name",
5
"date_created": "2010-08-31T20:36:28Z",
6
"date_updated": "2010-08-31T20:36:28Z",
7
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
8
"auto_redaction": false,
9
"media_redaction": false,
10
"auto_transcribe": false,
11
"data_logging": true,
12
"webhook_url": "https://www.sendgrid.com",
13
"webhook_http_method": "GET",
14
"language_code": "en-US",
15
"read_only_attached_operator_sids": [
16
"LYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
17
],
18
"version": 2,
19
"url": "https://intelligence.twilio.com/v2/Services/GAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
20
}

DELETE https://intelligence.twilio.com/v2/Services/{Sid}

Property nameTypeRequiredPIIDescription
Sidstringrequired

A 34 character string that uniquely identifies this Service.

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 deleteService() {
11
await client.intelligence.v2
12
.services("GAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
13
.remove();
14
}
15
16
deleteService();