Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

Service Resource


A Service provides control and configuration for how Transcripts are processed. Any Transcript created belongs to a particular Service and inherits its configuration.

The Service-level configuration includes features like data logging, auto-transcribe, and auto-redaction. Language Operator deployments to a Service are handled through the Twilio Console.


Service configuration

service-configuration page anchor

Automatically analyze all Twilio call recordings in your account

automatically-analyze-all-twilio-call-recordings-in-your-account page anchor

Enable auto_transcribe if you want to automatically transcribe all Twilio call recordings that are recorded in an account. Auto-transcribe can help you transcribe call recordings without the need of calling the create Transcript Resource. You can enable auto-transcribe through the Service Resource or on the Console, under Service settings.

If you enable auto_transcribe in more than one Service, the call recording will be sent and transcribed more than once, and charged accordingly.

With Voice Intelligence, you can redact Personal Identifiable Information (PII) from your call recording and transcript. PII redaction utilizes artificial intelligence and machine learning technologies.

Update your Service with auto_redaction = true to automatically redact PII from all transcripts made on this Service. If you also want to automatically redact PII from all transcripts media sent to the Service, set media_redaction = true.

(warning)

Warning

If you change the PII redaction or auto-transcribe setting on a Service, it can take up to 10 minutes to come into effect.

The LanguageCode set during Service creation determines the Transcription language for all call recordings processed by that Service. Refer to Supported Languages for a list of available language codes. The default is en-US if no LanguageCode is set.

(information)

Info

A Service can only support one LanguageCode, and it cannot be updated once it's set. To transcribe call recordings in multiple languages, create a separate Service for each language.


Property nameTypePIIDescription
account_sidSID<AC>
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

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


media_redactionboolean

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

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


data_loggingboolean

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>

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


date_updatedstring<date-time>

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


friendly_namestring

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


language_codestring

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

A 34 character string that uniquely identifies this Service.


unique_namestring

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>

The URL of this resource.


webhook_urlstring

The URL Twilio will request when executing the Webhook.


webhook_http_methodenum<string>

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

Possible values:
GETPOSTNULL

read_only_attached_operator_sidsarray[SID<LY>]

Operator sids attached to this service, read only


versioninteger

The version number of this Service.

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

Twilio will pass the following parameters with its request to your webhook URL:

ParameterDescription
account_sidThe unique identifier of the Account responsible for this Transcript.
service_sidA unique identifier for the Service associated with the Transcript.
transcript_sidThe unique identifier for the Transcript.
customer_keyCustomer key provided by the user on the Transcript creation.
event_typeThe type of the webhook event. The value will be voice_intelligence_transcript_available.

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

Property nameTypeRequiredPIIDescription
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.


AutoTranscribebooleanOptional

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


DataLoggingbooleanOptional

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.


FriendlyNamestringOptional

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


LanguageCodestringOptional

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.


AutoRedactionbooleanOptional

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


MediaRedactionbooleanOptional

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.


WebhookUrlstringOptional

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

Create a Service

create-a-service-1 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 createService() {
_18
const service = await client.intelligence.v2.services.create({
_18
uniqueName: "UniqueName",
_18
});
_18
_18
console.log(service.accountSid);
_18
}
_18
_18
createService();

Output

_20
{
_20
"sid": "GAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_20
"unique_name": "UniqueName",
_20
"friendly_name": "some friendly name",
_20
"date_created": "2010-08-31T20:36:28Z",
_20
"date_updated": "2010-08-31T20:36:28Z",
_20
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_20
"auto_redaction": false,
_20
"media_redaction": false,
_20
"auto_transcribe": true,
_20
"data_logging": true,
_20
"language_code": "en-US",
_20
"webhook_url": "https://www.twilio.com",
_20
"webhook_http_method": "POST",
_20
"read_only_attached_operator_sids": [
_20
"LYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
_20
],
_20
"version": 1,
_20
"url": "https://intelligence.twilio.com/v2/Services/GAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
_20
}


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

Property nameTypeRequiredPIIDescription
Sidstringrequired

A 34 character string that uniquely identifies this Service.

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 fetchService() {
_16
const service = await client.intelligence.v2.services("Sid").fetch();
_16
_16
console.log(service.accountSid);
_16
}
_16
_16
fetchService();

Output

_20
{
_20
"sid": "Sid",
_20
"unique_name": "something",
_20
"friendly_name": "some friendly name",
_20
"date_created": "2010-08-31T20:36:28Z",
_20
"date_updated": "2010-08-31T20:36:28Z",
_20
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_20
"auto_redaction": false,
_20
"media_redaction": false,
_20
"auto_transcribe": true,
_20
"data_logging": true,
_20
"language_code": "en-US",
_20
"webhook_url": "https://www.twilio.com",
_20
"webhook_http_method": "POST",
_20
"read_only_attached_operator_sids": [
_20
"LYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
_20
],
_20
"version": 1,
_20
"url": "https://intelligence.twilio.com/v2/Services/GAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
_20
}


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

Property nameTypeRequiredPIIDescription
PageSizeintegerOptional

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

Minimum: 1Maximum: 1000

PageintegerOptional

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

Minimum: 0

PageTokenstringOptional

The page token. This is provided by the API.

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

Output

_33
{
_33
"services": [
_33
{
_33
"sid": "GAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_33
"unique_name": "something",
_33
"friendly_name": "some friendly name",
_33
"date_created": "2010-08-31T20:36:28Z",
_33
"date_updated": "2010-08-31T20:36:28Z",
_33
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_33
"auto_redaction": false,
_33
"media_redaction": false,
_33
"auto_transcribe": true,
_33
"data_logging": true,
_33
"language_code": "en-US",
_33
"webhook_url": "https://www.twilio.com",
_33
"webhook_http_method": "POST",
_33
"read_only_attached_operator_sids": [
_33
"LYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
_33
],
_33
"version": 1,
_33
"url": "https://intelligence.twilio.com/v2/Services/GAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
_33
}
_33
],
_33
"meta": {
_33
"key": "services",
_33
"page": 0,
_33
"page_size": 50,
_33
"first_page_url": "https://intelligence.twilio.com/v2/Services?PageSize=50&Page=0",
_33
"next_page_url": null,
_33
"previous_page_url": null,
_33
"url": "https://intelligence.twilio.com/v2/Services?PageSize=50&Page=0"
_33
}
_33
}


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

(information)

Info

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

Transcripts generated just after updating parameters like AutoTranscribe, AutoRedaction or MediaRedaction may be generated with the old configuration. After 5 minutes, the newly-created Transcripts will have the new configuration.

Property nameTypeRequiredPIIDescription
If-MatchstringOptional

The If-Match HTTP request header

Property nameTypeRequiredPIIDescription
Sidstringrequired

A 34 character string that uniquely identifies this Service.

Property nameTypeRequiredPIIDescription
AutoTranscribebooleanOptional

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


DataLoggingbooleanOptional

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.


FriendlyNamestringOptional

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


UniqueNamestringOptional

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


AutoRedactionbooleanOptional

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


MediaRedactionbooleanOptional

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.


WebhookUrlstringOptional

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
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 updateService() {
_18
const service = await client.intelligence.v2
_18
.services("Sid")
_18
.update({ autoTranscribe: true });
_18
_18
console.log(service.accountSid);
_18
}
_18
_18
updateService();

Output

_20
{
_20
"sid": "Sid",
_20
"unique_name": "something",
_20
"friendly_name": "some friendly name",
_20
"date_created": "2010-08-31T20:36:28Z",
_20
"date_updated": "2010-08-31T20:36:28Z",
_20
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_20
"auto_redaction": false,
_20
"media_redaction": false,
_20
"auto_transcribe": true,
_20
"data_logging": true,
_20
"webhook_url": "https://www.sendgrid.com",
_20
"webhook_http_method": "GET",
_20
"language_code": "en-US",
_20
"read_only_attached_operator_sids": [
_20
"LYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
_20
],
_20
"version": 2,
_20
"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.

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_14
// Download the helper library from https://www.twilio.com/docs/node/install
_14
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_14
_14
// Find your Account SID and Auth Token at twilio.com/console
_14
// and set the environment variables. See http://twil.io/secure
_14
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_14
const authToken = process.env.TWILIO_AUTH_TOKEN;
_14
const client = twilio(accountSid, authToken);
_14
_14
async function deleteService() {
_14
await client.intelligence.v2.services("Sid").remove();
_14
}
_14
_14
deleteService();


Rate this page: